重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/dagster-io/erk --skill cli-skill-creator本技能指导为命令行界面(CLI)工具创建全面的技能。它提供了一个系统化的工作流程,通过多种来源(帮助文本、手册页、GitHub 仓库、在线研究)来内省 CLI 工具,提取心智模型和命令模式,并使用 skill-creator 技能将发现组织成有效的技能文档。
当用户出现以下情况时,请调用此技能:
创建 CLI 技能遵循一个系统化的七步流程,该流程在将信息组织成技能文档之前收集全面的信息。
目标:
操作:
检查安装和版本
<cli-tool> --version
which <cli-tool>
识别工具特性
定位文档来源
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
输出: 包含版本、用途和可用文档来源的工具概况。
目标:
参考: 加载 references/help-text-patterns.md 以获取详细的解析指导。
操作:
提取顶级帮助
<cli-tool> --help
<cli-tool> -h
<cli-tool> help
<cli-tool> # (无参数,如果适用)
映射命令层次结构
记录每个命令/子命令
# 对于每个发现的命令
<cli-tool> <command> --help
<cli-tool> <command> <subcommand> --help
提取关键信息
识别模式
输出: 结构化的命令参考,包含层次结构、所有已记录的命令、提取的示例以及识别出的模式。
目标:
参考: 加载 references/help-text-patterns.md 中的 "GitHub Repository Analysis" 部分以获取详细指导。
操作:
克隆仓库(如果可访问且大小合理)
git clone --depth 1 https://github.com/<org>/<repo>
检查文档结构
分析代码结构
审查测试以了解使用模式
挖掘问题和讨论
label:question - 常见的用户问题label:documentation - 文档缺口检查 Shell 自动补全(揭示命令结构)
输出: 实现洞察、实际使用示例、常见痛点以及未记录的行为。
目标:
参考: 加载 references/help-text-patterns.md 中的 "Manual Page Parsing" 部分以获取详细指导。
操作:
检查手册页可用性
man <cli-tool>
man -k <cli-tool> # 搜索相关页面
提取关键部分
导出以供分析
# 导出为纯文本
man <cli-tool> | col -b > man_<cli-tool>.txt
# 提取特定部分
man <cli-tool> | grep -A 50 "^OPTIONS"
man <cli-tool> | grep -A 30 "^EXAMPLES"
检查子命令手册页
man <cli-tool>-<subcommand>
输出: 来自手册页的正式命令文档、全面的选项描述和使用示例。
目标:
操作:
输出: 社区最佳实践、常见工作流程、集成模式和生态系统理解。
目标:
参考: 加载 references/skill-templates.md 以获取指导。
操作:
references/skill-templates.md)
输出: 按用户任务/工作流程组织的结构化内容大纲、清晰的心智模型摘要和技能结构计划。
目标:
操作:
将所有收集到的材料组织成一份全面的简报,包括:
* **CLI 概况**
* 名称、版本、用途
* 命令结构模式
* 开源状态和 GitHub URL
* **核心心智模型**
* 基本概念(2-5 个关键概念)
* 用户应如何看待该工具
* 关键术语和定义
* **命令参考材料**
* 按类别/领域组织
* 所有命令及其语法和示例
* 常用标志和选项
* 命令关系
* **工作流程模式**
* 5-10 个常见工作流程
* 分步说明及命令
* 每种模式的使用时机
* **集成点**
* 与之协同工作的其他工具
* CI/CD 集成
* 文件格式、协议
* **配置**
* 配置文件位置
* 关键设置
* 环境变量
* **故障排查**
* 常见问题及解决方案
* 诊断命令
* 错误模式
2. 调用 skill-creator 技能
使用 Skill 工具调用 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.
3. 审查生成的技能 * 检查 skill.md 的结构和清晰度 * 验证参考文档的完整性 * 确保示例准确 * 如果可能,测试命令 4. 如有需要,进行迭代 * 优化不清晰的部分 * 添加缺失的示例 * 改进组织方式 * 填补文档缺口 5. 打包技能(如果准备好分发)
python scripts/package_skill.py .claude/skills/<cli-tool-name>
输出: 完整的、打包好的技能,可供使用和分发。
渐进式帮助发现:
信息提取:
-h 代表 --help)模式识别:
<必需> 与 [可选]--json、--plain、--format加载 references/help-text-patterns.md 以获取全面的解析指导,包括正则表达式模式、格式变体和特殊情况。
快速侦察:
深度分析:
框架检测:
不同的 CLI 框架以不同方式揭示结构:
cmd/ 目录,每个命令一个文件加载 references/help-text-patterns.md 中的 "GitHub Repository Analysis" 部分以获取详细的代码阅读策略。
在内省过程中询问以下问题:
寻找明确的心智模型解释:
从命令结构推断:
加载 references/skill-templates.md 以获取完整的模板和示例。
基于工作流程(适用于以下情况):
基于命令(适用于以下情况):
混合结构(适用于以下情况 - 最常见):
skill.md 应包含:
references/_reference.md 应包含:
额外的参考文件(需要时):
最佳实践:
模式结构:
### 模式 N: <描述性名称>
**使用场景:** 何时使用此工作流程
**步骤:**
1. <步骤名称>
<解释>
```bash
<命令>
2.
完整示例:
# <场景>
<完整工作流程>
变体: 替代方法
**模式最佳实践:**
- 从最常见的工作流程开始
- 展示真实的示例(非 foo/bar)
- 包含预期输出
- 注意副作用或状态变化
- 链接到相关模式
- 提及先决条件
加载 references/skill-templates.md 以获取完整的工作流程模式模板和示例。
此技能收集并组织 CLI 材料,然后委托给 skill-creator 进行实际的技能生成。
工作流程:
结构化简报格式:
向 skill-creator 提供:
调用:
使用 Skill 工具:
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.
此方法的优势:
关注点:
结构: 混合(工作流程 + 命令参考)
关注点:
结构: 基于命令或简单工作流程
关注点:
结构: 基于命令,附带工作流程模式
关注点:
结构: 基于工作流程(引导远离危险模式)
在最终确定 CLI 技能之前:
避免:
此技能包含两个全面的参考文档:
help-text-patterns.md - 解析帮助文本、手册页和 GitHub 仓库的实用指导。在内省 CLI 工具以进行全面的信息提取时加载。
skill-templates.md - 用于技能结构、命令参考、工作流程和小节的可重用模板。在组织材料和构建技能文档结构时加载。
加载策略:
help-text-patterns.mdskill-templates.md这些参考确保了遵循现代最佳实践的、一致的、全面的 CLI 技能创建。
每周安装次数
54
仓库
GitHub 星标数
74
首次出现
2026年1月29日
安全审计
安装于
codex54
claude-code53
github-copilot53
opencode52
kimi-cli52
gemini-cli52
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 gapsOutput: 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)
Output: Structured content outline organized by user task/workflow, clear mental model summary, and skill structure plan.
Objectives:
Actions:
Organize all gathered material into a comprehensive brief including:
* **CLI Profile**
* Name, version, purpose
* Command structure pattern
* Open source status and GitHub URL
* **Core Mental Model**
* Fundamental concepts (2-5 key concepts)
* How users should think about the tool
* Key terminology and definitions
* **Command Reference Material**
* Organized by category/domain
* All commands with syntax and examples
* Common flags and options
* Command relationships
* **Workflow Patterns**
* 5-10 common workflows
* Step-by-step with commands
* When to use each pattern
* **Integration Points**
* Other tools it works with
* CI/CD integration
* File formats, protocols
* **Configuration**
* Config file locations
* Key settings
* Environment variables
* **Troubleshooting**
* Common issues and solutions
* Diagnostic commands
* Error patterns
2. 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.
3. Review generated skill
* Check skill.md structure and clarity
* Verify reference documentation completeness
* Ensure examples are accurate
* Test commands if possible
4. Iterate if needed
* Refine unclear sections
* Add missing examples
* Improve organization
* Fill gaps in documentation
5. 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>
2.
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.
Weekly Installs
54
Repository
GitHub Stars
74
First Seen
Jan 29, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex54
claude-code53
github-copilot53
opencode52
kimi-cli52
gemini-cli52
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
50,200 周安装
Check shell completions (reveal command structure)
Decide what goes where