claude-all-hands 1.0.1 → 1.0.2

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 (160) hide show
  1. package/.claude/agents/code-simplifier.md +52 -0
  2. package/.claude/agents/curator.md +189 -245
  3. package/.claude/agents/documentor.md +147 -0
  4. package/.claude/agents/planner.md +123 -166
  5. package/.claude/agents/researcher.md +58 -41
  6. package/.claude/agents/surveyor.md +81 -0
  7. package/.claude/agents/worker.md +74 -0
  8. package/.claude/commands/audit-docs.md +94 -0
  9. package/.claude/commands/continue.md +120 -0
  10. package/.claude/commands/create-docs.md +100 -0
  11. package/.claude/commands/create-skill.md +107 -0
  12. package/.claude/commands/create-specialist.md +111 -0
  13. package/.claude/commands/curator-audit.md +4 -0
  14. package/.claude/commands/debug.md +183 -0
  15. package/.claude/commands/plan.md +199 -102
  16. package/.claude/commands/validate.md +11 -0
  17. package/.claude/commands/whats-next.md +106 -134
  18. package/.claude/envoy/envoy +11 -14
  19. package/.claude/envoy/package-lock.json +1388 -0
  20. package/.claude/envoy/package.json +29 -0
  21. package/.claude/envoy/src/cli.ts +126 -0
  22. package/.claude/envoy/src/commands/base.ts +216 -0
  23. package/.claude/envoy/src/commands/gemini.ts +999 -0
  24. package/.claude/envoy/src/commands/git.ts +639 -0
  25. package/.claude/envoy/src/commands/index.ts +73 -0
  26. package/.claude/envoy/src/commands/knowledge.ts +187 -0
  27. package/.claude/envoy/src/commands/perplexity.ts +129 -0
  28. package/.claude/envoy/src/commands/plan/core.ts +134 -0
  29. package/.claude/envoy/src/commands/plan/findings.ts +446 -0
  30. package/.claude/envoy/src/commands/plan/gates.ts +672 -0
  31. package/.claude/envoy/src/commands/plan/index.ts +135 -0
  32. package/.claude/envoy/src/commands/plan/lifecycle.ts +648 -0
  33. package/.claude/envoy/src/commands/plan/plan-file.ts +138 -0
  34. package/.claude/envoy/src/commands/plan/prompts.ts +285 -0
  35. package/.claude/envoy/src/commands/plan/protocols.ts +166 -0
  36. package/.claude/envoy/src/commands/repomix.ts +99 -0
  37. package/.claude/envoy/src/commands/tavily.ts +220 -0
  38. package/.claude/envoy/src/commands/xai.ts +168 -0
  39. package/.claude/envoy/src/lib/design.ts +41 -0
  40. package/.claude/envoy/src/lib/feedback-schemas.ts +154 -0
  41. package/.claude/envoy/src/lib/findings.ts +215 -0
  42. package/.claude/envoy/src/lib/gates.ts +572 -0
  43. package/.claude/envoy/src/lib/git.ts +132 -0
  44. package/.claude/envoy/src/lib/index.ts +188 -0
  45. package/.claude/envoy/src/lib/knowledge.ts +594 -0
  46. package/.claude/envoy/src/lib/markdown.ts +75 -0
  47. package/.claude/envoy/src/lib/observability.ts +262 -0
  48. package/.claude/envoy/src/lib/paths.ts +130 -0
  49. package/.claude/envoy/src/lib/plan-io.ts +117 -0
  50. package/.claude/envoy/src/lib/prompts.ts +231 -0
  51. package/.claude/envoy/src/lib/protocols.ts +314 -0
  52. package/.claude/envoy/src/lib/repomix.ts +133 -0
  53. package/.claude/envoy/src/lib/retry.ts +138 -0
  54. package/.claude/envoy/src/lib/watcher.ts +167 -0
  55. package/.claude/envoy/tsconfig.json +21 -0
  56. package/.claude/hooks/scripts/scan_agents.py +62 -0
  57. package/.claude/hooks/scripts/scan_commands.py +50 -0
  58. package/.claude/hooks/scripts/scan_skills.py +46 -70
  59. package/.claude/hooks/scripts/validate_artifacts.py +128 -0
  60. package/.claude/hooks/startup.sh +26 -24
  61. package/.claude/protocols/bug-discovery.yaml +55 -0
  62. package/.claude/protocols/debugging.yaml +51 -0
  63. package/.claude/protocols/discovery.yaml +53 -0
  64. package/.claude/protocols/implementation.yaml +84 -0
  65. package/.claude/settings.json +37 -97
  66. package/.claude/skills/brainstorming/SKILL.md +54 -0
  67. package/.claude/skills/commands-development/SKILL.md +630 -0
  68. package/.claude/skills/commands-development/references/arguments.md +252 -0
  69. package/.claude/skills/commands-development/references/patterns.md +796 -0
  70. package/.claude/skills/commands-development/references/tool-restrictions.md +376 -0
  71. package/.claude/skills/discovery-mode/SKILL.md +108 -0
  72. package/.claude/skills/hooks-development/SKILL.md +332 -0
  73. package/.claude/skills/hooks-development/references/command-vs-prompt.md +269 -0
  74. package/.claude/skills/hooks-development/references/examples.md +658 -0
  75. package/.claude/skills/hooks-development/references/hook-types.md +463 -0
  76. package/.claude/skills/hooks-development/references/input-output-schemas.md +469 -0
  77. package/.claude/skills/hooks-development/references/matchers.md +470 -0
  78. package/.claude/skills/hooks-development/references/troubleshooting.md +587 -0
  79. package/.claude/skills/implementation-mode/SKILL.md +171 -0
  80. package/.claude/skills/research-tools/SKILL.md +35 -33
  81. package/.claude/skills/skills-development/SKILL.md +192 -0
  82. package/.claude/skills/skills-development/references/api-security.md +226 -0
  83. package/.claude/skills/skills-development/references/be-clear-and-direct.md +531 -0
  84. package/.claude/skills/skills-development/references/common-patterns.md +595 -0
  85. package/.claude/skills/skills-development/references/core-principles.md +437 -0
  86. package/.claude/skills/skills-development/references/executable-code.md +175 -0
  87. package/.claude/skills/skills-development/references/iteration-and-testing.md +474 -0
  88. package/.claude/skills/skills-development/references/recommended-structure.md +168 -0
  89. package/.claude/skills/skills-development/references/skill-structure.md +372 -0
  90. package/.claude/skills/skills-development/references/use-xml-tags.md +466 -0
  91. package/.claude/skills/skills-development/references/using-scripts.md +113 -0
  92. package/.claude/skills/skills-development/references/using-templates.md +112 -0
  93. package/.claude/skills/skills-development/references/workflows-and-validation.md +510 -0
  94. package/.claude/skills/skills-development/templates/router-skill.md +73 -0
  95. package/.claude/skills/skills-development/templates/simple-skill.md +33 -0
  96. package/.claude/skills/skills-development/workflows/add-reference.md +96 -0
  97. package/.claude/skills/skills-development/workflows/add-script.md +93 -0
  98. package/.claude/skills/skills-development/workflows/add-template.md +74 -0
  99. package/.claude/skills/skills-development/workflows/add-workflow.md +120 -0
  100. package/.claude/skills/skills-development/workflows/audit-skill.md +138 -0
  101. package/.claude/skills/skills-development/workflows/create-domain-expertise-skill.md +605 -0
  102. package/.claude/skills/skills-development/workflows/create-new-skill.md +191 -0
  103. package/.claude/skills/skills-development/workflows/get-guidance.md +121 -0
  104. package/.claude/skills/skills-development/workflows/upgrade-to-router.md +161 -0
  105. package/.claude/skills/skills-development/workflows/verify-skill.md +204 -0
  106. package/.claude/skills/subagents-development/SKILL.md +325 -0
  107. package/.claude/skills/subagents-development/references/context-management.md +567 -0
  108. package/.claude/skills/subagents-development/references/debugging-agents.md +714 -0
  109. package/.claude/skills/subagents-development/references/error-handling-and-recovery.md +502 -0
  110. package/.claude/skills/subagents-development/references/evaluation-and-testing.md +374 -0
  111. package/.claude/skills/subagents-development/references/orchestration-patterns.md +591 -0
  112. package/.claude/skills/subagents-development/references/subagents.md +508 -0
  113. package/.claude/skills/subagents-development/references/writing-subagent-prompts.md +517 -0
  114. package/.claude/statusline.sh +24 -0
  115. package/bin/cli.js +110 -72
  116. package/package.json +1 -1
  117. package/.claude/agents/explorer.md +0 -62
  118. package/.claude/agents/parallel-worker.md +0 -121
  119. package/.claude/commands/curation-fix.md +0 -92
  120. package/.claude/commands/new-branch.md +0 -36
  121. package/.claude/commands/parallel-discovery.md +0 -69
  122. package/.claude/commands/parallel-orchestration.md +0 -99
  123. package/.claude/commands/plan-checkpoint.md +0 -37
  124. package/.claude/envoy/commands/__init__.py +0 -1
  125. package/.claude/envoy/commands/base.py +0 -95
  126. package/.claude/envoy/commands/parallel.py +0 -439
  127. package/.claude/envoy/commands/perplexity.py +0 -86
  128. package/.claude/envoy/commands/plans.py +0 -451
  129. package/.claude/envoy/commands/tavily.py +0 -156
  130. package/.claude/envoy/commands/vertex.py +0 -358
  131. package/.claude/envoy/commands/xai.py +0 -124
  132. package/.claude/envoy/envoy.py +0 -122
  133. package/.claude/envoy/pyrightconfig.json +0 -4
  134. package/.claude/envoy/requirements.txt +0 -2
  135. package/.claude/hooks/capture-queries.sh +0 -3
  136. package/.claude/hooks/scripts/enforce_planning.py +0 -118
  137. package/.claude/hooks/scripts/enforce_rg.py +0 -34
  138. package/.claude/hooks/scripts/validate_skill.py +0 -81
  139. package/.claude/skills/claude-envoy-curation/SKILL.md +0 -162
  140. package/.claude/skills/claude-envoy-usage/SKILL.md +0 -46
  141. package/.claude/skills/command-development/SKILL.md +0 -206
  142. package/.claude/skills/command-development/examples/simple-commands.md +0 -212
  143. package/.claude/skills/command-development/references/frontmatter-reference.md +0 -221
  144. package/.claude/skills/hook-development/SKILL.md +0 -127
  145. package/.claude/skills/hook-development/examples/command-hooks.md +0 -301
  146. package/.claude/skills/hook-development/examples/prompt-hooks.md +0 -114
  147. package/.claude/skills/hook-development/references/event-reference.md +0 -226
  148. package/.claude/skills/repomix-extraction/SKILL.md +0 -91
  149. package/.claude/skills/skill-development/SKILL.md +0 -168
  150. package/.claude/skills/skill-development/examples/complete-skill-examples.md +0 -281
  151. package/.claude/skills/skill-development/references/progressive-disclosure.md +0 -141
  152. package/.claude/skills/skill-development/references/writing-style.md +0 -180
  153. package/.claude/skills/skill-development/scripts/validate-skill.sh +0 -144
  154. package/.claude/skills/specialist-builder/SKILL.md +0 -327
  155. package/.claude/skills/specialist-builder/docs/agent-catalog.md +0 -28
  156. package/.claude/skills/specialist-builder/examples/complete-agent-examples.md +0 -206
  157. package/.claude/skills/specialist-builder/references/system-prompt-patterns.md +0 -281
  158. package/.claude/skills/specialist-builder/references/triggering-examples.md +0 -162
  159. package/.claude/skills/specialist-builder/scripts/validate-agent.sh +0 -137
  160. /package/.claude/{envoy/claude-envoy.py → skills/claude-envoy-patterns/SKILL.md} +0 -0
@@ -0,0 +1,226 @@
1
+ <overview>
2
+ When building skills that make API calls requiring credentials (API keys, tokens, secrets), follow this protocol to prevent credentials from appearing in chat.
3
+ </overview>
4
+
5
+ <the_problem>
6
+ Raw curl commands with environment variables expose credentials:
7
+
8
+ ```bash
9
+ # ❌ BAD - API key visible in chat
10
+ curl -H "Authorization: Bearer $API_KEY" https://api.example.com/data
11
+ ```
12
+
13
+ When Claude executes this, the full command with expanded `$API_KEY` appears in the conversation.
14
+ </the_problem>
15
+
16
+ <the_solution>
17
+ Use `~/.claude/scripts/secure-api.sh` - a wrapper that loads credentials internally.
18
+
19
+ <for_supported_services>
20
+ ```bash
21
+ # ✅ GOOD - No credentials visible
22
+ ~/.claude/scripts/secure-api.sh <service> <operation> [args]
23
+
24
+ # Examples:
25
+ ~/.claude/scripts/secure-api.sh facebook list-campaigns
26
+ ~/.claude/scripts/secure-api.sh ghl search-contact "email@example.com"
27
+ ```
28
+ </for_supported_services>
29
+
30
+ <adding_new_services>
31
+ When building a new skill that requires API calls:
32
+
33
+ 1. **Add operations to the wrapper** (`~/.claude/scripts/secure-api.sh`):
34
+
35
+ ```bash
36
+ case "$SERVICE" in
37
+ yourservice)
38
+ case "$OPERATION" in
39
+ list-items)
40
+ curl -s -G \
41
+ -H "Authorization: Bearer $YOUR_API_KEY" \
42
+ "https://api.yourservice.com/items"
43
+ ;;
44
+ get-item)
45
+ ITEM_ID=$1
46
+ curl -s -G \
47
+ -H "Authorization: Bearer $YOUR_API_KEY" \
48
+ "https://api.yourservice.com/items/$ITEM_ID"
49
+ ;;
50
+ *)
51
+ echo "Unknown operation: $OPERATION" >&2
52
+ exit 1
53
+ ;;
54
+ esac
55
+ ;;
56
+ esac
57
+ ```
58
+
59
+ 2. **Add profile support to the wrapper** (if service needs multiple accounts):
60
+
61
+ ```bash
62
+ # In secure-api.sh, add to profile remapping section:
63
+ yourservice)
64
+ SERVICE_UPPER="YOURSERVICE"
65
+ YOURSERVICE_API_KEY=$(eval echo \$${SERVICE_UPPER}_${PROFILE_UPPER}_API_KEY)
66
+ YOURSERVICE_ACCOUNT_ID=$(eval echo \$${SERVICE_UPPER}_${PROFILE_UPPER}_ACCOUNT_ID)
67
+ ;;
68
+ ```
69
+
70
+ 3. **Add credential placeholders to `~/.claude/.env`** using profile naming:
71
+
72
+ ```bash
73
+ # Check if entries already exist
74
+ grep -q "YOURSERVICE_MAIN_API_KEY=" ~/.claude/.env 2>/dev/null || \
75
+ echo -e "\n# Your Service - Main profile\nYOURSERVICE_MAIN_API_KEY=\nYOURSERVICE_MAIN_ACCOUNT_ID=" >> ~/.claude/.env
76
+
77
+ echo "Added credential placeholders to ~/.claude/.env - user needs to fill them in"
78
+ ```
79
+
80
+ 4. **Document profile workflow in your SKILL.md**:
81
+
82
+ ```markdown
83
+ ## Profile Selection Workflow
84
+
85
+ **CRITICAL:** Always use profile selection to prevent using wrong account credentials.
86
+
87
+ ### When user requests YourService operation:
88
+
89
+ 1. **Check for saved profile:**
90
+ ```bash
91
+ ~/.claude/scripts/profile-state get yourservice
92
+ ```
93
+
94
+ 2. **If no profile saved, discover available profiles:**
95
+ ```bash
96
+ ~/.claude/scripts/list-profiles yourservice
97
+ ```
98
+
99
+ 3. **If only ONE profile:** Use it automatically and announce:
100
+ ```
101
+ "Using YourService profile 'main' to list items..."
102
+ ```
103
+
104
+ 4. **If MULTIPLE profiles:** Ask user which one:
105
+ ```
106
+ "Which YourService profile: main, clienta, or clientb?"
107
+ ```
108
+
109
+ 5. **Save user's selection:**
110
+ ```bash
111
+ ~/.claude/scripts/profile-state set yourservice <selected_profile>
112
+ ```
113
+
114
+ 6. **Always announce which profile before calling API:**
115
+ ```
116
+ "Using YourService profile 'main' to list items..."
117
+ ```
118
+
119
+ 7. **Make API call with profile:**
120
+ ```bash
121
+ ~/.claude/scripts/secure-api.sh yourservice:<profile> list-items
122
+ ```
123
+
124
+ ## Secure API Calls
125
+
126
+ All API calls use profile syntax:
127
+
128
+ ```bash
129
+ ~/.claude/scripts/secure-api.sh yourservice:<profile> <operation> [args]
130
+
131
+ # Examples:
132
+ ~/.claude/scripts/secure-api.sh yourservice:main list-items
133
+ ~/.claude/scripts/secure-api.sh yourservice:main get-item <ITEM_ID>
134
+ ```
135
+
136
+ **Profile persists for session:** Once selected, use same profile for subsequent operations unless user explicitly changes it.
137
+ ```
138
+ </adding_new_services>
139
+ </the_solution>
140
+
141
+ <pattern_guidelines>
142
+ <simple_get_requests>
143
+ ```bash
144
+ curl -s -G \
145
+ -H "Authorization: Bearer $API_KEY" \
146
+ "https://api.example.com/endpoint"
147
+ ```
148
+ </simple_get_requests>
149
+
150
+ <post_with_json_body>
151
+ ```bash
152
+ ITEM_ID=$1
153
+ curl -s -X POST \
154
+ -H "Authorization: Bearer $API_KEY" \
155
+ -H "Content-Type: application/json" \
156
+ -d @- \
157
+ "https://api.example.com/items/$ITEM_ID"
158
+ ```
159
+
160
+ Usage:
161
+ ```bash
162
+ echo '{"name":"value"}' | ~/.claude/scripts/secure-api.sh service create-item
163
+ ```
164
+ </post_with_json_body>
165
+
166
+ <post_with_form_data>
167
+ ```bash
168
+ curl -s -X POST \
169
+ -F "field1=value1" \
170
+ -F "field2=value2" \
171
+ -F "access_token=$API_TOKEN" \
172
+ "https://api.example.com/endpoint"
173
+ ```
174
+ </post_with_form_data>
175
+ </pattern_guidelines>
176
+
177
+ <credential_storage>
178
+ **Location:** `~/.claude/.env` (global for all skills, accessible from any directory)
179
+
180
+ **Format:**
181
+ ```bash
182
+ # Service credentials
183
+ SERVICE_API_KEY=your-key-here
184
+ SERVICE_ACCOUNT_ID=account-id-here
185
+
186
+ # Another service
187
+ OTHER_API_TOKEN=token-here
188
+ OTHER_BASE_URL=https://api.other.com
189
+ ```
190
+
191
+ **Loading in script:**
192
+ ```bash
193
+ set -a
194
+ source ~/.claude/.env 2>/dev/null || { echo "Error: ~/.claude/.env not found" >&2; exit 1; }
195
+ set +a
196
+ ```
197
+ </credential_storage>
198
+
199
+ <best_practices>
200
+ 1. **Never use raw curl with `$VARIABLE` in skill examples** - always use the wrapper
201
+ 2. **Add all operations to the wrapper** - don't make users figure out curl syntax
202
+ 3. **Auto-create credential placeholders** - add empty fields to `~/.claude/.env` immediately when creating the skill
203
+ 4. **Keep credentials in `~/.claude/.env`** - one central location, works everywhere
204
+ 5. **Document each operation** - show examples in SKILL.md
205
+ 6. **Handle errors gracefully** - check for missing env vars, show helpful error messages
206
+ </best_practices>
207
+
208
+ <testing>
209
+ Test the wrapper without exposing credentials:
210
+
211
+ ```bash
212
+ # This command appears in chat
213
+ ~/.claude/scripts/secure-api.sh facebook list-campaigns
214
+
215
+ # But API keys never appear - they're loaded inside the script
216
+ ```
217
+
218
+ Verify credentials are loaded:
219
+ ```bash
220
+ # Check .env exists
221
+ ls -la ~/.claude/.env
222
+
223
+ # Check specific variables (without showing values)
224
+ grep -q "YOUR_API_KEY=" ~/.claude/.env && echo "API key configured" || echo "API key missing"
225
+ ```
226
+ </testing>