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.
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 +13 -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,45 +1,45 @@
1
- # Tool Auto-Selection
2
-
3
- ## Tool Cost Hierarchy (Start Cheap, Escalate)
4
-
5
- **Tier 1 (Cheapest)**: Read, Glob, Grep, Shell
6
- **Tier 2 (Moderate)**: SemanticSearch, StrReplace, Write
7
- **Tier 3 (Higher)**: Task, ReadLints
8
- **Tier 4 (Most Expensive)**: Parallel subagents, Browser MCP
9
-
10
- ## Automatic Triggers
11
-
12
- ### After Code Changes
13
- - After StrReplace/Write → ReadLints (automatic)
14
- - After substantive changes → Shell (tests)
15
-
16
- ### For Exploration
17
- - Know path? → Read
18
- - Pattern? → Glob + Read
19
- - Exact text? → Grep
20
- - Concept? → SemanticSearch
21
- - Broad? → Task (explore)
22
-
23
- ### For Implementation
24
- - New file? → Write
25
- - <50 lines? → StrReplace
26
- - >50 lines? → Write (entire file)
27
-
28
- ### For Complex Tasks
29
- - >10 steps or >5 files → Launch 3-4 parallel subagents
30
-
31
- ## Rules
32
-
33
- 1. Always start with Tier 1, escalate only if needed
34
- 2. Never skip tiers unless justified
35
- 3. Run ReadLints after EVERY code change
36
- 4. Use parallel subagents for broad exploration (>3 files)
37
-
38
- ## Decision Trees
39
- See `.cursor/skills/tool-selection/SKILL.md` for complete decision trees and patterns.
40
-
41
- ## Anti-Patterns to Avoid
42
- - ❌ Tool hoarding (using 5 tools when 1 works)
43
- - ❌ Using expensive tools for simple tasks
44
- - ❌ Skipping validation after edits
45
- - ❌ No checkpoints for risky changes
1
+ # Tool Auto-Selection
2
+
3
+ ## Tool Cost Hierarchy (Start Cheap, Escalate)
4
+
5
+ **Tier 1 (Cheapest)**: Read, Glob, Grep, Bash
6
+ **Tier 2 (Moderate)**: Explore (quick), Edit, Write
7
+ **Tier 3 (Higher)**: Agent, Lint check
8
+ **Tier 4 (Most Expensive)**: Parallel subagents, Browser MCP
9
+
10
+ ## Automatic Triggers
11
+
12
+ ### After Code Changes
13
+ - After Edit/Write → Lint check (automatic)
14
+ - After substantive changes → Bash (tests)
15
+
16
+ ### For Exploration
17
+ - Know path? → Read
18
+ - Pattern? → Glob + Read
19
+ - Exact text? → Grep
20
+ - Concept? → Explore (quick)
21
+ - Broad? → Agent (Explore)
22
+
23
+ ### For Implementation
24
+ - New file? → Write
25
+ - <50 lines? → Edit
26
+ - >50 lines? → Write (entire file)
27
+
28
+ ### For Complex Tasks
29
+ - >10 steps or >5 files → Launch 3-4 parallel subagents
30
+
31
+ ## Rules
32
+
33
+ 1. Always start with Tier 1, escalate only if needed
34
+ 2. Never skip tiers unless justified
35
+ 3. Run Lint check after EVERY code change
36
+ 4. Use parallel subagents for broad exploration (>3 files)
37
+
38
+ ## Decision Trees
39
+ See `.claude/skills/tool-selection/SKILL.md` for complete decision trees and patterns.
40
+
41
+ ## Anti-Patterns to Avoid
42
+ - ❌ Tool hoarding (using 5 tools when 1 works)
43
+ - ❌ Using expensive tools for simple tasks
44
+ - ❌ Skipping validation after edits
45
+ - ❌ No checkpoints for risky changes
@@ -1,22 +1,22 @@
1
- # Tool Selection Strategy
2
-
3
- ## Cost Hierarchy (Start Cheap)
4
- Tier 1: Read, Glob, Grep (fastest)
5
- Tier 2: SemanticSearch, StrReplace, Write
6
- Tier 3: Task, Shell, ReadLints
7
- Tier 4: Parallel subagents, Browser MCP
8
-
9
- ## Automatic Triggers
10
- - After edits → ReadLints automatically
11
- - After substantive changes → Shell (tests)
12
- - Ambiguous requirements → AskQuestion (batch)
13
- - Complex exploration → Task (parallel subagents)
14
-
15
- ## MCP Servers
16
- - cursor-ide-browser: UI changes, visual verification
17
- - user-github: PR/issue operations
18
- - user-ESLint: Code quality checks
19
- - user-context7: Library documentation
20
-
21
- ## Pattern
22
- Follow tool selection examples in @.cursor/skills/tool-selection/SKILL.md
1
+ # Tool Selection Strategy
2
+
3
+ ## Cost Hierarchy (Start Cheap)
4
+ Tier 1: Read, Glob, Grep (fastest)
5
+ Tier 2: Explore (quick), Edit, Write
6
+ Tier 3: Agent, Bash, Lint check
7
+ Tier 4: Parallel subagents, Browser MCP
8
+
9
+ ## Automatic Triggers
10
+ - After edits → Lint check automatically
11
+ - After substantive changes → Bash (tests)
12
+ - Ambiguous requirements → AskUserQuestion (batch)
13
+ - Complex exploration → Agent (parallel subagents)
14
+
15
+ ## MCP Servers
16
+ - claude-in-chrome: UI changes, visual verification
17
+ - github: PR/issue operations
18
+ - eslint: Code quality checks
19
+ - context7: Library documentation
20
+
21
+ ## Pattern
22
+ Follow tool selection examples in @.claude/skills/tool-selection/SKILL.md
@@ -31,7 +31,7 @@ for (const pattern of DANGEROUS_PATTERNS) {
31
31
  console.warn(`⚠️ Potential secret detected (${pattern.name}):\n${result}\n`);
32
32
  leakFound = true;
33
33
  }
34
- } catch (_e) {
34
+ } catch {
35
35
  // Exit code 1 means pattern not found (safe)
36
36
  }
37
37
  }
@@ -1,142 +1,142 @@
1
- # Security Dashboard
2
-
3
- **Last Updated**: Auto-generated after each security scan
4
- **Scan Frequency**: After every code change
5
-
6
- ---
7
-
8
- ## Recent Scans (Last 10)
9
-
10
- | # | Timestamp | Files Changed | Vulnerabilities | Severity | Status |
11
- |---|-----------|---------------|-----------------|----------|--------|
12
- | 1 | - | - | - | - | Pending first scan |
13
-
14
- ---
15
-
16
- ## Vulnerability Trends
17
-
18
- ### This Week
19
- - **Total Scans**: 0
20
- - **Vulnerabilities Found**: 0
21
- - **Critical**: 0
22
- - **High**: 0
23
- - **Medium**: 0
24
- - **Low**: 0
25
-
26
- ### Trend Analysis
27
- - **Vulnerability Rate**: 0% (target: <5%)
28
- - **Detection Accuracy**: >80% (OWASP Top 10)
29
- - **False Positive Rate**: Tracking...
30
-
31
- ---
32
-
33
- ## Common Patterns Detected
34
-
35
- ### Critical/High Severity
36
- 1. **Hardcoded Credentials**
37
- - Pattern: `password = "..."`, `api_key = '...'`
38
- - Fix: Use environment variables
39
- - Occurrences: 0
40
-
41
- 2. **SQL Injection**
42
- - Pattern: Unparameterized queries
43
- - Fix: Use parameterized queries or ORM
44
- - Occurrences: 0
45
-
46
- 3. **XSS (Cross-Site Scripting)**
47
- - Pattern: Unsanitized user input in HTML
48
- - Fix: Sanitize with DOMPurify or similar
49
- - Occurrences: 0
50
-
51
- 4. **Insecure Crypto**
52
- - Pattern: MD5, SHA1, weak algorithms
53
- - Fix: Use SHA-256+, bcrypt, argon2
54
- - Occurrences: 0
55
-
56
- 5. **Path Traversal**
57
- - Pattern: Unvalidated file paths
58
- - Fix: Validate and sanitize paths
59
- - Occurrences: 0
60
-
61
- 6. **Command Injection**
62
- - Pattern: Shell execution with user input
63
- - Fix: Avoid shell, use safe APIs
64
- - Occurrences: 0
65
-
66
- ---
67
-
68
- ## False Positive Tracking
69
-
70
- | Date | Pattern | Reason | Action Taken |
71
- |------|---------|--------|--------------|
72
- | - | - | - | - |
73
-
74
- ---
75
-
76
- ## Security Health Score
77
-
78
- **Current Score**: 100/100 (No vulnerabilities detected)
79
-
80
- **Calculation**:
81
- - Base score: 100
82
- - Critical vulnerabilities: -20 each
83
- - High vulnerabilities: -10 each
84
- - Medium vulnerabilities: -5 each
85
- - Low vulnerabilities: -2 each
86
-
87
- **Target**: >90/100
88
-
89
- ---
90
-
91
- ## Auto-Scan Configuration
92
-
93
- **Enabled**: ✅ Yes
94
- **Trigger**: After every code change
95
- **Severity Threshold**: High
96
- **Scan Patterns**:
97
- - ✅ Hardcoded credentials
98
- - ✅ SQL injection
99
- - ✅ XSS
100
- - ✅ Insecure crypto
101
- - ✅ Path traversal
102
- - ✅ Command injection
103
-
104
- ---
105
-
106
- ## Action Items
107
-
108
- ### Immediate (Critical/High found)
109
- - [ ] None
110
-
111
- ### This Week (Medium found)
112
- - [ ] None
113
-
114
- ### Review (Low/Info found)
115
- - [ ] None
116
-
117
- ---
118
-
119
- ## Related Documentation
120
-
121
- - `.cursor/hooks/auto-security-review.ts` - Security scan hook
122
- - `.cursor/rules/security-critical.md` - Security rules
123
- - `.cursor/hooks.config.json` - Configuration
124
- - `AGENT-INSTRUCTION-BEST-PRACTICES.md` - Security research (AppSec Santa findings)
125
-
126
- ---
127
-
128
- ## Maintenance
129
-
130
- **Weekly Review**:
131
- - [ ] Review false positives
132
- - [ ] Update scan patterns if needed
133
- - [ ] Check detection accuracy
134
-
135
- **Monthly Review**:
136
- - [ ] Analyze vulnerability trends
137
- - [ ] Update severity thresholds
138
- - [ ] Add new OWASP Top 10 patterns
139
-
140
- ---
141
-
142
- *This dashboard is automatically updated by the auto-security-review hook*
1
+ # Security Dashboard
2
+
3
+ **Last Updated**: Auto-generated after each security scan
4
+ **Scan Frequency**: After every code change
5
+
6
+ ---
7
+
8
+ ## Recent Scans (Last 10)
9
+
10
+ | # | Timestamp | Files Changed | Vulnerabilities | Severity | Status |
11
+ |---|-----------|---------------|-----------------|----------|--------|
12
+ | 1 | - | - | - | - | Pending first scan |
13
+
14
+ ---
15
+
16
+ ## Vulnerability Trends
17
+
18
+ ### This Week
19
+ - **Total Scans**: 0
20
+ - **Vulnerabilities Found**: 0
21
+ - **Critical**: 0
22
+ - **High**: 0
23
+ - **Medium**: 0
24
+ - **Low**: 0
25
+
26
+ ### Trend Analysis
27
+ - **Vulnerability Rate**: 0% (target: <5%)
28
+ - **Detection Accuracy**: >80% (OWASP Top 10)
29
+ - **False Positive Rate**: Tracking...
30
+
31
+ ---
32
+
33
+ ## Common Patterns Detected
34
+
35
+ ### Critical/High Severity
36
+ 1. **Hardcoded Credentials**
37
+ - Pattern: `password = "..."`, `api_key = '...'`
38
+ - Fix: Use environment variables
39
+ - Occurrences: 0
40
+
41
+ 2. **SQL Injection**
42
+ - Pattern: Unparameterized queries
43
+ - Fix: Use parameterized queries or ORM
44
+ - Occurrences: 0
45
+
46
+ 3. **XSS (Cross-Site Scripting)**
47
+ - Pattern: Unsanitized user input in HTML
48
+ - Fix: Sanitize with DOMPurify or similar
49
+ - Occurrences: 0
50
+
51
+ 4. **Insecure Crypto**
52
+ - Pattern: MD5, SHA1, weak algorithms
53
+ - Fix: Use SHA-256+, bcrypt, argon2
54
+ - Occurrences: 0
55
+
56
+ 5. **Path Traversal**
57
+ - Pattern: Unvalidated file paths
58
+ - Fix: Validate and sanitize paths
59
+ - Occurrences: 0
60
+
61
+ 6. **Command Injection**
62
+ - Pattern: Shell execution with user input
63
+ - Fix: Avoid shell, use safe APIs
64
+ - Occurrences: 0
65
+
66
+ ---
67
+
68
+ ## False Positive Tracking
69
+
70
+ | Date | Pattern | Reason | Action Taken |
71
+ |------|---------|--------|--------------|
72
+ | - | - | - | - |
73
+
74
+ ---
75
+
76
+ ## Security Health Score
77
+
78
+ **Current Score**: 100/100 (No vulnerabilities detected)
79
+
80
+ **Calculation**:
81
+ - Base score: 100
82
+ - Critical vulnerabilities: -20 each
83
+ - High vulnerabilities: -10 each
84
+ - Medium vulnerabilities: -5 each
85
+ - Low vulnerabilities: -2 each
86
+
87
+ **Target**: >90/100
88
+
89
+ ---
90
+
91
+ ## Auto-Scan Configuration
92
+
93
+ **Enabled**: ✅ Yes
94
+ **Trigger**: After every code change
95
+ **Severity Threshold**: High
96
+ **Scan Patterns**:
97
+ - ✅ Hardcoded credentials
98
+ - ✅ SQL injection
99
+ - ✅ XSS
100
+ - ✅ Insecure crypto
101
+ - ✅ Path traversal
102
+ - ✅ Command injection
103
+
104
+ ---
105
+
106
+ ## Action Items
107
+
108
+ ### Immediate (Critical/High found)
109
+ - [ ] None
110
+
111
+ ### This Week (Medium found)
112
+ - [ ] None
113
+
114
+ ### Review (Low/Info found)
115
+ - [ ] None
116
+
117
+ ---
118
+
119
+ ## Related Documentation
120
+
121
+ - `.claude/hooks/auto-security-review.ts` - Security scan hook
122
+ - `.claude/rules/security-critical.md` - Security rules
123
+ - `.claude/hooks.config.json` - Configuration
124
+ - `AGENT-INSTRUCTION-BEST-PRACTICES.md` - Security research (AppSec Santa findings)
125
+
126
+ ---
127
+
128
+ ## Maintenance
129
+
130
+ **Weekly Review**:
131
+ - [ ] Review false positives
132
+ - [ ] Update scan patterns if needed
133
+ - [ ] Check detection accuracy
134
+
135
+ **Monthly Review**:
136
+ - [ ] Analyze vulnerability trends
137
+ - [ ] Update severity thresholds
138
+ - [ ] Add new OWASP Top 10 patterns
139
+
140
+ ---
141
+
142
+ *This dashboard is automatically updated by the auto-security-review hook*
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
+ "hooks": {
4
+ "PostToolUse": [
5
+ {
6
+ "matcher": "Edit|Write|MultiEdit",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "npx -y tsx \"$CLAUDE_PROJECT_DIR/.claude/hooks/auto-lint-fix.ts\"",
11
+ "timeout": 90
12
+ }
13
+ ]
14
+ }
15
+ ],
16
+ "Stop": [
17
+ {
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "npx -y tsx \"$CLAUDE_PROJECT_DIR/.claude/hooks/auto-validate.ts\"",
22
+ "timeout": 300
23
+ },
24
+ {
25
+ "type": "command",
26
+ "command": "npx -y tsx \"$CLAUDE_PROJECT_DIR/.claude/hooks/auto-security-review.ts\"",
27
+ "timeout": 60
28
+ },
29
+ {
30
+ "type": "command",
31
+ "command": "npx -y tsx \"$CLAUDE_PROJECT_DIR/.claude/hooks/plan-quality-tracker.ts\"",
32
+ "timeout": 60
33
+ }
34
+ ]
35
+ }
36
+ ],
37
+ "SessionStart": [
38
+ {
39
+ "matcher": "startup",
40
+ "hooks": [
41
+ {
42
+ "type": "command",
43
+ "command": "npx -y tsx \"$CLAUDE_PROJECT_DIR/.claude/hooks/auto-learning-review.ts\"",
44
+ "timeout": 60
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ }
50
+ }