claudify-agent 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.
- package/.claude/QUICK-REFERENCE.md +213 -213
- package/.claude/cost-dashboard.md +162 -162
- package/.claude/docs/COST-OPTIMIZATION.md +402 -403
- package/.claude/docs/MCP-INTEGRATION-GUIDE.md +348 -348
- package/.claude/docs/PLAN-MODE-OPTIMIZATION.md +835 -836
- package/.claude/hooks/auto-learning-review.ts +200 -195
- package/.claude/hooks/auto-lint-fix.ts +60 -104
- package/.claude/hooks/auto-security-review.ts +314 -354
- package/.claude/hooks/auto-validate.ts +249 -348
- package/.claude/hooks/lib/claude-hook.ts +168 -0
- package/.claude/hooks/plan-quality-tracker.ts +598 -719
- package/.claude/rules/anti-patterns.md +22 -22
- package/.claude/rules/context-tier-1.md +41 -41
- package/.claude/rules/context-tier-2.md +285 -285
- package/.claude/rules/general.md +25 -25
- package/.claude/rules/mcp-auto-use.md +46 -46
- package/.claude/rules/parallel-exploration-auto.md +30 -31
- package/.claude/rules/plan-mode-execution.md +289 -289
- package/.claude/rules/plan-mode-research.md +34 -34
- package/.claude/rules/plan-mode-structure.md +166 -166
- package/.claude/rules/plan-mode-validation.md +129 -130
- package/.claude/rules/security-critical.md +19 -19
- package/.claude/rules/tool-auto-selection.md +45 -45
- package/.claude/rules/tool-strategy.md +22 -22
- package/.claude/scripts/security-scan.js +1 -1
- package/.claude/security-dashboard.md +142 -142
- package/.claude/settings.json +50 -0
- package/.claude/skills/debug-optimizer/SKILL.md +420 -399
- package/.claude/skills/learning-loop/SKILL.md +313 -308
- package/.claude/skills/mcp-mastery/SKILL.md +218 -214
- package/.claude/skills/nextjs-guide/SKILL.md +687 -687
- package/.claude/skills/parallel-exploration/SKILL.md +197 -193
- package/.claude/skills/plan-mode-mastery/SKILL.md +268 -263
- package/.claude/skills/python-guide/SKILL.md +822 -822
- package/.claude/skills/react-guide/SKILL.md +762 -762
- package/.claude/skills/{security.md → security-guide/SKILL.md} +10 -0
- package/.claude/skills/solidity-guide/SKILL.md +5 -0
- package/.claude/skills/tool-selection/SKILL.md +433 -428
- package/.claude/skills/vite-guide/SKILL.md +445 -445
- package/CLAUDE.md +1 -0
- package/README.md +74 -35
- package/README.vi.md +106 -0
- package/bin/cli.js +13 -4
- package/package.json +13 -1
- package/.claude/skills/debug-optimizer.md +0 -12
- package/.claude/skills/nextjs.md +0 -13
- package/.claude/skills/react.md +0 -12
|
@@ -1,193 +1,197 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
-
|
|
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
|