supercli-mastery
Skill53 starsChanged 5 months agoMITView on GitHub
Master the supercli capability router. Covers the full agent workflow — discover plugins, inspect commands, preview with plan, execute safely, use skills, interpret output and exit codes.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cavemanSkill
- context-modeSkill
- diagnoseSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- humanenv-usageSkill
- improve-codebase-architectureSkill
- prototypeSkill
- setup-matt-pocock-skillsSkill
- supercli-docs-devSkill
- supercli-mcp-devSkill
- tddSkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- write-a-skillSkill
- zoom-outSkill
- playwright-cliSkill
- supercli.quickstartSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
All commands return JSON when --json is used (or by default in non-TTY):
- Distinctive: line 109
Use plan before any command that modifies state.
- Very specific: line 133
Always use --json for machine-readable output:
- Distinctive: line 180
When you don't know a command's namespace:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
supercli-mastery — Agent's Guide to SuperCLI
What SuperCLI Is
SuperCLI is a capability router. It wraps external CLIs (plugins) behind a uniform namespace.resource.action command model. Every command follows the same pattern:
sc <namespace> <resource> <action> --<arg> <value> --jsonThe workflow is: discover → learn → inspect → plan → execute
Core Capabilities
| Capability | Description |
commands | Query available commands |
plugins | Plugin management and discovery |
skills | Agent-facing skill documents |
inspect | View command schema |
plan | Preview execution steps before running |
ask | LLM suggests which commands to run (no execution) |
mcp | Model Context Protocol adapter |
Output Conventions
All commands return JSON when --json is used (or by default in non-TTY):
sc <ns> <res> <act> --json
→ { "version": "1.0", "command": "ns.res.act", "data": {...} }- stdout: Primary data (JSON envelope)
- stderr: Progress events, warnings, structured errors
- Exit code 0: Success
Semantic Exit Codes
| Code | Meaning | Agent action |
| 0 | Success | Proceed |
| 82 | Validation error | Fix input arguments |
| 85 | Invalid argument | Fix the args, don't retry |
| 91 | Safety violation | Non-TTY interactive command blocked |
| 92 | Resource not found | Use different ID/name |
| 105 | Integration / API error | Retry with backoff (transient) |
| 110 | Internal error | Report bug, don't retry |
Range convention (Square-style): 80-89 input errors, 90-99 resource errors, 100-109 integration errors, 110-119 internal errors. Currently implemented codes listed above; unused slots reserved for future granularity.
Agent Workflow
1. Discover — Find what's available
sc --json
# → lists first_steps with {command, purpose} pairs
sc commands --query backup --limit 50 --json
# → { commands: [{ namespace, resource, action, description }] }
sc plugins explore --name <tool> --json
# → { plugins: [{ name, description, tags, installed }] }2. Learn — Understand a plugin
sc plugins learn <name> --json
# → plugin metadata, commands, install guidance
sc skills get <name> --json
# → agent-facing SKILL.md content for that tool3. Inspect — See a command's schema before using it
sc inspect <namespace> <resource> <action> --json
# → { namespace, resource, action, args: [{name, type, required, positional}], adapterConfig }Inspect tells you:
- Which
--flagsare required vs optional - Which args are positional (marked
"positional": true) - The adapter type (process, http, mcp, shell)
- Timeout and safety settings
4. Plan — Preview before executing mutations
sc plan <namespace> <resource> <action> --<args> --json
# → { plan_id, command, steps, risk_level, side_effects, persisted }plan does NOT execute — it returns a plan document showing:
- The 4 execution steps (resolve → validate → adapter → transform)
risk_level: "safe" for reads, "medium" for mutationsside_effects: true for write operations
Use plan before any command that modifies state.
5. Execute — Run commands
# Direct execution (no server)
sc <namespace> <resource> <action> --<arg> <value> --json
# Or via persisted plan (with SUPERCLI_SERVER)
sc plan <ns> <res> <act> --<args> --json
sc execute <plan_id> --jsonAsk — LLM suggests a plan
sc ask "send an email to user@example.com"
# → { mode: "ask_suggest", suggested_steps: [{ command, args, dry_run }] }ask uses an LLM to map natural language to supercli commands. It NEVER executes — returns suggestions with dry_run strings you can choose to run.
Working with Output
Always use --json for machine-readable output:
# Pipe to jq for extraction
sc commands --query backup --json | jq '.commands[].namespace'
# Chain commands
sc easyredmine issue search "correction" --current-month | \
jq -r '.results[].id' | \
xargs -I {} sc easyredmine issue show {} --jsonError responses are always on stderr:
sc nonexistent command --json
# stderr: {"error":{"code":92,"type":"resource_not_found","message":"...","recoverable":false,"suggestions":["Run: supercli commands"]}}Token Optimization
For large outputs (50+ files, long command results), use context-mode:
sc mcp call --mcp-server context-mode --tool ctx_batch_execute --input-json '...' --jsonSee sc skills get context-mode:quickstart --json for context-mode usage.
Skills System
Skills are agent-facing documents that teach you how to use tools:
sc skills sync --json # index all skills
sc skills list --catalog --limit 10 # browse
sc skills search --query <topic> # find by topic
sc skills get <id> # read a skillSkills come from:
- plugin_fs: Bundled with supercli plugins (
plugins/<name>/skills/quickstart/SKILL.md) - local_fs: From provider-scanned directories (e.g.
~/.config/opencode/skills/) - supercli: Built-in skills shipped with the supercli package itself
Navigation Pattern
When you don't know a command's namespace:
# 1. Browse capabilities
sc --json
# 2. Search commands
sc commands --query <keyword> --json
# 3. Inspect the most promising match
sc inspect <ns> <res> <act> --json
# 4. Plan if it's a write operation
sc plan <ns> <res> <act> --args
# 5. Execute
sc <ns> <res> <act> --args --jsonKey Principles
--jsoneverywhere — all commands support it- Plan before write — use
planfor any command that might have side effects - Inspect before run — check
argsandpositionalmarkers in inspect output - Errors are structured — always on stderr with
code,type,recoverable,suggestions - Skills teach you — if you don't know a tool,
sc skills search --query <tool> - Exit codes drive decisions — 85=fix args, 92=try different resource, 105=retry
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

