claudify-agent 1.0.0 → 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 (47) hide show
  1. package/.claude/QUICK-REFERENCE.md +213 -213
  2. package/.claude/cost-dashboard.md +162 -162
  3. package/.claude/docs/COST-OPTIMIZATION.md +402 -403
  4. package/.claude/docs/MCP-INTEGRATION-GUIDE.md +348 -348
  5. package/.claude/docs/PLAN-MODE-OPTIMIZATION.md +835 -836
  6. package/.claude/hooks/auto-learning-review.ts +200 -195
  7. package/.claude/hooks/auto-lint-fix.ts +60 -104
  8. package/.claude/hooks/auto-security-review.ts +314 -354
  9. package/.claude/hooks/auto-validate.ts +249 -348
  10. package/.claude/hooks/lib/claude-hook.ts +168 -0
  11. package/.claude/hooks/plan-quality-tracker.ts +598 -719
  12. package/.claude/rules/anti-patterns.md +22 -22
  13. package/.claude/rules/context-tier-1.md +41 -41
  14. package/.claude/rules/context-tier-2.md +285 -285
  15. package/.claude/rules/general.md +25 -25
  16. package/.claude/rules/mcp-auto-use.md +46 -46
  17. package/.claude/rules/parallel-exploration-auto.md +30 -31
  18. package/.claude/rules/plan-mode-execution.md +289 -289
  19. package/.claude/rules/plan-mode-research.md +34 -34
  20. package/.claude/rules/plan-mode-structure.md +166 -166
  21. package/.claude/rules/plan-mode-validation.md +129 -130
  22. package/.claude/rules/security-critical.md +19 -19
  23. package/.claude/rules/tool-auto-selection.md +45 -45
  24. package/.claude/rules/tool-strategy.md +22 -22
  25. package/.claude/scripts/security-scan.js +1 -1
  26. package/.claude/security-dashboard.md +142 -142
  27. package/.claude/settings.json +50 -0
  28. package/.claude/skills/debug-optimizer/SKILL.md +420 -399
  29. package/.claude/skills/learning-loop/SKILL.md +313 -308
  30. package/.claude/skills/mcp-mastery/SKILL.md +218 -214
  31. package/.claude/skills/nextjs-guide/SKILL.md +687 -687
  32. package/.claude/skills/parallel-exploration/SKILL.md +197 -193
  33. package/.claude/skills/plan-mode-mastery/SKILL.md +268 -263
  34. package/.claude/skills/python-guide/SKILL.md +822 -822
  35. package/.claude/skills/react-guide/SKILL.md +762 -762
  36. package/.claude/skills/{security.md → security-guide/SKILL.md} +10 -0
  37. package/.claude/skills/solidity-guide/SKILL.md +5 -0
  38. package/.claude/skills/tool-selection/SKILL.md +433 -428
  39. package/.claude/skills/vite-guide/SKILL.md +445 -445
  40. package/CLAUDE.md +1 -0
  41. package/README.md +74 -35
  42. package/README.vi.md +106 -0
  43. package/bin/cli.js +13 -4
  44. package/package.json +9 -1
  45. package/.claude/skills/debug-optimizer.md +0 -12
  46. package/.claude/skills/nextjs.md +0 -13
  47. package/.claude/skills/react.md +0 -12
@@ -1,193 +1,197 @@
1
- # SKILL.md: Parallel Exploration
2
-
3
- ## Description
4
- Automatically launch multiple subagents in parallel for broad codebase exploration, reducing discovery time by 60-70%.
5
-
6
- ## When to Use
7
- - Complex feature implementation (>5 files)
8
- - Large refactors
9
- - Bug investigation (root cause unknown)
10
- - New codebase unfamiliarity
11
- - Multi-part tasks
12
-
13
- ## Automatic Triggers
14
-
15
- **Launch parallel subagents when**:
16
- - User request mentions >3 different areas
17
- - Task complexity: High (requires >10 steps)
18
- - Codebase unfamiliarity detected
19
- - Investigation phase taking >5 minutes
20
-
21
- ## Parallel Exploration Patterns
22
-
23
- ### Pattern 1: Feature Implementation
24
-
25
- ```
26
- User: "Add user dashboard"
27
-
28
- Parallel Subagents (model="fast", run_in_background=true):
29
- 1. "Find dashboard-like pages and layouts"
30
- 2. "Find API route patterns for data fetching"
31
- 3. "Find component structures for widgets"
32
- 4. "Find existing chart/visualization libraries"
33
-
34
- Duration: 60s parallel (vs 240s sequential)
35
- Output: Consolidated findings → Plan creation
36
- ```
37
-
38
- ### Pattern 2: Bug Investigation
39
-
40
- ```
41
- User: "Checkout randomly fails"
42
-
43
- Parallel Subagents:
44
- 1. "Find checkout flow code (UI → API → DB)"
45
- 2. "Find error handling in payment processing"
46
- 3. "Find recent changes to checkout files"
47
- 4. "Find similar issues/fixes in codebase"
48
-
49
- Duration: 90s parallel
50
- Output: Root cause hypothesis + fix locations
51
- ```
52
-
53
- ### Pattern 3: Large Refactor
54
-
55
- ```
56
- User: "Migrate from JWT to sessions"
57
-
58
- Parallel Subagents:
59
- 1. "Find all JWT validation code"
60
- 2. "Find all token generation code"
61
- 3. "Find all authentication middleware"
62
- 4. "Find all tests using JWT"
63
-
64
- Duration: 120s parallel
65
- Output: Complete migration map + risk assessment
66
- ```
67
-
68
- ## Subagent Configuration
69
-
70
- ```typescript
71
- // Optimal configuration for parallel exploration
72
- Task:
73
- description="Explore [specific area]"
74
- prompt="Find [specific pattern/code] in [target directory]"
75
- subagent_type="explore"
76
- model="fast" // Cost optimization
77
- readonly=true // Safety
78
- run_in_background=true // Non-blocking
79
- ```
80
-
81
- ## Cost Optimization
82
-
83
- **Subagent Cost Hierarchy**:
84
- ```
85
- explore (fast model): $ (Use for discovery)
86
- generalPurpose (fast): $$ (Use for analysis)
87
- generalPurpose (capable): $$$ (Use for complex reasoning)
88
- browser-use: $$$$ (Use only when browser needed)
89
- ```
90
-
91
- **Mandatory Cost Rules**:
92
- 1. **ALWAYS** use `model="fast"` for exploration subagents (90% of cases)
93
- 2. **ONLY** use capable model for:
94
- - Complex reasoning tasks
95
- - Multi-step analysis
96
- - Security-critical reviews
97
- 3. **DOCUMENT** model choice in plan (justify if not "fast")
98
- 4. Use `readonly=true` unless modification needed
99
- 5. Use `run_in_background=true` for non-blocking
100
- 6. Limit to 4 parallel subagents max (diminishing returns)
101
- 7. Time-box to 120s max per subagent
102
-
103
- **Cost Impact**: Using `model="fast"` reduces exploration costs by 50-70%
104
-
105
- ## Consolidation Strategy
106
-
107
- **After parallel exploration completes**:
108
-
109
- 1. **Aggregate findings** from all subagents
110
- 2. **Identify overlaps** (multiple agents found same thing)
111
- 3. **Resolve conflicts** (contradictory findings)
112
- 4. **Create unified map** of codebase areas
113
- 5. **Generate plan** using consolidated knowledge
114
-
115
- **Example Consolidation**:
116
- ```markdown
117
- ## Exploration Results (4 subagents, 60s parallel)
118
-
119
- ### Consensus Findings (found by multiple agents)
120
- - Page structure: `app/[feature]/page.tsx` pattern
121
- - API routes: `app/api/[resource]/route.ts`
122
- - Components: `components/[feature]/` directory
123
-
124
- ### Unique Findings
125
- - Agent 1: Found layout pattern in `app/layout.tsx`
126
- - Agent 2: Found data fetching in `lib/fetcher.ts`
127
- - Agent 3: Found component examples in `components/`
128
- - Agent 4: Found chart library: Recharts in use
129
-
130
- ### Next Steps
131
- - Follow `@app/profile/page.tsx` for page structure
132
- - Use `@lib/fetcher.ts` for API calls
133
- - Reference `@components/Card.tsx` for component pattern
134
- ```
135
-
136
- ## Examples
137
-
138
- ### Example 1: New Feature
139
-
140
- User: "Add activity feed to user profile"
141
-
142
- Automatic parallel exploration:
143
- ```
144
- Subagent 1: "Find profile page structure"
145
- Subagent 2: "Find feed/activity patterns"
146
- Subagent 3: "Find API patterns for real-time data"
147
- Subagent 4: "Find websocket/pubsub usage"
148
-
149
- Result: Complete implementation map in 60s
150
- ```
151
-
152
- ### Example 2: Complex Bug
153
-
154
- User: "User sessions expire prematurely"
155
-
156
- Automatic parallel exploration:
157
- ```
158
- Subagent 1: "Find session management code"
159
- Subagent 2: "Find session expiration logic"
160
- Subagent 3: "Find recent changes to auth files"
161
- Subagent 4: "Find session-related tests"
162
-
163
- Result: Root cause identified in 90s
164
- ```
165
-
166
- ### Example 3: Large Refactor
167
-
168
- User: "Migrate from REST to GraphQL"
169
-
170
- Automatic parallel exploration:
171
- ```
172
- Subagent 1: "Find all REST API calls"
173
- Subagent 2: "Find data fetching patterns"
174
- Subagent 3: "Find existing GraphQL usage"
175
- Subagent 4: "Find mutation operations"
176
-
177
- Result: Complete migration strategy in 120s
178
- ```
179
-
180
- ## Anti-Patterns
181
-
182
- ❌ **Don't**:
183
- - Launch >4 parallel subagents (chaos)
184
- - Use capable model for simple exploration (waste)
185
- - Run subagents sequentially (defeats purpose)
186
- - Forget to consolidate findings (confusion)
187
-
188
- ✅ **Do**:
189
- - Use `model="fast"` for exploration
190
- - Launch 2-4 subagents in parallel
191
- - Time-box to 120s max
192
- - Consolidate findings before planning
193
- - Reference specific files found
1
+ ---
2
+ name: parallel-exploration
3
+ description: Launch 2-4 parallel read-only Explore subagents for broad codebase discovery. Use for complex features, large refactors, or bugs with unknown root cause.
4
+ ---
5
+
6
+ # SKILL.md: Parallel Exploration
7
+
8
+ ## Description
9
+ Automatically launch multiple subagents in parallel for broad codebase exploration, reducing discovery time by 60-70%.
10
+
11
+ ## When to Use
12
+ - Complex feature implementation (>5 files)
13
+ - Large refactors
14
+ - Bug investigation (root cause unknown)
15
+ - New codebase unfamiliarity
16
+ - Multi-part tasks
17
+
18
+ ## Automatic Triggers
19
+
20
+ **Launch parallel subagents when**:
21
+ - User request mentions >3 different areas
22
+ - Task complexity: High (requires >10 steps)
23
+ - Codebase unfamiliarity detected
24
+ - Investigation phase taking >5 minutes
25
+
26
+ ## Parallel Exploration Patterns
27
+
28
+ ### Pattern 1: Feature Implementation
29
+
30
+ ```
31
+ User: "Add user dashboard"
32
+
33
+ Parallel Subagents (model="haiku", run_in_background=true):
34
+ 1. "Find dashboard-like pages and layouts"
35
+ 2. "Find API route patterns for data fetching"
36
+ 3. "Find component structures for widgets"
37
+ 4. "Find existing chart/visualization libraries"
38
+
39
+ Duration: 60s parallel (vs 240s sequential)
40
+ Output: Consolidated findings → Plan creation
41
+ ```
42
+
43
+ ### Pattern 2: Bug Investigation
44
+
45
+ ```
46
+ User: "Checkout randomly fails"
47
+
48
+ Parallel Subagents:
49
+ 1. "Find checkout flow code (UI → API → DB)"
50
+ 2. "Find error handling in payment processing"
51
+ 3. "Find recent changes to checkout files"
52
+ 4. "Find similar issues/fixes in codebase"
53
+
54
+ Duration: 90s parallel
55
+ Output: Root cause hypothesis + fix locations
56
+ ```
57
+
58
+ ### Pattern 3: Large Refactor
59
+
60
+ ```
61
+ User: "Migrate from JWT to sessions"
62
+
63
+ Parallel Subagents:
64
+ 1. "Find all JWT validation code"
65
+ 2. "Find all token generation code"
66
+ 3. "Find all authentication middleware"
67
+ 4. "Find all tests using JWT"
68
+
69
+ Duration: 120s parallel
70
+ Output: Complete migration map + risk assessment
71
+ ```
72
+
73
+ ## Subagent Configuration
74
+
75
+ ```typescript
76
+ // Optimal configuration for parallel exploration
77
+ Agent:
78
+ description="Explore [specific area]"
79
+ prompt="Find [specific pattern/code] in [target directory]"
80
+ subagent_type="Explore"
81
+ model="haiku" // Cost optimization
82
+ run_in_background=true // Non-blocking
83
+ ```
84
+
85
+ ## Cost Optimization
86
+
87
+ **Subagent Cost Hierarchy**:
88
+ ```
89
+ Explore (haiku): $ (Use for discovery)
90
+ general-purpose (haiku): $$ (Use for analysis)
91
+ general-purpose (sonnet/opus): $$$ (Use for complex reasoning)
92
+ claude-in-chrome: $$$$ (Use only when browser needed)
93
+ ```
94
+
95
+ **Mandatory Cost Rules**:
96
+ 1. **ALWAYS** use `model="haiku"` for exploration subagents (90% of cases)
97
+ 2. **ONLY** use capable model for:
98
+ - Complex reasoning tasks
99
+ - Multi-step analysis
100
+ - Security-critical reviews
101
+ 3. **DOCUMENT** model choice in plan (justify if not "haiku")
102
+ 4. Use the read-only `Explore` agent unless modification needed
103
+ 5. Use `run_in_background=true` for non-blocking
104
+ 6. Limit to 4 parallel subagents max (diminishing returns)
105
+ 7. Time-box to 120s max per subagent
106
+
107
+ **Cost Impact**: Using `model="haiku"` reduces exploration costs by 50-70%
108
+
109
+ ## Consolidation Strategy
110
+
111
+ **After parallel exploration completes**:
112
+
113
+ 1. **Aggregate findings** from all subagents
114
+ 2. **Identify overlaps** (multiple agents found same thing)
115
+ 3. **Resolve conflicts** (contradictory findings)
116
+ 4. **Create unified map** of codebase areas
117
+ 5. **Generate plan** using consolidated knowledge
118
+
119
+ **Example Consolidation**:
120
+ ```markdown
121
+ ## Exploration Results (4 subagents, 60s parallel)
122
+
123
+ ### Consensus Findings (found by multiple agents)
124
+ - Page structure: `app/[feature]/page.tsx` pattern
125
+ - API routes: `app/api/[resource]/route.ts`
126
+ - Components: `components/[feature]/` directory
127
+
128
+ ### Unique Findings
129
+ - Agent 1: Found layout pattern in `app/layout.tsx`
130
+ - Agent 2: Found data fetching in `lib/fetcher.ts`
131
+ - Agent 3: Found component examples in `components/`
132
+ - Agent 4: Found chart library: Recharts in use
133
+
134
+ ### Next Steps
135
+ - Follow `@app/profile/page.tsx` for page structure
136
+ - Use `@lib/fetcher.ts` for API calls
137
+ - Reference `@components/Card.tsx` for component pattern
138
+ ```
139
+
140
+ ## Examples
141
+
142
+ ### Example 1: New Feature
143
+
144
+ User: "Add activity feed to user profile"
145
+
146
+ Automatic parallel exploration:
147
+ ```
148
+ Subagent 1: "Find profile page structure"
149
+ Subagent 2: "Find feed/activity patterns"
150
+ Subagent 3: "Find API patterns for real-time data"
151
+ Subagent 4: "Find websocket/pubsub usage"
152
+
153
+ Result: Complete implementation map in 60s
154
+ ```
155
+
156
+ ### Example 2: Complex Bug
157
+
158
+ User: "User sessions expire prematurely"
159
+
160
+ Automatic parallel exploration:
161
+ ```
162
+ Subagent 1: "Find session management code"
163
+ Subagent 2: "Find session expiration logic"
164
+ Subagent 3: "Find recent changes to auth files"
165
+ Subagent 4: "Find session-related tests"
166
+
167
+ Result: Root cause identified in 90s
168
+ ```
169
+
170
+ ### Example 3: Large Refactor
171
+
172
+ User: "Migrate from REST to GraphQL"
173
+
174
+ Automatic parallel exploration:
175
+ ```
176
+ Subagent 1: "Find all REST API calls"
177
+ Subagent 2: "Find data fetching patterns"
178
+ Subagent 3: "Find existing GraphQL usage"
179
+ Subagent 4: "Find mutation operations"
180
+
181
+ Result: Complete migration strategy in 120s
182
+ ```
183
+
184
+ ## Anti-Patterns
185
+
186
+ ❌ **Don't**:
187
+ - Launch >4 parallel subagents (chaos)
188
+ - Use capable model for simple exploration (waste)
189
+ - Run subagents sequentially (defeats purpose)
190
+ - Forget to consolidate findings (confusion)
191
+
192
+ ✅ **Do**:
193
+ - Use `model="haiku"` for exploration
194
+ - Launch 2-4 subagents in parallel
195
+ - Time-box to 120s max
196
+ - Consolidate findings before planning
197
+ - Reference specific files found