writing-cli-skills
Skill49 starsChanged 6 months agoMITView on GitHub
Use when authoring an agent skill that wraps a command-line tool — covers hands-on tool exploration, required vs. recommended sections, installation/usage structure, trigger-rich descriptions, task-grouped commands, progressive disclosure, and a pre-publish checklist. Triggers for CLI / command-line / terminal / shell-command tools and binary wrappers; for review, run the Checklist section.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- coding-standardsSkill
- coolify-composeSkill
- crafting-effective-readmesSkill
- diataxisSkill
- english-pleaseSkill
- feature-planning-artifactsSkill
- frontend-design-principlesSkill
- grug-brained-devSkill
- html-artifactsSkill
- improveSkill
- improving-promptsSkill
- jjSkill
- reducing-entropySkill
- researching-codebasesSkill
- roadmapSkill
- roadmap-to-improve-plansSkill
- rustSkill
- salsaSkill
- skill-authoringSkill
- strategic-roadmapSkill
- svelte5Skill
- sveltekitSkill
- writing-error-messagesSkill
- writing-plansSkill
- writingSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Run --help on every subcommand
- Distinctive: line 18
Delete sections that don't apply
- Very specific: line 43
Do not dump --help output verbatim — summarize the useful parts
- Distinctive: line 44
Do not document every flag — focus on the 80% use cases
- Distinctive: line 45
Do not include commands you haven't tested
- Distinctive: line 46
Do not exceed 500 lines — this bloats agent context windows
- Distinctive: line 52
Every CLI skill needs at minimum:
- Very specific: line 101
Keep SKILL.md under ~500 lines.
- Distinctive: line 124
Before publishing a CLI skill:
≈ “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
Writing CLI Skills
How to write an agent skill for a command-line tool.
Quick Start
- Install the tool and play with it — don't just read docs. If the tool is unavailable, use WebFetch on official docs + man pages, but note this in your skill as "not hands-on verified"
- Run
--helpon every subcommand - Try the common operations yourself
- Note what surprises you or isn't obvious
- Copy
references/template.mdto your new skill directory - Fill in sections based on your hands-on experience
- Delete sections that don't apply
# First: actually use the tool
my-tool --help
my-tool subcommand --help
my-tool do-something # try it!
# Then: create the skill
# This will depend on the tool
# Claude Code
ln -s "$PWD/skills/my-tool" ~/.claude/skills/my-tool
# OpenCode
ln -s "$PWD/skills/my-tool" ~/.config/opencode/skills/my-tool
# Clawdbot
ln -s "$PWD/skills/my-tool" ~/clawd/skills/my-toolReading docs is no substitute for hands-on use. You'll discover defaults, gotchas, and real behavior that docs don't mention.
What NOT to Do
- Do not dump
--helpoutput verbatim — summarize the useful parts - Do not document every flag — focus on the 80% use cases
- Do not include commands you haven't tested
- Do not exceed 500 lines — this bloats agent context windows
Sections
Required
Every CLI skill needs at minimum:
| Section | Purpose |
| Frontmatter | name, description (with trigger phrases) |
| Installation | How to get the binary |
| Usage | The 80% use cases |
Recommended
| Section | When to Include |
| Requirements | Tool needs accounts, API keys, or dependencies |
| Quick Start | Tool has a simple "happy path" |
| Output Formats | Tool can output JSON or custom formats |
| Tips & Gotchas | Tool has some edge cases or things an agentic LLM should not use |
| Troubleshooting | Tool has debug modes or common failure modes |
| Configuration | Tool has config files or env vars |
| Uninstall | Tool leaves config/data behind |
| References | When there are useful docs or content that contains more details |
Writing Good Descriptions
Include trigger phrases so the agent knows when to load the skill:
# Good
description: Monitor RSS feeds for updates. Use when tracking blogs, checking for new posts, or building a feed reader workflow.
# Bad
description: RSS tool.Organizing Commands
Group by task, not by command name:
## Usage
### View / List
### Create / Add
### Edit / Update
### Delete / Remove
### SearchProgressive Disclosure
Keep SKILL.md under ~500 lines. Move details to references/:
my-tool/
├── SKILL.md # Core usage
├── references/
│ ├── advanced-config.md # Deep config docs
│ └── api-reference.md # API details
└── scripts/
└── helper.sh # Helper scriptsFrontmatter Reference
---
name: tool-name # Required, matches directory
description: What + when # Required, include triggers
---Checklist
Before publishing a CLI skill:
- Frontmatter has name + description with trigger phrases
- Installation covers target platforms
- Includes verification command (
tool --version) - Config file locations documented
- Required env vars listed
- Common operations in usage cover 80% of use cases
- Examples show realistic usage with sample output
- Output formats documented (if tool supports JSON/etc)
- Troubleshooting includes debug mode
- Uninstall cleans up config and data
- Under 500 lines (details in references/)
Template
See references/template.md for a complete starting point.
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.

