root-clilisted
Install: claude install-skill MohamedElashri/root-mcp
# ROOT CLI Skill
`root-cli` is a token-efficient CLI for CERN ROOT files. It replaces verbose MCP JSON
exchanges with terse, composable shell commands. Intermediate results (histograms, fits)
are cached as JSON under `/tmp/root_mcp/` and consumed by downstream commands.
## Setup
```bash
# Set data path once (or use -d per command)
export ROOT_MCP_DATA_PATH=/path/to/data
# Verify installation
root-cli info
```
All commands accept `--json` for machine-readable output piped into other tools.
---
## Command Reference
### File Operations
| Command | Purpose |
|---|---|
| `root-cli ls [pattern] [--limit N]` | List ROOT files in data dir |
| `root-cli inspect <file.root>` | Show TTrees, RNTuples, histograms, directories |
| `root-cli inspect <file.root>` | Show TTrees, histograms, directories |
| `root-cli branches <file.root> <tree> [-p pattern] [-s]` | List branches + types; `-s` adds stats |
| `root-cli validate <file.root>` | Check file integrity |
### Data Access
| Command | Purpose |
|---|---|
| `root-cli stats <file.root> <tree> <branches...> [-s cut]` | mean/std/min/max/median |
| `root-cli read <file.root> <tree> <branches...> [-s cut] [-l N] [--flatten] [-d name=expr]` | Read raw data |
| `root-cli sample <file.root> <tree> [--size N] [--method first\|random]` | Quick sample |
| `root-cli export <file.root> <tree> <branches...> -o out [-s cut] [--format csv\|json\|parquet]` | Export data |
**Cut syntax**: C++ expressions — `"pt > 20 && abs(eta) < 2.4"`, `"n_jet