问题 - 原有代码使用相对路径 (cd reference &&) - skill 安装在 ~/.claude/skills/ 后相对路径会失效 修复 - 所有文件操作使用绝对路径: ~/.claude/skills/command-guide/reference/ - CLI 命令改用 --include-directories 参数指向绝对路径 - 更新示例输出中的路径为绝对路径 影响 - handleSimpleQuery: basePath 使用绝对路径 - locateCommandFile: 使用 basePath 参数 - executeCLIAnalysis: 使用 --include-directories 替代 cd - resolveEntityPath: glob 使用绝对路径 - buildCLIPrompt: CONTEXT 使用 @**/* + --include-directories 版本更新 - v1.3.0 → v1.3.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
10 KiB
name, description, allowed-tools
| name | description | allowed-tools |
|---|---|---|
| command-guide | Workflow command guide for Claude DMS3 (69 commands). Search/browse commands, get next-step recommendations, view documentation, report issues. Triggers "CCW-help", "CCW-issue", "ccw-help", "ccw-issue", "ccw" | Read, Grep, Glob, AskUserQuestion |
Command Guide Skill
Comprehensive command guide for Claude DMS3 workflow system covering 69 commands across 4 categories (workflow, cli, memory, task).
🎯 Operation Modes
Mode 1: Command Search 🔍
When: User searches by keyword, category, or use-case
Triggers: "搜索命令", "find command", "planning 相关", "search"
Process:
- Identify search type (keyword/category/use-case)
- Query appropriate index (all-commands/by-category/by-use-case)
- Return matching commands with metadata
- Suggest related commands
Example: "搜索 planning 命令" → Lists planning commands from index/by-use-case.json
Mode 2: Smart Recommendations 🤖
When: User asks for next steps after a command
Triggers: "下一步", "what's next", "after /workflow:plan", "推荐"
Process:
- Parse current context (last command/workflow state)
- Query
index/command-relationships.json - Return recommended next commands with rationale
- Show common workflow patterns
Example: "执行完 /workflow:plan 后做什么?" → Recommends /workflow:execute or /workflow:action-plan-verify
Mode 3: Full Documentation 📖
When: User requests command details
Triggers: "参数说明", "怎么用", "how to use", "详情"
Process:
- Locate command in
index/all-commands.json - Read original command file for full details
- Present parameters, arguments, examples
- Link to related commands
Example: "/workflow:plan 的参数是什么?" → Shows full parameter list and usage examples
Mode 4: Beginner Onboarding 🎓
When: New user needs guidance
Triggers: "新手", "getting started", "如何开始", "常用命令"
Process:
- Present progressive learning path
- Show
index/essential-commands.json(Top 14 commands) - Link to getting-started guide
- Provide first workflow example
Example: "我是新手,如何开始?" → Learning path + Top 14 commands + quick start guide
Mode 5: Issue Reporting 📝
When: User wants to report issue or request feature
Triggers: "CCW-issue", "CCW-help", "ccw-issue", "ccw-help", "ccw", "报告 bug", "功能建议", "问题咨询", "交互式诊断"
Process:
- Use AskUserQuestion to confirm type (diagnosis/bug/feature/question)
- Collect required information interactively with execution flow emphasis
- Select appropriate template:
issue-diagnosis.md- Full diagnostic workflow with decision treeissue-bug.md- Bug report with complete command historyissue-feature.md- Feature request with current workflow analysisissue-question.md- Question with detailed attempt history
- Generate filled template with privacy-protected command history
- Save/display with troubleshooting guidance
Example: "CCW-issue" → Interactive Q&A → Generates GitHub issue template with full execution context
🆕 Enhanced Features:
- Complete command history with privacy protection
- Interactive diagnostic checklists
- Decision tree navigation (diagnosis template)
- Execution environment capture
Mode 6: Deep Command Analysis 🔬
When: User asks detailed questions about specific commands or agents
Triggers: "详细说明", "命令原理", "agent 如何工作", "实现细节", specific command/agent name mentioned
Data Sources:
reference/agents/*.md- All agent documentation (11 agents)reference/commands/**/*.md- All command documentation (69 commands)
Process:
Simple Query (direct documentation lookup):
- Identify target command/agent from user query
- Locate corresponding markdown file in
reference/ - Read and extract relevant sections
- Present formatted response with examples
Complex Query (CLI-assisted analysis):
- Detect complexity indicators (多个命令对比、工作流程分析、最佳实践)
- Construct analysis prompt for gemini/qwen:
Note: Use absolute path
gemini -p " PURPOSE: Analyze command documentation to answer user query TASK: [extracted user question with context] MODE: analysis CONTEXT: @**/* EXPECTED: Comprehensive answer with examples and recommendations RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt) | Focus on practical usage | analysis=READ-ONLY " -m gemini-3-pro-preview-11-2025 --include-directories ~/.claude/skills/command-guide/reference~/.claude/skills/command-guide/referencefor reference documentation access - Return CLI analysis results to user
Query Classification:
- Simple: Single command explanation, parameter list, basic usage
- Complex: Cross-command workflows, performance comparison, architectural analysis, best practices across multiple commands
Examples:
Simple Query:
User: "action-planning-agent 如何工作?"
→ Read reference/agents/action-planning-agent.md
→ Extract workflow, capabilities, examples
→ Present structured response
Complex Query:
User: "对比 workflow:plan 和 workflow:tdd-plan 的使用场景和最佳实践"
→ Detect: 多命令对比 + 最佳实践
→ Use gemini analysis on reference/commands/workflow/
→ Return comprehensive comparison with workflow examples
📚 Index Files
All command metadata is stored in JSON indexes for fast querying:
- all-commands.json - Complete catalog (69 commands) with full metadata
- by-category.json - Hierarchical organization (workflow/cli/memory/task)
- by-use-case.json - Grouped by scenario (planning/implementation/testing/docs/session)
- essential-commands.json - Top 14 most-used commands
- command-relationships.json - Next-step recommendations and dependencies
📖 Detailed structure: Index Structure Reference
🗂️ Supporting Guides
- Getting Started - 5-minute quickstart for beginners
- Workflow Patterns - Common workflow examples (Plan→Execute, TDD, UI design)
- CLI Tools Guide - Gemini/Qwen/Codex usage
- Troubleshooting - Common issues and solutions
- Implementation Details - Detailed logic for each mode
- Usage Examples - Example dialogues and edge cases
📦 Reference Documentation
Complete backup of all command and agent documentation for deep analysis:
- reference/agents/ - 11 agent markdown files with implementation details
- reference/commands/ - 69 command markdown files organized by category
cli/- CLI tool commands (9 files)memory/- Memory management commands (8 files)task/- Task management commands (4 files)workflow/- Workflow commands (46 files)
Installation Path: ~/.claude/skills/command-guide/ (skill designed for global installation)
Absolute Reference Path: ~/.claude/skills/command-guide/reference/
Usage: Mode 6 queries these files directly for detailed command/agent analysis, or uses CLI tools (gemini/qwen) with absolute paths for complex cross-command analysis.
🛠️ Issue Templates
Generate standardized GitHub issue templates with execution flow emphasis:
- Interactive Diagnosis - 🆕 Comprehensive diagnostic workflow with decision tree, checklists, and full command history
- Bug Report - Report command errors with complete execution flow and environment details
- Feature Request - Suggest improvements with current workflow analysis and pain points
- Question - Ask usage questions with detailed attempt history and context
All templates now include:
- ✅ Complete command history sections (with privacy protection)
- ✅ Execution environment details
- ✅ Interactive problem-locating checklists
- ✅ Structured troubleshooting guidance
Templates are auto-populated during Mode 5 (Issue Reporting) interaction.
📊 System Statistics
- Total Commands: 69
- Total Agents: 11
- Categories: 4 (workflow: 46, cli: 9, memory: 8, task: 4, general: 2)
- Use Cases: 5 (planning, implementation, testing, documentation, session-management)
- Difficulty Levels: 3 (Beginner, Intermediate, Advanced)
- Essential Commands: 14
- Reference Docs: 80 markdown files (11 agents + 69 commands)
🔧 Maintenance
Updating Indexes
When commands are added/modified/removed:
bash scripts/update-index.sh
This script:
- Scans all command files in
../../commands/ - Extracts metadata from YAML frontmatter
- Analyzes command relationships
- Regenerates all 5 index files
Committing Updates
git add .claude/skills/command-guide/index/
git commit -m "docs: update command indexes"
git push
Team members get latest indexes via git pull.
📖 Related Documentation
- Workflow Architecture - System design overview
- Intelligent Tools Strategy - CLI tool selection
- Context Search Strategy - Search patterns
- Task Core - Task system fundamentals
Version: 1.3.1 (Path configuration for global installation) Last Updated: 2025-11-06 Maintainer: Claude DMS3 Team
Changelog v1.3.1:
- ✅ Updated all paths to use absolute paths (
~/.claude/skills/command-guide/) - ✅ CLI commands now use
--include-directorieswith absolute reference path - ✅ Ensures skill works correctly when installed in
~/.claude/skills/
Changelog v1.3.0:
- ✅ Added Mode 6: Deep Command Analysis with CLI-assisted queries
- ✅ Created reference documentation backup (80 files: 11 agents + 69 commands)
- ✅ Support simple queries (direct file lookup) and complex queries (CLI analysis)
- ✅ Integrated gemini/qwen for cross-command analysis and best practices
Changelog v1.2.0:
- ✅ Added Interactive Diagnosis template with decision tree
- ✅ Enhanced all templates with complete command history sections
- ✅ Added privacy protection guidelines for sensitive information
- ✅ Integrated execution flow emphasis across all issue templates