claudex-setup 0.1.0 → 0.2.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0] - 2026-03-31
4
+
5
+ ### Added
6
+ - 50+ audit checks (up from 16)
7
+ - 8 new categories: Design, DevOps, Hygiene, Performance, MCP, Prompting, Git Safety, Automation
8
+ - 6 new stack detections: Svelte, Flutter, Ruby, Java, Kotlin, Swift
9
+ - Improved CLAUDE.md template with Mermaid diagrams and XML constraints
10
+ - Auto-sync with CLAUDEX research catalog (1,107 items)
11
+ - Copy-paste config snippets in fix suggestions
12
+
13
+ ### Changed
14
+ - Knowledge base upgraded from 972 to 1,107 verified techniques
15
+ - Better scoring weights per category
16
+
17
+ ## [0.1.0] - 2026-03-30
18
+
19
+ ### Added
20
+ - Initial release
21
+ - 16 audit checks
22
+ - Automatic setup with CLAUDE.md, hooks, commands, skills, rules, agents
23
+ - Stack detection for 12 frameworks
24
+ - JSON output mode
package/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # claudex-setup
2
2
 
3
- > Audit and optimize any project for Claude Code. Powered by 972 verified techniques.
3
+ > Audit and optimize any project for Claude Code. Powered by 1,107 verified techniques.
4
4
 
5
- One command to make your project Claude Code-ready.
5
+ [![npm version](https://img.shields.io/npm/v/claudex-setup)](https://www.npmjs.com/package/claudex-setup)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+
8
+ One command to make your project Claude Code-ready. Detects your stack, scores your setup against 50+ checks, and auto-generates everything Claude Code needs to work at full capacity.
6
9
 
7
10
  ## Quick Start
8
11
 
@@ -14,78 +17,204 @@ npx claudex-setup
14
17
  npx claudex-setup setup
15
18
  ```
16
19
 
17
- ## What it does
20
+ That's it. No config files, no dependencies to install.
18
21
 
19
- **Audit** scans your project and scores it against 12 critical Claude Code best practices:
22
+ ## Example Output
20
23
 
21
24
  ```
22
- claudex-setup audit
23
- ═══════════════════════════════════════
24
- Detected: React, TypeScript
25
-
26
- ██████████████░░░░░░ 71/100
25
+ claudex-setup v0.2.0
26
+ ═══════════════════════════════════════════════════
27
+
28
+ Detected stack: React, TypeScript, Docker
29
+
30
+ ██████████████░░░░░░░░░░░░ 54/100
31
+
32
+ ┌─────────────────────────────────────────────────┐
33
+ │ CATEGORY SCORE CHECKS │
34
+ │ Memory 8/15 CLAUDE.md, rules │
35
+ │ Quality 6/15 verification, linting │
36
+ │ Git Safety 5/10 hooks, permissions │
37
+ │ Workflow 4/10 commands, skills │
38
+ │ Security 3/10 permissions, secrets │
39
+ │ Automation 5/10 hooks, agents │
40
+ │ Design 4/10 Mermaid, XML tags │
41
+ │ DevOps 3/5 Docker, CI │
42
+ │ Hygiene 4/5 .gitignore, cleanup │
43
+ │ Performance 4/5 context, compaction │
44
+ │ MCP 3/5 servers, tools │
45
+ │ Prompting 5/5 constraints, chains │
46
+ └─────────────────────────────────────────────────┘
47
+
48
+ ✅ Passing (12)
49
+ CLAUDE.md exists with project instructions
50
+ Pre-commit hook configured
51
+ Custom slash commands defined
52
+ .gitignore tracks .claude/ correctly
53
+ Docker stack detected and configured
54
+ ...
27
55
 
28
- Passing
29
- CLAUDE.md project instructions
30
- Hooks for automation
31
- Custom slash commands
56
+ ⚠️ Warnings (6)
57
+ No Mermaid architecture diagram in CLAUDE.md
58
+ Add a ```mermaid graph to visualize project structure
59
+ Missing XML constraint tags
60
+ → Wrap critical rules in <constraints> tags for 30% better adherence
32
61
  ...
33
62
 
34
- 🔴 Critical
35
- Verification criteria in CLAUDE.md
36
- → Add test/lint commands so Claude can verify its own work.
63
+ 🔴 Critical (3)
64
+ No verification criteria in CLAUDE.md
65
+ → Add test/lint commands so Claude can verify its own work
66
+ Example:
67
+ ## Verification
68
+ - Run `npm test` before committing
69
+ - Run `npm run lint` to check style
37
70
 
38
- Run npx claudex-setup setup to fix automatically
71
+ No security permissions configured
72
+ → Create .claude/settings.json with allowed commands
73
+
74
+ No self-correction workflow
75
+ → Add review commands for generate → review → refine cycles
76
+
77
+ ───────────────────────────────────────────────────
78
+ Run `npx claudex-setup setup` to fix 9 issues automatically
39
79
  ```
40
80
 
41
- **Setup** creates the missing configuration automatically:
81
+ ## What It Checks
82
+
83
+ ### 📋 Memory (8 checks)
84
+ - CLAUDE.md exists with project instructions
85
+ - CLAUDE.md includes stack-specific guidance
86
+ - Architecture section with Mermaid diagram
87
+ - Verification criteria (test/lint commands)
88
+ - Coding conventions documented
89
+ - Error handling patterns defined
90
+ - Session memory configured
91
+ - State tracking files present
92
+
93
+ ### ✅ Quality (7 checks)
94
+ - Self-correction chains (generate → review → refine)
95
+ - Constraint-based validation blocks
96
+ - Verification loops for claims
97
+ - Quality gates before commits
98
+ - Duplicate detection rules
99
+ - Metadata sync requirements
100
+ - Iron Law enforcement (evidence for all claims)
101
+
102
+ ### 🔒 Git Safety (5 checks)
103
+ - Pre-commit hooks configured
104
+ - Destructive command warnings
105
+ - Force-push protection
106
+ - Branch naming conventions
107
+ - Commit message standards
108
+
109
+ ### 🔄 Workflow (6 checks)
110
+ - Custom slash commands defined
111
+ - Skills for domain workflows
112
+ - Rules for path-specific conventions
113
+ - Agents for specialized tasks
114
+ - Command templates present
115
+ - Workflow documentation
116
+
117
+ ### 🛡️ Security (5 checks)
118
+ - Permissions configured in settings.json
119
+ - Secrets excluded from commits
120
+ - Allowed/denied command lists
121
+ - MCP server permissions
122
+ - Environment variable handling
123
+
124
+ ### ⚙️ Automation (5 checks)
125
+ - Edit hooks for linting
126
+ - Save hooks for formatting
127
+ - Notification hooks
128
+ - Log rotation configured
129
+ - Auto-sync with knowledge base
130
+
131
+ ### 🎨 Design (4 checks)
132
+ - Mermaid diagrams for architecture
133
+ - XML tags for structured prompts
134
+ - Documents at top of prompts
135
+ - Meta-prompting patterns
136
+
137
+ ### 🚀 DevOps (3 checks)
138
+ - CI/CD pipeline detection
139
+ - Docker configuration
140
+ - Deployment instructions in CLAUDE.md
141
+
142
+ ### 🧹 Hygiene (3 checks)
143
+ - .gitignore tracks .claude/ correctly
144
+ - No stale configuration files
145
+ - Clean project structure
146
+
147
+ ### ⚡ Performance (3 checks)
148
+ - Context management strategy
149
+ - Compaction triggers documented
150
+ - Tool search over full loads
151
+
152
+ ### 🔌 MCP (3 checks)
153
+ - MCP servers configured
154
+ - MCP tools documented
155
+ - Server permissions set
156
+
157
+ ### 💬 Prompting (3 checks)
158
+ - Constraint tags used
159
+ - Self-validation blocks
160
+ - Research methodology defined
161
+
162
+ ## Auto-Generated Setup
163
+
164
+ Running `npx claudex-setup setup` creates everything your project needs:
42
165
 
43
166
  ```
44
- ✅ Created CLAUDE.md
45
- ✅ Created .claude/hooks/on-edit-lint.sh
46
- ✅ Created .claude/commands/test.md
47
- ✅ Created .claude/commands/review.md
48
- ✅ Created .claude/skills/fix-issue/SKILL.md
49
- ✅ Created .claude/agents/security-reviewer.md
50
-
51
- 7 files created.
167
+ ✅ Created CLAUDE.md — project instructions with Mermaid diagram
168
+ ✅ Created .claude/settings.json — permissions and security
169
+ ✅ Created .claude/hooks/ — pre-commit, on-edit linting
170
+ ✅ Created .claude/commands/ — /test, /review, /deploy
171
+ ✅ Created .claude/skills/ — domain-specific workflows
172
+ ✅ Created .claude/rules/ — path-specific conventions
173
+ ✅ Created .claude/agents/ — specialized subagents
174
+
175
+ 7 configs created. Your project is now Claude Code-ready.
52
176
  ```
53
177
 
54
- ## What it checks
55
-
56
- | Check | Impact | What |
57
- |-------|--------|------|
58
- | CLAUDE.md | Critical | Project instructions for Claude |
59
- | Verification | Critical | Test/lint commands for self-checking |
60
- | Hooks | High | Automation on file edits |
61
- | Commands | High | Custom slash commands |
62
- | Mermaid diagram | High | Architecture visualization (73% token savings) |
63
- | XML tags | High | Structured prompts |
64
- | Skills | Medium | Domain-specific workflows |
65
- | Rules | Medium | Path-specific coding conventions |
66
- | Agents | Medium | Specialized subagents |
67
- | MCP servers | Medium | External tool integration |
68
- | Permissions | Medium | Security configuration |
69
- | .gitignore | High | Track .claude/ in version control |
178
+ All generated files are tailored to your detected stack. A React + TypeScript project gets different hooks, commands, and CLAUDE.md content than a Python + FastAPI project.
179
+
180
+ ## Stack Detection
181
+
182
+ Automatically detects and tailors configuration for:
183
+
184
+ | Category | Frameworks |
185
+ |----------|-----------|
186
+ | Frontend | React, Vue, Angular, Next.js, Svelte |
187
+ | Backend | Node.js, Python, Django, FastAPI, Ruby |
188
+ | Mobile | Flutter, Swift, Kotlin |
189
+ | Systems | Rust, Go, Java |
190
+ | Language | TypeScript, JavaScript |
191
+ | Infra | Docker, Kubernetes |
192
+
193
+ Detection is based on package.json, requirements.txt, Cargo.toml, go.mod, pubspec.yaml, Gemfile, build.gradle, Package.swift, and other standard manifest files.
70
194
 
71
195
  ## Options
72
196
 
73
197
  ```bash
74
- npx claudex-setup # Audit (default)
75
- npx claudex-setup audit # Audit explicitly
76
- npx claudex-setup audit --verbose # Show all recommendations
77
- npx claudex-setup audit --json # JSON output
78
- npx claudex-setup setup # Apply fixes
79
- npx claudex-setup --help # Help
198
+ npx claudex-setup # Audit (default)
199
+ npx claudex-setup audit # Audit explicitly
200
+ npx claudex-setup audit --verbose # Show all checks with details
201
+ npx claudex-setup audit --json # Machine-readable JSON output
202
+ npx claudex-setup setup # Auto-generate missing configs
203
+ npx claudex-setup setup --auto # Non-interactive, accept all defaults
204
+ npx claudex-setup --help # Show help
80
205
  ```
81
206
 
82
- ## Stack Detection
207
+ ## Backed by Research
208
+
209
+ Every check and template is derived from the [CLAUDEX](https://github.com/DnaFin/claudex) research catalog — a systematic audit of 1,107 verified Claude Code techniques across 13 research categories. This includes findings from all 73 official Claude Code documentation pages, community reports, and hands-on experiments.
83
210
 
84
- Automatically detects: React, Vue, Angular, Next.js, Python, Django, FastAPI, Node.js, TypeScript, Rust, Go, Docker and tailors recommendations.
211
+ The knowledge base is continuously updated. Run `npx claudex-setup` periodically to pick up new checks and improved templates.
85
212
 
86
- ## Why
213
+ ## Requirements
87
214
 
88
- Claude Code is powerful but most projects are barely optimized for it. A proper CLAUDE.md, hooks, and skills can **3-5x your productivity**. This tool applies the knowledge from [CLAUDEX](https://github.com/DnaFin/claudex) — a research catalog of 972 verified Claude Code techniques.
215
+ - Node.js 18+
216
+ - Works on macOS, Linux, and Windows
217
+ - No global install needed (npx handles it)
89
218
 
90
219
  ## License
91
220
 
package/bin/cli.js CHANGED
@@ -11,13 +11,14 @@ const flags = args.filter(a => a.startsWith('--'));
11
11
  const HELP = `
12
12
  claudex-setup v${version}
13
13
  Audit and optimize any project for Claude Code.
14
- Powered by 972 verified techniques.
14
+ Powered by 1,107 verified techniques.
15
15
 
16
16
  Usage:
17
17
  npx claudex-setup Run audit on current directory
18
18
  npx claudex-setup audit Same as above
19
19
  npx claudex-setup setup Apply recommended configuration
20
20
  npx claudex-setup setup --auto Apply all recommendations without prompts
21
+ npx claudex-setup badge Generate shields.io badge markdown
21
22
 
22
23
  Options:
23
24
  --verbose Show detailed analysis
@@ -45,7 +46,14 @@ async function main() {
45
46
  };
46
47
 
47
48
  try {
48
- if (command === 'setup') {
49
+ if (command === 'badge') {
50
+ const { getBadgeMarkdown } = require('../src/badge');
51
+ const result = await audit({ ...options, silent: true });
52
+ console.log(getBadgeMarkdown(result.score));
53
+ console.log('');
54
+ console.log('Add this to your README.md');
55
+ process.exit(0);
56
+ } else if (command === 'setup') {
49
57
  await setup(options);
50
58
  } else {
51
59
  await audit(options);
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "claudex-setup",
3
- "version": "0.1.0",
4
- "description": "Audit and optimize any project for Claude Code. Powered by 972 verified techniques.",
3
+ "version": "0.2.1",
4
+ "description": "Audit and optimize any project for Claude Code. Powered by 1107 verified techniques.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
7
7
  "claudex-setup": "bin/cli.js"
8
8
  },
9
+ "files": [
10
+ "bin",
11
+ "src",
12
+ "README.md",
13
+ "CHANGELOG.md"
14
+ ],
9
15
  "scripts": {
10
16
  "start": "node bin/cli.js",
11
17
  "test": "node test/run.js"
@@ -25,7 +31,7 @@
25
31
  "license": "MIT",
26
32
  "repository": {
27
33
  "type": "git",
28
- "url": "https://github.com/DnaFin/claudex-setup"
34
+ "url": "git+https://github.com/DnaFin/claudex.git"
29
35
  },
30
36
  "engines": {
31
37
  "node": ">=18.0.0"
package/src/audit.js CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  const { TECHNIQUES, STACKS } = require('./techniques');
6
6
  const { ProjectContext } = require('./context');
7
+ const { getBadgeMarkdown } = require('./badge');
7
8
 
8
9
  const COLORS = {
9
10
  reset: '\x1b[0m',
@@ -27,7 +28,24 @@ function progressBar(score, max = 100, width = 20) {
27
28
  return colorize('█'.repeat(filled), color) + colorize('░'.repeat(empty), 'dim');
28
29
  }
29
30
 
31
+ const EFFORT_ORDER = { critical: 0, high: 1, medium: 2 };
32
+
33
+ function getQuickWins(failed) {
34
+ // Quick wins = medium impact items first (easiest), then high, sorted by name length (shorter = simpler)
35
+ return [...failed]
36
+ .sort((a, b) => {
37
+ const effortA = EFFORT_ORDER[a.impact] ?? 3;
38
+ const effortB = EFFORT_ORDER[b.impact] ?? 3;
39
+ // Prefer medium (easiest to fix), then high, then critical
40
+ if (effortA !== effortB) return effortB - effortA;
41
+ // Tie-break by fix length (shorter fix description = likely simpler)
42
+ return (a.fix || '').length - (b.fix || '').length;
43
+ })
44
+ .slice(0, 3);
45
+ }
46
+
30
47
  async function audit(options) {
48
+ const silent = options.silent || false;
31
49
  const ctx = new ProjectContext(options.dir);
32
50
  const stacks = ctx.detectStacks(STACKS);
33
51
  const results = [];
@@ -54,9 +72,14 @@ async function audit(options) {
54
72
  const earnedScore = passed.reduce((sum, r) => sum + (weights[r.impact] || 5), 0);
55
73
  const score = Math.round((earnedScore / maxScore) * 100);
56
74
 
75
+ // Silent mode: skip all output, just return result
76
+ if (silent) {
77
+ return { score, passed: passed.length, failed: failed.length, stacks, results };
78
+ }
79
+
57
80
  if (options.json) {
58
81
  console.log(JSON.stringify({ score, stacks, passed: passed.length, failed: failed.length, results }, null, 2));
59
- return;
82
+ return { score, passed: passed.length, failed: failed.length, stacks, results };
60
83
  }
61
84
 
62
85
  // Display results
@@ -115,6 +138,18 @@ async function audit(options) {
115
138
  console.log('');
116
139
  }
117
140
 
141
+ // Quick wins
142
+ if (failed.length > 0) {
143
+ const quickWins = getQuickWins(failed);
144
+ console.log(colorize(' ⚡ Quick wins (easiest fixes first)', 'magenta'));
145
+ for (let i = 0; i < quickWins.length; i++) {
146
+ const r = quickWins[i];
147
+ console.log(` ${i + 1}. ${colorize(r.name, 'bold')}`);
148
+ console.log(colorize(` → ${r.fix}`, 'dim'));
149
+ }
150
+ console.log('');
151
+ }
152
+
118
153
  // Summary
119
154
  console.log(colorize(' ─────────────────────────────────────', 'dim'));
120
155
  console.log(` ${colorize(`${passed.length}/${results.length}`, 'bold')} checks passing`);
@@ -124,11 +159,13 @@ async function audit(options) {
124
159
  }
125
160
 
126
161
  console.log('');
127
- console.log(colorize(' Powered by CLAUDEX - 972 verified Claude Code techniques', 'dim'));
128
- console.log(colorize(' https://github.com/naorp/claudex-setup', 'dim'));
162
+ console.log(` Add to README: ${getBadgeMarkdown(score)}`);
163
+ console.log('');
164
+ console.log(colorize(' Powered by CLAUDEX - 1,107 verified Claude Code techniques', 'dim'));
165
+ console.log(colorize(' https://github.com/DnaFin/claudex', 'dim'));
129
166
  console.log('');
130
167
 
131
- return { score, passed: passed.length, failed: failed.length, stacks };
168
+ return { score, passed: passed.length, failed: failed.length, stacks, results };
132
169
  }
133
170
 
134
171
  module.exports = { audit };
package/src/badge.js ADDED
@@ -0,0 +1,13 @@
1
+ function getBadgeUrl(score) {
2
+ const color = score >= 80 ? 'brightgreen' : score >= 60 ? 'yellow' : score >= 40 ? 'orange' : 'red';
3
+ const label = encodeURIComponent('Claude Code Ready');
4
+ const message = encodeURIComponent(`${score}/100`);
5
+ return `https://img.shields.io/badge/${label}-${message}-${color}`;
6
+ }
7
+
8
+ function getBadgeMarkdown(score) {
9
+ const url = getBadgeUrl(score);
10
+ return `[![Claude Code Ready](${url})](https://github.com/DnaFin/claudex)`;
11
+ }
12
+
13
+ module.exports = { getBadgeUrl, getBadgeMarkdown };
@@ -0,0 +1,7 @@
1
+ {
2
+ "synced_from": "claudex",
3
+ "synced_at": "2026-03-30T23:05:29Z",
4
+ "total_items": 1107,
5
+ "tested": 948,
6
+ "last_id": 1157
7
+ }