claude-all-hands 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/.claude/agents/code-simplifier.md +52 -0
  2. package/.claude/agents/curator.md +186 -246
  3. package/.claude/agents/documentation-taxonomist.md +255 -0
  4. package/.claude/agents/documentation-writer.md +366 -0
  5. package/.claude/agents/planner.md +123 -166
  6. package/.claude/agents/researcher.md +58 -41
  7. package/.claude/agents/surveyor.md +81 -0
  8. package/.claude/agents/worker.md +74 -0
  9. package/.claude/commands/continue.md +122 -0
  10. package/.claude/commands/create-skill.md +107 -0
  11. package/.claude/commands/create-specialist.md +111 -0
  12. package/.claude/commands/curator-audit.md +4 -0
  13. package/.claude/commands/debug.md +183 -0
  14. package/.claude/commands/docs-adjust.md +214 -0
  15. package/.claude/commands/docs-audit.md +172 -0
  16. package/.claude/commands/docs-init.md +210 -0
  17. package/.claude/commands/plan.md +199 -102
  18. package/.claude/commands/validate.md +11 -0
  19. package/.claude/commands/whats-next.md +106 -134
  20. package/.claude/envoy/README.md +5 -5
  21. package/.claude/envoy/envoy +11 -14
  22. package/.claude/envoy/package-lock.json +1594 -0
  23. package/.claude/envoy/package.json +38 -0
  24. package/.claude/envoy/src/cli.ts +126 -0
  25. package/.claude/envoy/src/commands/base.ts +216 -0
  26. package/.claude/envoy/src/commands/docs.ts +881 -0
  27. package/.claude/envoy/src/commands/gemini.ts +999 -0
  28. package/.claude/envoy/src/commands/git.ts +639 -0
  29. package/.claude/envoy/src/commands/index.ts +73 -0
  30. package/.claude/envoy/src/commands/knowledge.ts +178 -0
  31. package/.claude/envoy/src/commands/perplexity.ts +129 -0
  32. package/.claude/envoy/src/commands/plan/core.ts +134 -0
  33. package/.claude/envoy/src/commands/plan/findings.ts +446 -0
  34. package/.claude/envoy/src/commands/plan/gates.ts +672 -0
  35. package/.claude/envoy/src/commands/plan/index.ts +135 -0
  36. package/.claude/envoy/src/commands/plan/lifecycle.ts +648 -0
  37. package/.claude/envoy/src/commands/plan/plan-file.ts +138 -0
  38. package/.claude/envoy/src/commands/plan/prompts.ts +285 -0
  39. package/.claude/envoy/src/commands/plan/protocols.ts +166 -0
  40. package/.claude/envoy/src/commands/repomix.ts +99 -0
  41. package/.claude/envoy/src/commands/tavily.ts +220 -0
  42. package/.claude/envoy/src/commands/xai.ts +168 -0
  43. package/.claude/envoy/src/lib/ast-queries.ts +261 -0
  44. package/.claude/envoy/src/lib/design.ts +41 -0
  45. package/.claude/envoy/src/lib/feedback-schemas.ts +154 -0
  46. package/.claude/envoy/src/lib/findings.ts +215 -0
  47. package/.claude/envoy/src/lib/gates.ts +572 -0
  48. package/.claude/envoy/src/lib/git.ts +132 -0
  49. package/.claude/envoy/src/lib/index.ts +188 -0
  50. package/.claude/envoy/src/lib/knowledge.ts +646 -0
  51. package/.claude/envoy/src/lib/markdown.ts +75 -0
  52. package/.claude/envoy/src/lib/observability.ts +262 -0
  53. package/.claude/envoy/src/lib/paths.ts +130 -0
  54. package/.claude/envoy/src/lib/plan-io.ts +117 -0
  55. package/.claude/envoy/src/lib/prompts.ts +231 -0
  56. package/.claude/envoy/src/lib/protocols.ts +314 -0
  57. package/.claude/envoy/src/lib/repomix.ts +133 -0
  58. package/.claude/envoy/src/lib/retry.ts +138 -0
  59. package/.claude/envoy/src/lib/tree-sitter-utils.ts +301 -0
  60. package/.claude/envoy/src/lib/watcher.ts +167 -0
  61. package/.claude/envoy/src/types/tree-sitter.d.ts +76 -0
  62. package/.claude/envoy/tsconfig.json +21 -0
  63. package/.claude/hooks/scripts/enforce_research_fetch.py +1 -1
  64. package/.claude/hooks/scripts/scan_agents.py +62 -0
  65. package/.claude/hooks/scripts/scan_commands.py +50 -0
  66. package/.claude/hooks/scripts/scan_skills.py +46 -70
  67. package/.claude/hooks/scripts/validate_artifacts.py +128 -0
  68. package/.claude/hooks/startup.sh +26 -24
  69. package/.claude/protocols/bug-discovery.yaml +55 -0
  70. package/.claude/protocols/debugging.yaml +51 -0
  71. package/.claude/protocols/discovery.yaml +53 -0
  72. package/.claude/protocols/implementation.yaml +84 -0
  73. package/.claude/settings.json +38 -97
  74. package/.claude/skills/brainstorming/SKILL.md +54 -0
  75. package/.claude/skills/commands-development/SKILL.md +630 -0
  76. package/.claude/skills/commands-development/references/arguments.md +252 -0
  77. package/.claude/skills/commands-development/references/patterns.md +796 -0
  78. package/.claude/skills/commands-development/references/tool-restrictions.md +376 -0
  79. package/.claude/skills/discovery-mode/SKILL.md +108 -0
  80. package/.claude/skills/documentation-taxonomy/SKILL.md +287 -0
  81. package/.claude/skills/hooks-development/SKILL.md +332 -0
  82. package/.claude/skills/hooks-development/references/command-vs-prompt.md +269 -0
  83. package/.claude/skills/hooks-development/references/examples.md +658 -0
  84. package/.claude/skills/hooks-development/references/hook-types.md +463 -0
  85. package/.claude/skills/hooks-development/references/input-output-schemas.md +469 -0
  86. package/.claude/skills/hooks-development/references/matchers.md +470 -0
  87. package/.claude/skills/hooks-development/references/troubleshooting.md +587 -0
  88. package/.claude/skills/implementation-mode/SKILL.md +171 -0
  89. package/.claude/skills/knowledge-discovery/SKILL.md +178 -0
  90. package/.claude/skills/research-tools/SKILL.md +35 -33
  91. package/.claude/skills/skills-development/SKILL.md +192 -0
  92. package/.claude/skills/skills-development/references/api-security.md +226 -0
  93. package/.claude/skills/skills-development/references/be-clear-and-direct.md +531 -0
  94. package/.claude/skills/skills-development/references/common-patterns.md +595 -0
  95. package/.claude/skills/skills-development/references/core-principles.md +437 -0
  96. package/.claude/skills/skills-development/references/executable-code.md +175 -0
  97. package/.claude/skills/skills-development/references/iteration-and-testing.md +474 -0
  98. package/.claude/skills/skills-development/references/recommended-structure.md +168 -0
  99. package/.claude/skills/skills-development/references/skill-structure.md +372 -0
  100. package/.claude/skills/skills-development/references/use-xml-tags.md +466 -0
  101. package/.claude/skills/skills-development/references/using-scripts.md +113 -0
  102. package/.claude/skills/skills-development/references/using-templates.md +112 -0
  103. package/.claude/skills/skills-development/references/workflows-and-validation.md +510 -0
  104. package/.claude/skills/skills-development/templates/router-skill.md +73 -0
  105. package/.claude/skills/skills-development/templates/simple-skill.md +33 -0
  106. package/.claude/skills/skills-development/workflows/add-reference.md +96 -0
  107. package/.claude/skills/skills-development/workflows/add-script.md +93 -0
  108. package/.claude/skills/skills-development/workflows/add-template.md +74 -0
  109. package/.claude/skills/skills-development/workflows/add-workflow.md +120 -0
  110. package/.claude/skills/skills-development/workflows/audit-skill.md +138 -0
  111. package/.claude/skills/skills-development/workflows/create-domain-expertise-skill.md +605 -0
  112. package/.claude/skills/skills-development/workflows/create-new-skill.md +191 -0
  113. package/.claude/skills/skills-development/workflows/get-guidance.md +121 -0
  114. package/.claude/skills/skills-development/workflows/upgrade-to-router.md +161 -0
  115. package/.claude/skills/skills-development/workflows/verify-skill.md +204 -0
  116. package/.claude/skills/subagents-development/SKILL.md +325 -0
  117. package/.claude/skills/subagents-development/references/context-management.md +567 -0
  118. package/.claude/skills/subagents-development/references/debugging-agents.md +714 -0
  119. package/.claude/skills/subagents-development/references/error-handling-and-recovery.md +502 -0
  120. package/.claude/skills/subagents-development/references/evaluation-and-testing.md +374 -0
  121. package/.claude/skills/subagents-development/references/orchestration-patterns.md +591 -0
  122. package/.claude/skills/subagents-development/references/subagents.md +508 -0
  123. package/.claude/skills/subagents-development/references/writing-subagent-prompts.md +517 -0
  124. package/.claude/statusline.sh +24 -0
  125. package/bin/cli.js +150 -72
  126. package/package.json +1 -1
  127. package/.claude/agents/explorer.md +0 -62
  128. package/.claude/agents/parallel-worker.md +0 -121
  129. package/.claude/commands/curation-fix.md +0 -92
  130. package/.claude/commands/new-branch.md +0 -36
  131. package/.claude/commands/parallel-discovery.md +0 -69
  132. package/.claude/commands/parallel-orchestration.md +0 -99
  133. package/.claude/commands/plan-checkpoint.md +0 -37
  134. package/.claude/envoy/commands/__init__.py +0 -1
  135. package/.claude/envoy/commands/base.py +0 -95
  136. package/.claude/envoy/commands/parallel.py +0 -439
  137. package/.claude/envoy/commands/perplexity.py +0 -86
  138. package/.claude/envoy/commands/plans.py +0 -451
  139. package/.claude/envoy/commands/tavily.py +0 -156
  140. package/.claude/envoy/commands/vertex.py +0 -358
  141. package/.claude/envoy/commands/xai.py +0 -124
  142. package/.claude/envoy/envoy.py +0 -122
  143. package/.claude/envoy/pyrightconfig.json +0 -4
  144. package/.claude/envoy/requirements.txt +0 -2
  145. package/.claude/hooks/capture-queries.sh +0 -3
  146. package/.claude/hooks/scripts/enforce_planning.py +0 -118
  147. package/.claude/hooks/scripts/enforce_rg.py +0 -34
  148. package/.claude/hooks/scripts/validate_skill.py +0 -81
  149. package/.claude/skills/claude-envoy-curation/SKILL.md +0 -162
  150. package/.claude/skills/claude-envoy-usage/SKILL.md +0 -46
  151. package/.claude/skills/command-development/SKILL.md +0 -206
  152. package/.claude/skills/command-development/examples/simple-commands.md +0 -212
  153. package/.claude/skills/command-development/references/frontmatter-reference.md +0 -221
  154. package/.claude/skills/hook-development/SKILL.md +0 -127
  155. package/.claude/skills/hook-development/examples/command-hooks.md +0 -301
  156. package/.claude/skills/hook-development/examples/prompt-hooks.md +0 -114
  157. package/.claude/skills/hook-development/references/event-reference.md +0 -226
  158. package/.claude/skills/repomix-extraction/SKILL.md +0 -91
  159. package/.claude/skills/skill-development/SKILL.md +0 -168
  160. package/.claude/skills/skill-development/examples/complete-skill-examples.md +0 -281
  161. package/.claude/skills/skill-development/references/progressive-disclosure.md +0 -141
  162. package/.claude/skills/skill-development/references/writing-style.md +0 -180
  163. package/.claude/skills/skill-development/scripts/validate-skill.sh +0 -144
  164. package/.claude/skills/specialist-builder/SKILL.md +0 -327
  165. package/.claude/skills/specialist-builder/docs/agent-catalog.md +0 -28
  166. package/.claude/skills/specialist-builder/examples/complete-agent-examples.md +0 -206
  167. package/.claude/skills/specialist-builder/references/system-prompt-patterns.md +0 -281
  168. package/.claude/skills/specialist-builder/references/triggering-examples.md +0 -162
  169. package/.claude/skills/specialist-builder/scripts/validate-agent.sh +0 -137
  170. /package/.claude/{envoy/claude-envoy.py → skills/claude-envoy-patterns/SKILL.md} +0 -0
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: implementation-mode
3
+ description: Prompt execution lifecycle for implementing plan tasks. Handles prompt reading, implementation, history tracking, and review iteration.
4
+ ---
5
+
6
+ <objective>
7
+ Execute individual prompts from an active plan. Read prompt → implement → track history → get review feedback → iterate until complete.
8
+ </objective>
9
+
10
+ <quick_start>
11
+ ```bash
12
+ # 1. Get prompt to implement
13
+ envoy plans get-prompt <task-number>
14
+
15
+ # 2. Implement using Glob, Grep, Read for context
16
+
17
+ # 3. Track progress
18
+ envoy plans append-history <task> --summary "Added auth middleware" --files '["src/auth.ts"]'
19
+
20
+ # 4. Get review
21
+ envoy plans review-prompt <task>
22
+
23
+ # 5. Commit when review passes
24
+ git commit -m "task-<N>: <summary>"
25
+ ```
26
+ </quick_start>
27
+
28
+ <workflow>
29
+ ### 1. Get Prompt
30
+ ```bash
31
+ envoy plans get-prompt <task-number>
32
+ ```
33
+ Returns: prompt content + existing history
34
+
35
+ ### 2. Setup (if variant)
36
+ If implementing a variant prompt:
37
+ ```bash
38
+ git worktree add .worktrees/task-N-V <branch>
39
+ ```
40
+
41
+ ### 3. Implement
42
+ - Use Glob, Grep, Read for context gathering
43
+ - Make code changes per prompt instructions
44
+ - Follow existing codebase patterns
45
+
46
+ ### 4. Track History
47
+ After each significant change:
48
+ ```bash
49
+ envoy plans append-history <task> \
50
+ --summary "Brief description of change" \
51
+ --files '["path/to/changed.ts", "path/to/other.ts"]'
52
+ ```
53
+
54
+ ### 5. Get Review
55
+ ```bash
56
+ envoy plans review-prompt <task>
57
+ ```
58
+ If changes needed → fix → append-history → review again
59
+
60
+ ### 6. Commit
61
+ When review passes:
62
+ ```bash
63
+ git commit -m "task-<N>: <summary>"
64
+ ```
65
+
66
+ ### 7. Return Status
67
+ ```yaml
68
+ status: completed | needs_attention
69
+ summary: "one line"
70
+ files_changed: [list]
71
+ history_entries: N
72
+ ```
73
+ </workflow>
74
+
75
+ <constraints>
76
+ - **Append history after changes** - maintains audit trail
77
+ - **Review before commit** - ensure implementation matches prompt
78
+ - **Worktree cleanup** - handled by git checkout hooks
79
+ </constraints>
80
+
81
+ <modes>
82
+ ### NORMAL Mode (default)
83
+ Full workflow: get-prompt → implement → history → review → commit
84
+
85
+ ### FEEDBACK Mode
86
+ Called when specialist returns to address review issues from /complete.
87
+
88
+ **Trigger**: Main agent delegates with "FEEDBACK MODE" context
89
+ </modes>
90
+
91
+ <feedback_mode>
92
+ Comprehensive workflow for addressing review feedback after /complete.
93
+
94
+ <trigger>
95
+ Main agent delegates with FEEDBACK MODE flag and review feedback content.
96
+ </trigger>
97
+
98
+ <input_format>
99
+ Main agent provides:
100
+ - `FEEDBACK MODE` marker
101
+ - Review feedback (issues array from vertex review)
102
+ - Optional: file paths mentioned in feedback
103
+ </input_format>
104
+
105
+ <workflow>
106
+ ### 1. Parse Feedback
107
+ Extract actionable items from review feedback:
108
+ - Specific issues to fix
109
+ - File locations mentioned
110
+ - Severity/priority if indicated
111
+
112
+ DO NOT read prompt files - feedback IS the task.
113
+
114
+ ### 2. Implement Fixes
115
+ For each issue:
116
+ 1. Locate relevant code (use Grep/Read)
117
+ 2. Make targeted fix
118
+ 3. Keep changes minimal - only what's needed for the issue
119
+
120
+ ### 3. Review Changes
121
+ ```bash
122
+ envoy vertex review --last-commit
123
+ ```
124
+
125
+ | Response | Action |
126
+ |----------|--------|
127
+ | verdict: approved | Continue to Step 4 |
128
+ | verdict: needs_work | Extract new issues, return to Step 2 |
129
+ | verdict: off_track | Return to main agent with failure report |
130
+
131
+ ### 4. Commit
132
+ When review passes:
133
+ ```bash
134
+ git add -A && git commit -m "fix: address review feedback"
135
+ ```
136
+
137
+ ### 5. Return to Main Agent
138
+ ```yaml
139
+ status: completed
140
+ mode: feedback
141
+ fixes_applied: [list of issues addressed]
142
+ review_verdict: approved
143
+ commit_id: <sha>
144
+ ```
145
+ </workflow>
146
+
147
+ <constraints>
148
+ - **NO prompt reading** - feedback is your only input
149
+ - **Minimal changes** - fix only what's flagged
150
+ - **Max 3 iterations** - if still failing after 3 review cycles, return with failure
151
+ - **No history tracking** - not a prompt implementation
152
+ </constraints>
153
+
154
+ <failure_handling>
155
+ If review fails 3 times or returns "off_track":
156
+ ```yaml
157
+ status: needs_attention
158
+ mode: feedback
159
+ reason: "Review failed after N iterations"
160
+ remaining_issues: [unresolved items]
161
+ ```
162
+ Main agent will escalate to user.
163
+ </failure_handling>
164
+ </feedback_mode>
165
+
166
+ <success_criteria>
167
+ - Prompt requirements implemented (NORMAL) OR feedback addressed (FEEDBACK)
168
+ - History entries recorded (NORMAL only)
169
+ - Review passes
170
+ - Clean commit created
171
+ </success_criteria>
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: knowledge-discovery
3
+ description: Semantic codebase exploration using knowledge base + LSP. Use for context gathering, understanding design decisions, finding implementation patterns. Combines "why" from docs with "where" from code references.
4
+ ---
5
+
6
+ <objective>
7
+ Enable context-efficient codebase exploration by leveraging semantic knowledge search before raw file reads. Knowledge docs capture motivations and design decisions that grep/glob cannot surface. File references in results guide targeted code exploration via LSP or direct reads.
8
+ </objective>
9
+
10
+ <motivation>
11
+ Traditional search (grep, glob) finds **what** exists but not **why**. Knowledge base docs encode:
12
+ - Design motivations and tradeoffs
13
+ - Pattern explanations with rationale
14
+ - Cross-cutting concerns that span multiple files
15
+ - "How we do X" institutional knowledge
16
+
17
+ Searching knowledge first provides semantic context that informs subsequent code exploration. File references embedded in knowledge docs point to implementations, enabling LSP-guided exploration that minimizes context consumption.
18
+ </motivation>
19
+
20
+ <quick_start>
21
+ ```bash
22
+ # Semantic search - use full descriptive phrases, not keywords
23
+ envoy knowledge search "how does retry logic handle rate limits in external API calls"
24
+
25
+ # NOT: envoy knowledge search "retry rate limit"
26
+ ```
27
+
28
+ Result interpretation:
29
+ - **High similarity (>0.8)**: Full `full_resource_context` included - read directly
30
+ - **Lower similarity**: Only `description` provided - may need `envoy knowledge read <path>` for full content
31
+ </quick_start>
32
+
33
+ <constraints>
34
+ - Use full phrases for semantic search, not keywords
35
+ - Always check file references in results before doing raw codebase searches
36
+ - LSP required when symbol references present (context-light first)
37
+ - Estimate context cost before large file reads
38
+ </constraints>
39
+
40
+ <workflow>
41
+ ### 1. Semantic Search First
42
+ ```bash
43
+ envoy knowledge search "<descriptive question about the requirement or concept>"
44
+ ```
45
+
46
+ ### 2. Interpret Results
47
+
48
+ **High-confidence matches** return full content:
49
+ ```json
50
+ {
51
+ "similarity": 0.85,
52
+ "full_resource_context": "---\ndescription: ...\n---\n\n# Full doc content..."
53
+ }
54
+ ```
55
+
56
+ **Lower-confidence matches** return descriptions only:
57
+ ```json
58
+ {
59
+ "similarity": 0.72,
60
+ "description": "Brief description of what the doc covers"
61
+ }
62
+ ```
63
+
64
+ If description seems relevant, fetch full content:
65
+ ```bash
66
+ envoy knowledge read "docs/path/to/file.md"
67
+ ```
68
+
69
+ ### 3. Follow File References
70
+
71
+ Knowledge docs embed file references in two forms:
72
+
73
+ **Path + Symbol** (LSP required):
74
+ ```
75
+ [ref:.claude/envoy/src/lib/retry.ts:withRetry:fc672da]
76
+ ```
77
+ → Use LSP to explore symbol before reading file
78
+
79
+ **Path Only** (direct read permitted):
80
+ ```
81
+ [ref:.claude/envoy/src/commands/gemini.ts::fc672da]
82
+ ```
83
+ → Full file read acceptable
84
+
85
+ ### 4. LSP Exploration (when symbol present)
86
+
87
+ Match LSP operation to information need:
88
+
89
+ | Need | LSP Operation |
90
+ |------|---------------|
91
+ | Find callers/usage | `incomingCalls` |
92
+ | Find dependants | `findReferences` |
93
+ | Get signature/types | `hover` |
94
+ | Jump to definition | `goToDefinition` |
95
+ | All symbols in file | `documentSymbol` |
96
+
97
+ **Example flow**:
98
+ ```bash
99
+ # 1. Find symbol location
100
+ LSP goToDefinition → retry.ts:78
101
+
102
+ # 2. Understand usage patterns
103
+ LSP incomingCalls → 6 callers in gemini.ts
104
+
105
+ # 3. Only then read relevant implementation
106
+ Read retry.ts (lines 78-120)
107
+ ```
108
+
109
+ ### 5. Context-Aware Reading
110
+
111
+ After LSP exploration, read only what's needed:
112
+ - Specific function/class implementations
113
+ - Caller contexts that inform usage patterns
114
+ - Avoid reading entire files when LSP provides structure
115
+ </workflow>
116
+
117
+ <examples>
118
+ <example name="Investigating retry patterns">
119
+ ```bash
120
+ # 1. Semantic search
121
+ envoy knowledge search "how do we handle retries for external API calls in envoy"
122
+
123
+ # Result includes ref: .claude/envoy/src/lib/retry.ts:withRetry:fc672da
124
+
125
+ # 2. LSP exploration
126
+ LSP documentSymbol retry.ts → find withRetry at line 78
127
+ LSP incomingCalls line 78 → 6 callers in gemini.ts
128
+
129
+ # 3. Targeted read
130
+ Read retry.ts lines 36-125 (isRetryableError + withRetry only)
131
+ ```
132
+ </example>
133
+
134
+ <example name="Understanding protocol extension">
135
+ ```bash
136
+ # 1. Semantic search
137
+ envoy knowledge search "how are protocols maintained for reusability and extension"
138
+
139
+ # Result includes full context explaining:
140
+ # - extends keyword for inheritance
141
+ # - Step numbering (6.1, 6.2 for insertions, 6+ for augments)
142
+ # - File refs to protocols/debugging.yaml, protocols/implementation.yaml
143
+
144
+ # 2. Path-only reference → direct read
145
+ Read .claude/protocols/debugging.yaml (extends field visible)
146
+ ```
147
+ </example>
148
+
149
+ <decision_tree>
150
+ ```
151
+ Need codebase context?
152
+ ├─ Know specific file/symbol? → Read/LSP directly
153
+ ├─ Conceptual question? → envoy knowledge search
154
+ │ ├─ High similarity result? → Use full_resource_context
155
+ │ └─ Lower similarity? → envoy knowledge read if relevant
156
+ │ └─ File references in result?
157
+ │ ├─ Has symbol (path:symbol:hash)? → LSP first
158
+ │ └─ Path only (path::hash)? → Direct read OK
159
+ └─ No knowledge matches? → Fallback to grep/glob
160
+ ```
161
+ </decision_tree>
162
+ </examples>
163
+
164
+ <anti_patterns>
165
+ - Using keywords instead of descriptive phrases in knowledge search
166
+ - Reading entire files when LSP can provide structure first
167
+ - Skipping knowledge search and going straight to grep
168
+ - Ignoring file references and re-searching codebase
169
+ - Using findReferences when incomingCalls would suffice (findReferences includes definition)
170
+ </anti_patterns>
171
+
172
+ <success_criteria>
173
+ - Knowledge search invoked before raw codebase exploration
174
+ - File references from knowledge docs used to guide code exploration
175
+ - LSP used for symbol references before large file reads
176
+ - Context budget preserved through targeted reads
177
+ - Design motivations ("why") understood alongside implementation ("what")
178
+ </success_criteria>
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: research-tools
3
- description: Use when need to "search the web", "research [topic]", "extract URL content", or "find sources". Provides web search (Tavily), deep research (Perplexity), and X/Twitter insights (Grok). Only for curator/researcher agents.
3
+ description: External research via envoy commands. Use for "search the web", "research [topic]", "extract URL content", "find sources". Provides Tavily (search/extract), Perplexity (deep research), Grok (X/Twitter). Curator/researcher agents only.
4
4
  ---
5
5
 
6
6
  <objective>
7
- External research capability for curator and researcher agents. Provides web search, deep research with citations, and real-time social signals via envoy commands.
7
+ External research capability for curator/researcher agents. Web search, deep research with citations, and real-time social signals via envoy commands.
8
8
  </objective>
9
9
 
10
10
  <quick_start>
@@ -20,71 +20,66 @@ envoy tavily extract "url1" "url2"
20
20
  ```
21
21
  </quick_start>
22
22
 
23
- <success_criteria>
24
- - JSON response with `status: success` and `data` containing findings
25
- - Sources/citations included for synthesis queries
26
- - Content extracted for known URLs
27
- </success_criteria>
28
-
29
23
  <constraints>
30
24
  - Only curator/researcher agents may use these tools
31
25
  - GitHub content: use `gh` CLI instead of extract
32
26
  - All commands return JSON - parse `data.content` or `data.results`
27
+ - Use TODAY's date for time-sensitive queries: `date +%Y-%m-%d`
33
28
  </constraints>
34
29
 
35
30
  <workflow>
36
- ### 1. Scope the Query
37
- - What specifically needs to be learned?
38
- - What will the findings be used for?
39
- - What level of depth is needed?
40
-
41
- ### 2. Choose Approach
31
+ <step name="scope">
32
+ Clarify: What to learn? What for? Depth needed?
33
+ </step>
42
34
 
35
+ <step name="choose_tool">
43
36
  | Need | Tool | Cost |
44
37
  |------|------|------|
45
- | Broad question, need synthesis | `perplexity research` | High |
38
+ | Broad question, synthesis | `perplexity research` | High |
46
39
  | Synthesis + real-time validation | `perplexity research --grok-challenge` | Higher |
47
40
  | X/Twitter community insights | `xai search` | Medium |
48
41
  | Find sources, discover URLs | `tavily search` | Medium |
49
- | Get full content from known URL | `tavily extract` | Low |
42
+ | Full content from known URL | `tavily extract` | Low |
43
+ </step>
50
44
 
51
- ### 3. Process Results
45
+ <step name="process_results">
52
46
  All tools return JSON. Parse `data.content` or `data.results` for findings.
47
+ </step>
53
48
  </workflow>
54
49
 
55
50
  <examples>
56
- ### Command Reference
51
+ <command_reference>
57
52
  ```bash
58
- # Deep research with citations (Perplexity)
53
+ # Perplexity (deep research)
59
54
  envoy perplexity research "query"
60
- envoy perplexity research "query" --grok-challenge # validate via X search
55
+ envoy perplexity research "query" --grok-challenge
61
56
 
62
- # X/Twitter search (Grok)
57
+ # Grok (X/Twitter)
63
58
  envoy xai search "query"
64
- envoy xai search "query" --results-to-challenge "findings" # challenger mode
59
+ envoy xai search "query" --results-to-challenge "findings"
65
60
 
66
- # Web search (Tavily)
61
+ # Tavily (web search/extract)
67
62
  envoy tavily search "query"
68
63
  envoy tavily search "query" --max-results 10
69
-
70
- # Extract content from URLs (Tavily)
71
64
  envoy tavily extract "url1" "url2"
72
65
 
73
- # GitHub content (use gh CLI)
66
+ # GitHub (use gh CLI)
74
67
  gh api repos/{owner}/{repo}/contents/{path}
75
68
  gh issue view {number} --repo {owner}/{repo}
76
69
  ```
70
+ </command_reference>
77
71
 
78
- ### Decision Tree
72
+ <decision_tree>
79
73
  ```
80
74
  Need information?
81
- ├─ Know the exact URL? → tavily extract
75
+ ├─ Know exact URL? → tavily extract
82
76
  ├─ Need to find sources? → tavily search → extract promising URLs
83
77
  ├─ Tech research for planning? → perplexity research --grok-challenge
84
78
  └─ Quick answer, no validation? → perplexity research
85
79
  ```
80
+ </decision_tree>
86
81
 
87
- ### Output Format
82
+ <output_format>
88
83
  ```markdown
89
84
  ## Research: [Topic]
90
85
 
@@ -92,16 +87,23 @@ Need information?
92
87
  - Finding with context
93
88
 
94
89
  ### Sources
95
- - [Source URL] - what was relevant
90
+ - [URL] - relevance
96
91
 
97
92
  ### Recommendations
98
- What to do based on findings.
93
+ Actions based on findings.
99
94
  ```
95
+ </output_format>
100
96
  </examples>
101
97
 
102
98
  <anti_patterns>
103
- - Using extract for GitHub content (use `gh` CLI instead)
99
+ - Using extract for GitHub content (use `gh` CLI)
104
100
  - Skipping scope clarification before research
105
101
  - Not parsing JSON response properly
106
- - Using research tools from non-curator/researcher agents
102
+ - Using from non-curator/researcher agents
107
103
  </anti_patterns>
104
+
105
+ <success_criteria>
106
+ - JSON response: `status: success` with `data` containing findings
107
+ - Sources/citations included for synthesis queries
108
+ - Content extracted for known URLs
109
+ </success_criteria>
@@ -0,0 +1,192 @@
1
+ ---
2
+ name: skills-development
3
+ description: Expert guidance for creating, refining, and auditing Claude Code Skills. Use when working with SKILL.md files, authoring new skills, improving/auditing existing skills, or understanding skill structure and best practices.
4
+ ---
5
+
6
+ <essential_principles>
7
+ ## How Skills Work
8
+
9
+ Skills are modular, filesystem-based capabilities that provide domain expertise on demand. This skill teaches how to create effective skills.
10
+
11
+ ### 1. Skills Are Prompts
12
+
13
+ All prompting best practices apply. Be clear, be direct, use XML structure. Assume Claude is smart - only add context Claude doesn't have.
14
+
15
+ ### 2. SKILL.md Is Always Loaded
16
+
17
+ When a skill is invoked, Claude reads SKILL.md. Use this guarantee:
18
+ - Essential principles go in SKILL.md (can't be skipped)
19
+ - Workflow-specific content goes in workflows/
20
+ - Reusable knowledge goes in references/
21
+
22
+ ### 3. Router Pattern for Complex Skills
23
+
24
+ ```
25
+ skill-name/
26
+ ├── SKILL.md # Router + principles
27
+ ├── workflows/ # Step-by-step procedures (FOLLOW)
28
+ ├── references/ # Domain knowledge (READ)
29
+ ├── templates/ # Output structures (COPY + FILL)
30
+ └── scripts/ # Reusable code (EXECUTE)
31
+ ```
32
+
33
+ SKILL.md asks "what do you want to do?" → routes to workflow → workflow specifies which references to read.
34
+
35
+ **When to use each folder:**
36
+ - **workflows/** - Multi-step procedures Claude follows
37
+ - **references/** - Domain knowledge Claude reads for context
38
+ - **templates/** - Consistent output structures Claude copies and fills (plans, specs, configs)
39
+ - **scripts/** - Executable code Claude runs as-is (deploy, setup, API calls)
40
+
41
+ ### 4. Pure XML Structure
42
+
43
+ No markdown headings (#, ##, ###) in skill body. Use semantic XML tags:
44
+ ```xml
45
+ <objective>...</objective>
46
+ <process>...</process>
47
+ <success_criteria>...</success_criteria>
48
+ ```
49
+
50
+ Keep markdown formatting within content (bold, lists, code blocks).
51
+
52
+ ### 5. Progressive Disclosure
53
+
54
+ SKILL.md under 500 lines. Split detailed content into reference files. Load only what's needed for the current workflow.
55
+ </essential_principles>
56
+
57
+ <intake>
58
+ What would you like to do?
59
+
60
+ 1. Create new skill
61
+ 2. Audit/modify existing skill
62
+ 3. Add component (workflow/reference/template/script)
63
+ 4. Get guidance
64
+
65
+ **Wait for response before proceeding.**
66
+ </intake>
67
+
68
+ <routing>
69
+ | Response | Next Action | Workflow |
70
+ |----------|-------------|----------|
71
+ | 1, "create", "new", "build" | Ask: "Task-execution skill or domain expertise skill?" | Route to appropriate create workflow |
72
+ | 2, "audit", "modify", "existing" | Ask: "Path to skill?" | Route to appropriate workflow |
73
+ | 3, "add", "component" | Ask: "Add what? (workflow/reference/template/script)" | workflows/add-{type}.md |
74
+ | 4, "guidance", "help" | General guidance | workflows/get-guidance.md |
75
+
76
+ **Progressive disclosure for option 1 (create):**
77
+ - If user selects "Task-execution skill" → workflows/create-new-skill.md
78
+ - If user selects "Domain expertise skill" → workflows/create-domain-expertise-skill.md
79
+
80
+ **Progressive disclosure for option 3 (add component):**
81
+ - If user specifies workflow → workflows/add-workflow.md
82
+ - If user specifies reference → workflows/add-reference.md
83
+ - If user specifies template → workflows/add-template.md
84
+ - If user specifies script → workflows/add-script.md
85
+
86
+ **Intent-based routing (if user provides clear intent without selecting menu):**
87
+ - "audit this skill", "check skill", "review" → workflows/audit-skill.md
88
+ - "verify content", "check if current" → workflows/verify-skill.md
89
+ - "create domain expertise", "exhaustive knowledge base" → workflows/create-domain-expertise-skill.md
90
+ - "create skill for X", "build new skill" → workflows/create-new-skill.md
91
+ - "add workflow", "add reference", etc. → workflows/add-{type}.md
92
+ - "upgrade to router" → workflows/upgrade-to-router.md
93
+
94
+ **After reading the workflow, follow it exactly.**
95
+ </routing>
96
+
97
+ <quick_reference>
98
+ ## Skill Structure Quick Reference
99
+
100
+ **Simple skill (single file):**
101
+ ```yaml
102
+ ---
103
+ name: skill-name
104
+ description: What it does and when to use it.
105
+ ---
106
+
107
+ <objective>What this skill does</objective>
108
+ <quick_start>Immediate actionable guidance</quick_start>
109
+ <process>Step-by-step procedure</process>
110
+ <success_criteria>How to know it worked</success_criteria>
111
+ ```
112
+
113
+ **Complex skill (router pattern):**
114
+ ```
115
+ SKILL.md:
116
+ <essential_principles> - Always applies
117
+ <intake> - Question to ask
118
+ <routing> - Maps answers to workflows
119
+
120
+ workflows/:
121
+ <required_reading> - Which refs to load
122
+ <process> - Steps
123
+ <success_criteria> - Done when...
124
+
125
+ references/:
126
+ Domain knowledge, patterns, examples
127
+
128
+ templates/:
129
+ Output structures Claude copies and fills
130
+ (plans, specs, configs, documents)
131
+
132
+ scripts/:
133
+ Executable code Claude runs as-is
134
+ (deploy, setup, API calls, data processing)
135
+ ```
136
+ </quick_reference>
137
+
138
+ <reference_index>
139
+ ## Domain Knowledge
140
+
141
+ All in `references/`:
142
+
143
+ **Structure:** recommended-structure.md, skill-structure.md
144
+ **Principles:** core-principles.md, be-clear-and-direct.md, use-xml-tags.md
145
+ **Patterns:** common-patterns.md, workflows-and-validation.md
146
+ **Assets:** using-templates.md, using-scripts.md
147
+ **Advanced:** executable-code.md, api-security.md, iteration-and-testing.md
148
+ </reference_index>
149
+
150
+ <workflows_index>
151
+ ## Workflows
152
+
153
+ All in `workflows/`:
154
+
155
+ | Workflow | Purpose |
156
+ |----------|---------|
157
+ | create-new-skill.md | Build a skill from scratch |
158
+ | create-domain-expertise-skill.md | Build exhaustive domain knowledge base for build/ |
159
+ | audit-skill.md | Analyze skill against best practices |
160
+ | verify-skill.md | Check if content is still accurate |
161
+ | add-workflow.md | Add a workflow to existing skill |
162
+ | add-reference.md | Add a reference to existing skill |
163
+ | add-template.md | Add a template to existing skill |
164
+ | add-script.md | Add a script to existing skill |
165
+ | upgrade-to-router.md | Convert simple skill to router pattern |
166
+ | get-guidance.md | Help decide what kind of skill to build |
167
+ </workflows_index>
168
+
169
+ <yaml_requirements>
170
+ ## YAML Frontmatter
171
+
172
+ Required fields:
173
+ ```yaml
174
+ ---
175
+ name: skill-name # lowercase-with-hyphens, matches directory
176
+ description: ... # What it does AND when to use it (third person)
177
+ ---
178
+ ```
179
+
180
+ Name conventions: `create-*`, `manage-*`, `setup-*`, `generate-*`, `build-*`
181
+ </yaml_requirements>
182
+
183
+ <success_criteria>
184
+ A well-structured skill:
185
+ - Has valid YAML frontmatter
186
+ - Uses pure XML structure (no markdown headings in body)
187
+ - Has essential principles inline in SKILL.md
188
+ - Routes directly to appropriate workflows based on user intent
189
+ - Keeps SKILL.md under 500 lines
190
+ - Asks minimal clarifying questions only when truly needed
191
+ - Has been tested with real usage
192
+ </success_criteria>