joshuadavidthomas/agent-skills

writing-cli-skills

Use when authoring an agent skill that wraps a command-line tool — covers hands-on tool exploration, required vs.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/joshuadavidthomas/agent-skills --skill writing-cli-skills

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Writing CLI Skills

How to write an agent skill for a command-line tool.

Quick Start

  1. 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"
  2. Run --help on every subcommand
  3. Try the common operations yourself
  4. Note what surprises you or isn't obvious
  5. Copy references/template.md to your new skill directory
  6. Fill in sections based on your hands-on experience
  7. Delete sections that don't apply
bash
# 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-tool

Reading 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 --help output 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:

SectionPurpose
Frontmattername, description (with trigger phrases)
InstallationHow to get the binary
UsageThe 80% use cases

Recommended

SectionWhen to Include
RequirementsTool needs accounts, API keys, or dependencies
Quick StartTool has a simple "happy path"
Output FormatsTool can output JSON or custom formats
Tips & GotchasTool has some edge cases or things an agentic LLM should not use
TroubleshootingTool has debug modes or common failure modes
ConfigurationTool has config files or env vars
UninstallTool leaves config/data behind
ReferencesWhen 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:

yaml
# 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:

markdown
## Usage

### View / List
### Create / Add  
### Edit / Update
### Delete / Remove
### Search

Progressive 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 scripts

Frontmatter Reference

yaml
---
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.

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills
joshuadavidthomas
コミュニティ

english-please

Dude, come on. You write at the density of your own thinking and leave the reader to unpack it. Apply whenever explaining anything to a human — not just end-of-run summaries, every message.

導入数
1
GitHub Stars
56
更新日
7月20日
joshuadavidthomas
コミュニティ

frontend-design-principles

Use when building or reviewing frontend UI — dashboards, admin panels, landing pages, marketing sites, web apps. Drives domain-specific design decisions (typography, color world, layout, CSS token naming, depth and spacing systems) instead of generic AI defaults; routes to app.md (product/data UIs) or marketing.md (public/creative pages) by context.

導入数
1
GitHub Stars
56
更新日
7月20日
joshuadavidthomas
コミュニティ

grug-brained-dev

Use when reviewing PRs, simplifying over-engineered code, judging architecture, or renaming unclear concepts — inline fake helpers, delete meatless ceremony, rename lying names, merge over-split files, reject premature abstraction, say no to speculative config/modes/layers, then end with the smallest safe next change. Triggers when code is too fancy, too abstract, too clever, too many files/helpers/layers, or too well-factored but painful to change. Embody Grug brain: complexity very bad, small

導入数
1
GitHub Stars
56
更新日
7月20日
joshuadavidthomas
コミュニティ

improve

Survey a codebase as a senior advisor and turn the highest-value findings into implementation plans for other agents to execute — strictly read-only on source code, never implements anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, architecture, migrations, DX), suggest features or roadmap direction, or generate handoff plans for another agent to implement.

導入数
1
GitHub Stars
56
更新日
7月20日