Guide for writing skills that wrap CLI tools. Use when creating a new CLI skill. For review, run through the Checklist section.
56
62%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./writing-cli-skills/SKILL.mdHow to write an agent skill for a command-line tool.
--help on every subcommandreferences/template.md to your new skill directory# 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.
--help output verbatim — summarize the useful partsEvery CLI skill needs at minimum:
| Section | Purpose |
|---|---|
| Frontmatter | name, description (with trigger phrases) |
| Installation | How to get the binary |
| Usage | The 80% use cases |
| 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 |
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.Group by task, not by command name:
## Usage
### View / List
### Create / Add
### Edit / Update
### Delete / Remove
### SearchKeep 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 scripts---
name: tool-name # Required, matches directory
description: What + when # Required, include triggers
---Before publishing a CLI skill:
tool --version)See references/template.md for a complete starting point.
40067f1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.