From claude-code-meta
This skill should be used when the user asks to "create skill for CLI tool", "document CLI tool", "create skill for docker", "create skill for kubectl", "document command-line tool", "create CLI guidance", "build skill for terminal commands", "introspect CLI tool", "create skill from help text", or needs to systematically introspect CLI tools through help text, man pages, GitHub repositories, and online research, then organize findings into effective skill documentation with proper mental model, command reference, and workflow patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-meta:cli-skill-creatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides the creation of comprehensive skills for command-line interface (CLI) tools. It provides a systematic workflow for introspecting CLI tools through multiple sources (help text, manual pages, GitHub repositories, online research), extracting mental models and command patterns, and organizing findings into effective skill documentation using the skill-creator skill.
This skill guides the creation of comprehensive skills for command-line interface (CLI) tools. It provides a systematic workflow for introspecting CLI tools through multiple sources (help text, manual pages, GitHub repositories, online research), extracting mental models and command patterns, and organizing findings into effective skill documentation using the skill-creator skill.
Invoke this skill when users:
Creating a CLI skill follows a systematic seven-step process that gathers comprehensive information before organizing it into skill documentation.
Objectives:
Actions:
Check installation and version
<cli-tool> --version
which <cli-tool>
Identify tool characteristics
Locate documentation sources
Output: Tool profile including version, purpose, and available documentation sources.
Objectives:
Reference: Load references/help-text-patterns.md for detailed parsing guidance.
Actions:
Extract top-level help
<cli-tool> --help
<cli-tool> -h
<cli-tool> help
<cli-tool> # (no args, if applicable)
Map command hierarchy
Document each command/subcommand
# For each discovered command
<cli-tool> <command> --help
<cli-tool> <command> <subcommand> --help
Extract key information
Identify patterns
Output: Structured command reference with hierarchy, all commands documented, examples extracted, and patterns identified.
Objectives:
Reference: Load references/help-text-patterns.md section "GitHub Repository Analysis" for detailed guidance.
Actions:
Clone repository (if accessible and reasonable size)
git clone --depth 1 https://github.com/<org>/<repo>
Examine documentation structure
Analyze code structure
Review tests for usage patterns
Mine issues and discussions
label:question - Common user questionslabel:documentation - Doc gapsCheck shell completions (reveal command structure)
Output: Implementation insights, real-world usage examples, common pain points, and undocumented behaviors.
Objectives:
Reference: Load references/help-text-patterns.md section "Manual Page Parsing" for detailed guidance.
Actions:
Check man page availability
man <cli-tool>
man -k <cli-tool> # Search for related pages
Extract key sections
Export for analysis
# Export to plain text
man <cli-tool> | col -b > man_<cli-tool>.txt
# Extract specific sections
man <cli-tool> | grep -A 50 "^OPTIONS"
man <cli-tool> | grep -A 30 "^EXAMPLES"
Check for subcommand man pages
man <cli-tool>-<subcommand>
Output: Formal command documentation, comprehensive option descriptions, and usage examples from man pages.
Objectives:
Actions:
Search for official documentation
Find community resources
Check Q&A sites
Identify integration patterns
Look for comparisons
Output: Community best practices, common workflows, integration patterns, and ecosystem understanding.
Objectives:
Reference: Load references/skill-templates.md for guidance.
Actions:
Extract core mental model
Identify command structure pattern
Map common workflows
Organize findings by category
Choose skill structure (load references/skill-templates.md)
Decide what goes where
Output: Structured content outline organized by user task/workflow, clear mental model summary, and skill structure plan.
Objectives:
Actions:
Prepare structured brief for skill-creator
Organize all gathered material into a comprehensive brief including:
CLI Profile
Core Mental Model
Command Reference Material
Workflow Patterns
Integration Points
Configuration
Troubleshooting
Invoke skill-creator skill
Use the Skill tool to invoke skill-creator:
Skill: skill-creator
Prompt: Create a skill for <cli-tool-name> with the following structure and content:
[Provide the complete structured brief from step 1]
Structure the skill using [workflow-based/command-based/hybrid] approach.
The skill.md should include:
- Overview and when to use this skill
- Core concepts: [list key concepts]
- Common operations organized by [category structure]
- Reference to comprehensive command reference in references/
Create references/<tool>_reference.md with:
- Complete mental model explanation
- Full command reference organized by [organization scheme]
- Workflow patterns 1-N
- Configuration, integration, and troubleshooting sections
Follow the patterns from existing CLI skills like gh, graphite, and erk.
Review generated skill
Iterate if needed
Package skill (if ready for distribution)
python scripts/package_skill.py .claude/skills/<cli-tool-name>
Output: Complete, packaged skill ready for use and distribution.
Progressive help discovery:
Information extraction:
-h for --help)Pattern recognition:
<required> vs [optional]--json, --plain, --formatLoad references/help-text-patterns.md for comprehensive parsing guidance including regex patterns, format variations, and special cases.
Quick reconnaissance:
Deep analysis:
Framework detection:
Different CLI frameworks reveal structure differently:
cmd/ directory with file per commandLoad references/help-text-patterns.md section "GitHub Repository Analysis" for detailed code reading strategies.
Ask these questions while introspecting:
Look for explicit mental model explanations:
Infer from command structure:
Load references/skill-templates.md for complete templates and examples.
Workflow-based (use when):
Command-based (use when):
Hybrid (use when - most common):
skill.md should contain:
references/_reference.md should contain:
Additional reference files (when needed):
Best practices:
Group by domain/resource (not alphabetically)
Order by frequency of use
Include for each command:
Use consistent formatting:
Pattern structure:
### Pattern N: <Descriptive-Name>
**Use case:** When to use this workflow
**Steps:**
1. <Step name>
<Explanation>
```bash
<command>
Complete example:
# <Scenario>
<full-workflow>
Variations: Alternative approaches
**Pattern best practices:**
- Start with most common workflows
- Show realistic examples (not foo/bar)
- Include expected output
- Note side effects or state changes
- Link to related patterns
- Mention prerequisites
Load `references/skill-templates.md` for complete workflow pattern template and examples.
## Integration with skill-creator
This skill gathers and organizes CLI material, then delegates to skill-creator for actual skill generation.
**Workflow:**
1. **cli-skill-creator**: Introspects CLI, extracts patterns, organizes material
2. **Handoff**: Provides structured brief to skill-creator
3. **skill-creator**: Generates skill files, validates, packages
**Structured brief format:**
Provide skill-creator with:
- CLI profile (name, version, purpose, structure pattern)
- Core mental model (concepts, terminology)
- Organized command reference material
- Workflow patterns
- Integration points
- Configuration and troubleshooting
**Invocation:**
Use the Skill tool:
Skill: skill-creator
Create a skill for using the following material: [Complete structured brief]
Use [workflow-based/command-based/hybrid] structure. Follow patterns from gh/graphite/erk skills.
**Advantages of this approach:**
- Separates introspection from generation
- Leverages skill-creator's validation and packaging
- Maintains consistency with other skills
- Allows iterative refinement
## Tips for Different CLI Types
### Modern Subcommand CLIs (gh, docker, kubectl)
**Focus on:**
- Clear command hierarchy
- Workflow patterns (most important)
- Integration with ecosystems
- Progressive examples
**Structure:** Hybrid (workflows + command reference)
### Simple Utility CLIs (jq, curl, grep)
**Focus on:**
- Core functionality explanation
- Common use cases
- Piping and composition
- Flag combinations
**Structure:** Command-based or simple workflow
### API-Wrapper CLIs (aws, gcloud, heroku)
**Focus on:**
- API mapping
- Authentication patterns
- JSON output handling
- Rate limiting
**Structure:** Command-based with workflow patterns
### Legacy CLIs (tar, find, sed)
**Focus on:**
- Modern usage patterns (not all historical options)
- Common gotchas
- Modern alternatives context
- Safety warnings
**Structure:** Workflow-based (guide away from dangerous patterns)
## Quality Checklist
Before finalizing CLI skill:
- [ ] Captured all major commands and subcommands
- [ ] Documented 5-10 common workflow patterns
- [ ] Extracted core mental model clearly
- [ ] Organized by user task (not alphabetically)
- [ ] Included realistic examples with output
- [ ] Noted integration points
- [ ] Documented common gotchas
- [ ] Verified commands actually work
- [ ] Noted CLI version documented
- [ ] Linked to authoritative documentation
- [ ] Followed structure of gh/graphite/erk skills
- [ ] skill.md is concise (<300 lines)
- [ ] references/ contains comprehensive details
## Common Pitfalls
**Avoid:**
1. **Alphabetical organization** - Organize by task/domain instead
2. **Exhaustive flag documentation** - Link to help, show common flags only
3. **Missing mental model** - Always explain how to think about the tool
4. **No workflow patterns** - Users need task-oriented guidance
5. **Untested examples** - Verify all commands actually work
6. **Version agnostic** - Note which version was documented
7. **Missing integration points** - Document how it works with other tools
8. **Poor skill.md description** - Be specific about when to use skill
## Resources
### references/
This skill includes two comprehensive reference documents:
- **help-text-patterns.md** - Practical guidance for parsing help text, man pages, and GitHub repositories. Load when introspecting CLI tools for comprehensive information extraction.
- **skill-templates.md** - Reusable templates for skill structure, command reference, workflows, and sections. Load when organizing material and structuring skill documentation.
**Loading strategy:**
- Load `help-text-patterns.md` during introspection steps (Steps 2-4)
- Load `skill-templates.md` during organization and structure design (Step 6)
These references ensure consistent, comprehensive CLI skill creation following modern best practices.
npx claudepluginhub j2h4u/oh-my-claude-plugins --plugin claude-code-metaCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.