claude-code-autoconfig 1.0.15 → 1.0.16
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/commands/autoconfig.md +176 -266
- package/.claude/guide/autoconfig.guide.html +1739 -1869
- package/.claude/settings.json +1 -1
- package/.claude/settings.local.json +1 -7
- package/bin/cli.js +57 -20
- package/package.json +1 -1
|
@@ -1,266 +1,176 @@
|
|
|
1
|
-
<!-- @description The command you just ran. Analyzes your project and populates CLAUDE.md with real context. Re-run anytime your stack changes. -->
|
|
2
|
-
|
|
3
|
-
# Autoconfig
|
|
4
|
-
|
|
5
|
-
Analyze this project and configure Claude Code with real context.
|
|
6
|
-
|
|
7
|
-
## Step
|
|
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
|
-
3
|
|
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
|
-
- `django` in imports → Django
|
|
178
|
-
- `flask` in imports → Flask
|
|
179
|
-
- `fastapi` in imports → FastAPI
|
|
180
|
-
- `express` in dependencies → Express
|
|
181
|
-
- `rails` / `Gemfile` with rails → Rails
|
|
182
|
-
- `laravel` → Laravel
|
|
183
|
-
|
|
184
|
-
**Testing Frameworks:**
|
|
185
|
-
- `jest.config.*` / `@jest` in deps → Jest
|
|
186
|
-
- `vitest.config.*` → Vitest
|
|
187
|
-
- `pytest.ini` / `conftest.py` → Pytest
|
|
188
|
-
- `*_test.go` files → Go testing
|
|
189
|
-
- `*_spec.rb` files → RSpec
|
|
190
|
-
- `cypress/` or `playwright/` → E2E testing
|
|
191
|
-
|
|
192
|
-
**Infrastructure:**
|
|
193
|
-
- `Dockerfile` / `docker-compose.*` → Docker
|
|
194
|
-
- `*.tf` files → Terraform
|
|
195
|
-
- `k8s/` or `kubernetes/` → Kubernetes
|
|
196
|
-
- `.github/workflows/` → GitHub Actions
|
|
197
|
-
- `serverless.yml` → Serverless Framework
|
|
198
|
-
|
|
199
|
-
## Step 4: Populate CLAUDE.md
|
|
200
|
-
|
|
201
|
-
Focus on what Claude Code actually needs to work effectively. Claude can explore the codebase itself — don't document what it can discover.
|
|
202
|
-
|
|
203
|
-
**Wrap content in markers** so `/sync-claude-md` knows what's auto-generated:
|
|
204
|
-
|
|
205
|
-
```markdown
|
|
206
|
-
<!-- AUTO-GENERATED BY /autoconfig — Do not edit. Use .claude/feedback/ for corrections. -->
|
|
207
|
-
|
|
208
|
-
# Project Name
|
|
209
|
-
...content...
|
|
210
|
-
|
|
211
|
-
<!-- END AUTO-GENERATED -->
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**Always include:**
|
|
215
|
-
- **Project name + one-liner**: What is this thing?
|
|
216
|
-
- **Tech stack**: Runtime, framework, database, key services (so Claude uses correct patterns)
|
|
217
|
-
- **Commands**: How to run, test, build, deploy — Claude needs these to execute tasks
|
|
218
|
-
- **Non-obvious conventions**: Multi-schema databases, monorepo structure, unusual patterns Claude wouldn't infer
|
|
219
|
-
|
|
220
|
-
**Include if relevant:**
|
|
221
|
-
- **Deployment flow**: If non-standard or involves multiple steps
|
|
222
|
-
- **Key architectural decisions**: Only if Claude would make wrong assumptions without them
|
|
223
|
-
|
|
224
|
-
**Skip these — Claude can discover them:**
|
|
225
|
-
- Detailed project structure trees (Claude can run `ls` or `tree`)
|
|
226
|
-
- Exhaustive route/endpoint lists (Claude can grep)
|
|
227
|
-
- File-by-file descriptions (Claude can read files)
|
|
228
|
-
- Database model lists (Claude can read schema files)
|
|
229
|
-
|
|
230
|
-
**Keep it tight.** A 30-line CLAUDE.md that hits the essentials beats a 200-line doc Claude has to parse every session.
|
|
231
|
-
|
|
232
|
-
**Always end with:**
|
|
233
|
-
```markdown
|
|
234
|
-
## Team Feedback
|
|
235
|
-
See `.claude/feedback/` for corrections and guidance from the team.
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
This pointer persists across autoconfig runs and directs Claude to team-maintained content.
|
|
239
|
-
|
|
240
|
-
## Guidelines
|
|
241
|
-
|
|
242
|
-
- Replace ALL placeholder content with real values from THIS project
|
|
243
|
-
- Delete sections that don't apply — no empty stubs
|
|
244
|
-
- Optimize for Claude's efficiency, not human documentation
|
|
245
|
-
- When uncertain, leave it out — Claude can ask or explore
|
|
246
|
-
|
|
247
|
-
## Step 5: Update the Guide
|
|
248
|
-
|
|
249
|
-
After populating CLAUDE.md, update the guide's file preview to show the actual content:
|
|
250
|
-
|
|
251
|
-
1. Open `.claude/guide/autoconfig.guide.html`
|
|
252
|
-
2. Find the `fileContents` JavaScript object (search for `'claude-md':`)
|
|
253
|
-
3. Replace the `content` value with the actual CLAUDE.md content you just generated
|
|
254
|
-
4. Use template literal syntax and escape any backticks in the content
|
|
255
|
-
|
|
256
|
-
This ensures double-clicking CLAUDE.md in the guide shows the real generated content.
|
|
257
|
-
|
|
258
|
-
## After Completion
|
|
259
|
-
|
|
260
|
-
Once autoconfig is complete, open the interactive guide in the user's browser:
|
|
261
|
-
|
|
262
|
-
- macOS: `open .claude/guide/autoconfig.guide.html`
|
|
263
|
-
- Linux: `xdg-open .claude/guide/autoconfig.guide.html`
|
|
264
|
-
- Windows: `start .claude/guide/autoconfig.guide.html`
|
|
265
|
-
|
|
266
|
-
This shows the user what got installed and how to use it.
|
|
1
|
+
<!-- @description The command you just ran. Analyzes your project and populates CLAUDE.md with real context. Re-run anytime your stack changes. -->
|
|
2
|
+
|
|
3
|
+
# Autoconfig
|
|
4
|
+
|
|
5
|
+
Analyze this project and configure Claude Code with real context.
|
|
6
|
+
|
|
7
|
+
## Step 1: Detect Environment
|
|
8
|
+
|
|
9
|
+
**Operating System:**
|
|
10
|
+
Check the platform and note it for command syntax:
|
|
11
|
+
- Windows → use `del`, `rmdir`, backslashes, `.cmd`/`.ps1` scripts
|
|
12
|
+
- macOS/Linux → use `rm`, `mkdir -p`, forward slashes, `.sh` scripts
|
|
13
|
+
|
|
14
|
+
Include this in CLAUDE.md so all commands use the correct syntax.
|
|
15
|
+
|
|
16
|
+
## Step 2: Scan the Project
|
|
17
|
+
|
|
18
|
+
Look for these indicators to understand the project:
|
|
19
|
+
|
|
20
|
+
**Package/Config Files:**
|
|
21
|
+
- `package.json` → Node.js, npm scripts, dependencies
|
|
22
|
+
- `requirements.txt` / `pyproject.toml` / `setup.py` → Python
|
|
23
|
+
- `Cargo.toml` → Rust
|
|
24
|
+
- `go.mod` → Go
|
|
25
|
+
- `Gemfile` → Ruby
|
|
26
|
+
- `pom.xml` / `build.gradle` → Java
|
|
27
|
+
- `*.csproj` / `*.sln` → .NET
|
|
28
|
+
- `composer.json` → PHP
|
|
29
|
+
|
|
30
|
+
**Framework Indicators:**
|
|
31
|
+
- `next.config.*` / `app/` directory → Next.js
|
|
32
|
+
- `vite.config.*` → Vite
|
|
33
|
+
- `angular.json` → Angular
|
|
34
|
+
- `svelte.config.*` → Svelte
|
|
35
|
+
- `remix.config.*` → Remix
|
|
36
|
+
- `nuxt.config.*` → Nuxt
|
|
37
|
+
- `django` in imports → Django
|
|
38
|
+
- `flask` in imports → Flask
|
|
39
|
+
- `fastapi` in imports → FastAPI
|
|
40
|
+
- `express` in dependencies → Express
|
|
41
|
+
- `rails` / `Gemfile` with rails → Rails
|
|
42
|
+
- `laravel` → Laravel
|
|
43
|
+
|
|
44
|
+
**Testing Frameworks:**
|
|
45
|
+
- `jest.config.*` / `@jest` in deps → Jest
|
|
46
|
+
- `vitest.config.*` → Vitest
|
|
47
|
+
- `pytest.ini` / `conftest.py` → Pytest
|
|
48
|
+
- `*_test.go` files → Go testing
|
|
49
|
+
- `*_spec.rb` files → RSpec
|
|
50
|
+
- `cypress/` or `playwright/` → E2E testing
|
|
51
|
+
|
|
52
|
+
**Infrastructure:**
|
|
53
|
+
- `Dockerfile` / `docker-compose.*` → Docker
|
|
54
|
+
- `*.tf` files → Terraform
|
|
55
|
+
- `k8s/` or `kubernetes/` → Kubernetes
|
|
56
|
+
- `.github/workflows/` → GitHub Actions
|
|
57
|
+
- `serverless.yml` → Serverless Framework
|
|
58
|
+
|
|
59
|
+
## Step 3: Populate CLAUDE.md
|
|
60
|
+
|
|
61
|
+
Focus on what Claude Code actually needs to work effectively. Claude can explore the codebase itself — don't document what it can discover.
|
|
62
|
+
|
|
63
|
+
**Wrap content in markers** so `/sync-claude-md` knows what's auto-generated:
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
<!-- AUTO-GENERATED BY /autoconfig — Do not edit. Use .claude/feedback/ for corrections. -->
|
|
67
|
+
|
|
68
|
+
# Project Name
|
|
69
|
+
...content...
|
|
70
|
+
|
|
71
|
+
<!-- END AUTO-GENERATED -->
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Always include:**
|
|
75
|
+
- **Project name + one-liner**: What is this thing?
|
|
76
|
+
- **Tech stack**: Runtime, framework, database, key services (so Claude uses correct patterns)
|
|
77
|
+
- **Commands**: How to run, test, build, deploy — Claude needs these to execute tasks
|
|
78
|
+
- **Non-obvious conventions**: Multi-schema databases, monorepo structure, unusual patterns Claude wouldn't infer
|
|
79
|
+
|
|
80
|
+
**Include if relevant:**
|
|
81
|
+
- **Deployment flow**: If non-standard or involves multiple steps
|
|
82
|
+
- **Key architectural decisions**: Only if Claude would make wrong assumptions without them
|
|
83
|
+
|
|
84
|
+
**Skip these — Claude can discover them:**
|
|
85
|
+
- Detailed project structure trees (Claude can run `ls` or `tree`)
|
|
86
|
+
- Exhaustive route/endpoint lists (Claude can grep)
|
|
87
|
+
- File-by-file descriptions (Claude can read files)
|
|
88
|
+
- Database model lists (Claude can read schema files)
|
|
89
|
+
|
|
90
|
+
**Keep it tight.** A 30-line CLAUDE.md that hits the essentials beats a 200-line doc Claude has to parse every session.
|
|
91
|
+
|
|
92
|
+
**Always end with:**
|
|
93
|
+
```markdown
|
|
94
|
+
## Team Feedback
|
|
95
|
+
See `.claude/feedback/` for corrections and guidance from the team.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This pointer persists across autoconfig runs and directs Claude to team-maintained content.
|
|
99
|
+
|
|
100
|
+
## Step 4: Create Rules Directory
|
|
101
|
+
|
|
102
|
+
Create an empty `.claude/rules/` directory. Do not create any subdirectories or rule files.
|
|
103
|
+
|
|
104
|
+
Rules are path-scoped context files that load automatically when Claude works on matching files. Effective rules require deep understanding of your codebase patterns, team conventions, and quality goals — they should be crafted intentionally, not auto-generated.
|
|
105
|
+
|
|
106
|
+
## Step 5: Configure Settings
|
|
107
|
+
|
|
108
|
+
Update `.claude/settings.json` using the official schema.
|
|
109
|
+
|
|
110
|
+
### Deny Patterns (files Claude shouldn't read/write)
|
|
111
|
+
|
|
112
|
+
Use `Read()` for blocking reads, `Edit()` for blocking writes:
|
|
113
|
+
|
|
114
|
+
**Always deny (security):**
|
|
115
|
+
```
|
|
116
|
+
Read(./.env)
|
|
117
|
+
Read(./.env.*)
|
|
118
|
+
Read(./secrets/**)
|
|
119
|
+
Edit(./.env)
|
|
120
|
+
Edit(./.env.*)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Often deny (generated/vendor):**
|
|
124
|
+
```
|
|
125
|
+
Edit(./node_modules/**)
|
|
126
|
+
Edit(./dist/**)
|
|
127
|
+
Edit(./.git/**)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Allow Patterns (auto-approve without prompting)
|
|
131
|
+
|
|
132
|
+
Use `Bash()` patterns with prefix matching:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Bash(npm run test:*)
|
|
136
|
+
Bash(npm run lint:*)
|
|
137
|
+
Bash(npm run build)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Environment Variables
|
|
141
|
+
|
|
142
|
+
Set session-level env vars:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"env": {
|
|
147
|
+
"NODE_ENV": "development"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Keep it minimal** — only include patterns that actually exist in this project.
|
|
153
|
+
|
|
154
|
+
## Guidelines
|
|
155
|
+
|
|
156
|
+
- Replace ALL placeholder content with real values from THIS project
|
|
157
|
+
- Delete sections that don't apply — no empty stubs
|
|
158
|
+
- Optimize for Claude's efficiency, not human documentation
|
|
159
|
+
- When uncertain, leave it out — Claude can ask or explore
|
|
160
|
+
|
|
161
|
+
## Step 6: Update the Guide
|
|
162
|
+
|
|
163
|
+
After populating CLAUDE.md, update the guide's file preview to show the actual content:
|
|
164
|
+
|
|
165
|
+
1. Open `.claude/guide/autoconfig.guide.html`
|
|
166
|
+
2. Find the `fileContents` JavaScript object (search for `'claude-md':`)
|
|
167
|
+
3. Replace the `content` value with the actual CLAUDE.md content you just generated
|
|
168
|
+
4. Use template literal syntax and escape any backticks in the content
|
|
169
|
+
|
|
170
|
+
This ensures double-clicking CLAUDE.md in the guide shows the real generated content.
|
|
171
|
+
|
|
172
|
+
## After Completion
|
|
173
|
+
|
|
174
|
+
Once autoconfig is complete, prompt the user:
|
|
175
|
+
|
|
176
|
+
**Run `/show-guide` for an interactive walkthrough of your new Claude Code project setup.**
|