relf/egobox/egobox-gpx-cli
Claude Code and agent skill by relf/egobox
- community
Checking that the SKILL.md file is still in the repository.
Use this skill whenever the user is working with the `gpx` command-line tool from the EGObox project. Triggers on any mention of: the gpx CLI, `gpx fit`, `gpx predict`, `gpx qa`, `gpx spec`, `gpx py`, training a surrogate model from CSV or npy files on the command line, assessing GP model quality from the terminal, generating a Python helper from a saved .gpx/.bin/.json model, or using gpx to run inference on tabular data without writing Python code. Also use when the user wants to inspect or u…
Install
npx vskill@latest install relf/egobox/egobox-gpx-cliSKILL.md
EGObox gpx CLI Skill
gpx is a standalone command-line tool bundled with the egobox Python package (≥ 0.37.6). It lets you fit, inspect, evaluate and run GP surrogate models entirely from the shell — no Python code required.
Installation
gpx ships with the Python package:
Alternatively, install the standalone binary directly:
Subcommands Overview
| Subcommand | Purpose | |
|---|---|---|
fit | Train a GP surrogate from a CSV or npy data file | |
spec | Inspect a saved model's input/output dimensions and configuration | |
qa | Assess predictive quality (Q2, PVA, IAEalpha) via LOO or k-fold CV | |
predict | Run inference on new input samples; writes CSV or npy | |
py | Generate a self-contained Python helper script with the model embedded |
Data File Formats
gpx accepts two tabular formats, auto-detected by file extension:
| Format | Extension | Notes | |
|---|---|---|---|
| CSV | .csv | One row per sample, comma-separated, optional header row (skipped) | |
| NumPy | .npy | 2D float64 array saved with np.save() |
Training file layout (fit): columns are [x1, x2, ..., xn, y1, y2, ..., ym]. By default the last 1 column is treated as output; use --outputs N for multi-output.
Predict input file: columns are just inputs [x1, x2, ..., xn].
gpx fit — Train a Surrogate
Arguments:
<INPUT>— training data file (CSV or npy)
Key options:
| Flag | Default | Description | |
|---|---|---|---|
--outputs N | 1 | Number of output columns taken from the end of each row | |
--regression-spec | constant | constant, linear, quadratic, all | |
--correlation-spec | squared-exponential | squared-exponential, absolute-exponential, matern32, matern52, all | |
--kpls-dim N | (none) | PLS dimension reduction to N components; recommended when input dim ≥ 9 | |
--n-clusters N | 1 | Number of local expert clusters (mixture of GPs) | |
--recombination | smooth | smooth or hard — how experts are combined | |
-o, --output FILE | surrogate_model.gpx | Output model file path |
Examples:
gpx spec — Inspect a Model
Shows: surrogate type, input/output dimensions, supported I/O formats, expected array shapes, training data summary.
Model file sources — gpx can read models saved by:
gpx fit→.gpxbinary- Python
egx.Gpx.save("model.json")→.json - Egor optimizer
outdir→egor_gp.bin,egor_initial_gp.bin
gpx qa — Quality Assessment
Reports three metrics (computed on training data via leave-one-out by default, or k-fold):
| Metric | Goal | Meaning | |
|---|---|---|---|
| Q2 | Maximise, close to 1 | Predictive accuracy (like R²). Q2 ≤ 0.5 is poor. | |
| PVA | Minimise, close to 0 | Predictive Variance Adequacy — are uncertainty estimates well-calibrated? | |
| IAEalpha | Minimise, in [0, 0.5] | Interval reliability — trustworthiness of prediction intervals |
Also prints an alpha/empirical coverage table (the α-PI plot).
gpx predict — Run Inference
Arguments:
<INPUT>— input samples file (CSV or npy, shape(n_samples, input_dim))
Key options:
| Flag | Default | Description | |
|---|---|---|---|
--model FILE | surrogate_model.gpx | Model file | |
-o, --output FILE | surrogate_predictions.csv | Output file; extension sets format (.csv or .npy) | |
--with-variance | off | Also output predictive variance alongside the mean | |
-m, --model-index N | (all) | Predict only surrogate N from a multi-output model |
Output layout:
| Format | Columns (CSV) / Shape (npy) | |
|---|---|---|
| CSV, no variance | x1,...,xn, y_pred1,...,y_predm | |
| CSV, with variance | x1,...,xn, y_pred1,...,y_predm, y_var1,...,y_varm | |
| npy, no variance | (n_samples, n_outputs) | |
| npy, with variance | (n_samples, 2 * n_outputs) — predictions then variances interleaved |
gpx py — Generate a Python Helper Script
Embeds the model as a hex-encoded string and generates a pure-Python predict() function. The generated script calls the gpx binary under the hood, so gpx must be in PATH.
The generated script exposes:
Import and use it like any Python function — no need to manage model files separately:
Typical Workflows
Train → Inspect → Predict
Inspect a Model from Egor Optimizer
When Egor is run with outdir, it saves GP models alongside the DOE:
Export Surrogate for Deployment
Common Pitfalls
- Header row in CSV:
gpxskips the first row if it contains non-numeric data (auto-detected). No explicit flag needed. - Column order matters: outputs must be the last N columns.
--outputs Ncounts from the end. - npy files must be 2D: use
np.save()with an array of shape(n_samples, n_dims), not 1D. - Model file extension doesn't matter:
gpxdetects format by content, not extension (.gpx,.bin,.jsonall work). - `gpx py` needs `gpx` in PATH at runtime: the generated script shells out to the
gpxbinary.
Quick Reference
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpython/skills/egobox-gpx-cli/SKILL.md
Popularity
- Repository stars
- 193
- Repository forks
- 13
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Sep 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/relf/egobox/egobox-gpx-cli)