clauderc 1.0.0
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/README.md +221 -0
- package/bin/cli.js +802 -0
- package/package.json +44 -0
- package/src/detector.js +387 -0
- package/src/project.js +435 -0
- package/src/stacks.js +299 -0
- package/templates/agents/project-setup-wizard.md +230 -0
- package/templates/commands/lint.md +33 -0
- package/templates/commands/pr.md +46 -0
- package/templates/commands/setup.md +51 -0
- package/templates/commands/test.md +33 -0
- package/templates/commands/verify.md +69 -0
- package/templates/manifest.json +93 -0
- package/templates/project-setup/AGENTS_TEMPLATE.md +100 -0
- package/templates/project-setup/CLAUDE_MD_TEMPLATE.md +49 -0
- package/templates/project-setup/COMMANDS_TEMPLATE.md +92 -0
- package/templates/project-setup/SKILLS_TEMPLATE.md +113 -0
- package/templates/project-setup/TEAM_DOCS_TEMPLATE.md +102 -0
- package/templates/skills/claude-code-templates/SKILL.md +260 -0
- package/templates/skills/project-analysis/SKILL.md +184 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Claude Code Templates Skill
|
|
2
|
+
|
|
3
|
+
Quick access to templates for setting up Claude Code in projects.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Creating CLAUDE.md for a project
|
|
8
|
+
- Setting up slash commands
|
|
9
|
+
- Creating custom skills
|
|
10
|
+
- Adding subagents to a project
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
### CLAUDE.md Structure
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
# Project Name
|
|
18
|
+
|
|
19
|
+
## Stack
|
|
20
|
+
- Language: X
|
|
21
|
+
- Framework: Y
|
|
22
|
+
- Package Manager: Z
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
\`\`\`bash
|
|
26
|
+
# Dev
|
|
27
|
+
npm run dev
|
|
28
|
+
|
|
29
|
+
# Test
|
|
30
|
+
npm test
|
|
31
|
+
|
|
32
|
+
# Build
|
|
33
|
+
npm run build
|
|
34
|
+
\`\`\`
|
|
35
|
+
|
|
36
|
+
## Code Style
|
|
37
|
+
- [Key conventions]
|
|
38
|
+
|
|
39
|
+
## Workflow
|
|
40
|
+
- Plan Mode for: refactors, new features, architecture
|
|
41
|
+
- Always verify before commit
|
|
42
|
+
|
|
43
|
+
## Docs
|
|
44
|
+
@README.md
|
|
45
|
+
@docs/architecture.md
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Keep under 100 lines. Link to detailed docs with @imports.**
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### Slash Command Template
|
|
53
|
+
|
|
54
|
+
Location: `.claude/commands/<name>.md`
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
# Command description in one line
|
|
58
|
+
|
|
59
|
+
## What it does
|
|
60
|
+
1. Step one
|
|
61
|
+
2. Step two
|
|
62
|
+
|
|
63
|
+
## Implementation
|
|
64
|
+
\`\`\`bash
|
|
65
|
+
your-command-here
|
|
66
|
+
\`\`\`
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### Skill Template
|
|
72
|
+
|
|
73
|
+
Location: `.claude/skills/<name>/SKILL.md`
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
# Skill Name
|
|
77
|
+
|
|
78
|
+
Brief description.
|
|
79
|
+
|
|
80
|
+
## When to Use
|
|
81
|
+
- Scenario 1
|
|
82
|
+
- Scenario 2
|
|
83
|
+
|
|
84
|
+
## Workflow
|
|
85
|
+
1. Step one
|
|
86
|
+
2. Step two
|
|
87
|
+
|
|
88
|
+
## Checklist
|
|
89
|
+
- [ ] Item 1
|
|
90
|
+
- [ ] Item 2
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### Subagent Template
|
|
96
|
+
|
|
97
|
+
Location: `.claude/agents/<name>.md`
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
---
|
|
101
|
+
name: agent-name
|
|
102
|
+
description: One-line description
|
|
103
|
+
model: inherit
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
You are a [ROLE].
|
|
107
|
+
|
|
108
|
+
## Responsibilities
|
|
109
|
+
1. Task one
|
|
110
|
+
2. Task two
|
|
111
|
+
|
|
112
|
+
## Output Format
|
|
113
|
+
[How to structure output]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### settings.json Template
|
|
119
|
+
|
|
120
|
+
Location: `.claude/settings.json`
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"permissions": {
|
|
125
|
+
"allow": [
|
|
126
|
+
"Bash(npm:*)",
|
|
127
|
+
"Bash(git:*)"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"hooks": {
|
|
131
|
+
"PostToolUse": [
|
|
132
|
+
{
|
|
133
|
+
"matcher": "Edit|Write",
|
|
134
|
+
"hooks": ["npm run lint --fix || true"]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Stack-Specific Templates
|
|
144
|
+
|
|
145
|
+
### Node.js/TypeScript
|
|
146
|
+
|
|
147
|
+
**CLAUDE.md commands:**
|
|
148
|
+
```bash
|
|
149
|
+
# Dev
|
|
150
|
+
npm run dev
|
|
151
|
+
|
|
152
|
+
# Test
|
|
153
|
+
npm test
|
|
154
|
+
|
|
155
|
+
# Lint
|
|
156
|
+
npm run lint
|
|
157
|
+
|
|
158
|
+
# Build
|
|
159
|
+
npm run build
|
|
160
|
+
|
|
161
|
+
# Verify
|
|
162
|
+
npm run lint && npm test && npm run build
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**settings.json hooks:**
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"hooks": {
|
|
169
|
+
"PostToolUse": [{
|
|
170
|
+
"matcher": "Edit|Write",
|
|
171
|
+
"hooks": ["npx eslint --fix ${file} || true"]
|
|
172
|
+
}]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Python
|
|
178
|
+
|
|
179
|
+
**CLAUDE.md commands:**
|
|
180
|
+
```bash
|
|
181
|
+
# Dev
|
|
182
|
+
python -m uvicorn app.main:app --reload
|
|
183
|
+
|
|
184
|
+
# Test
|
|
185
|
+
pytest
|
|
186
|
+
|
|
187
|
+
# Lint
|
|
188
|
+
ruff check --fix .
|
|
189
|
+
|
|
190
|
+
# Type Check
|
|
191
|
+
mypy .
|
|
192
|
+
|
|
193
|
+
# Verify
|
|
194
|
+
ruff check . && mypy . && pytest
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**settings.json hooks:**
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"hooks": {
|
|
201
|
+
"PostToolUse": [{
|
|
202
|
+
"matcher": "Edit|Write",
|
|
203
|
+
"hooks": ["ruff format ${file} || true"]
|
|
204
|
+
}]
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Go
|
|
210
|
+
|
|
211
|
+
**CLAUDE.md commands:**
|
|
212
|
+
```bash
|
|
213
|
+
# Dev
|
|
214
|
+
go run ./cmd/server
|
|
215
|
+
|
|
216
|
+
# Test
|
|
217
|
+
go test ./...
|
|
218
|
+
|
|
219
|
+
# Lint
|
|
220
|
+
golangci-lint run
|
|
221
|
+
|
|
222
|
+
# Build
|
|
223
|
+
go build ./...
|
|
224
|
+
|
|
225
|
+
# Verify
|
|
226
|
+
golangci-lint run && go test ./... && go build ./...
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Rust
|
|
230
|
+
|
|
231
|
+
**CLAUDE.md commands:**
|
|
232
|
+
```bash
|
|
233
|
+
# Dev
|
|
234
|
+
cargo run
|
|
235
|
+
|
|
236
|
+
# Test
|
|
237
|
+
cargo test
|
|
238
|
+
|
|
239
|
+
# Lint
|
|
240
|
+
cargo clippy
|
|
241
|
+
|
|
242
|
+
# Format
|
|
243
|
+
cargo fmt
|
|
244
|
+
|
|
245
|
+
# Verify
|
|
246
|
+
cargo fmt --check && cargo clippy && cargo test && cargo build
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Full Templates Location
|
|
252
|
+
|
|
253
|
+
For complete templates with examples, see:
|
|
254
|
+
`~/.claude/templates/project-setup/`
|
|
255
|
+
|
|
256
|
+
- `CLAUDE_MD_TEMPLATE.md` - Full CLAUDE.md template
|
|
257
|
+
- `COMMANDS_TEMPLATE.md` - All standard commands
|
|
258
|
+
- `SKILLS_TEMPLATE.md` - Skill examples
|
|
259
|
+
- `AGENTS_TEMPLATE.md` - Subagent examples
|
|
260
|
+
- `TEAM_DOCS_TEMPLATE.md` - Team documentation
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Project Analysis Skill
|
|
2
|
+
|
|
3
|
+
Systematic analysis of any software project to understand stack, structure, and development workflow.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Before setting up Claude Code for a project
|
|
8
|
+
- When joining a new codebase
|
|
9
|
+
- When auditing project structure
|
|
10
|
+
- Before major refactoring
|
|
11
|
+
|
|
12
|
+
## Quick Analysis Checklist
|
|
13
|
+
|
|
14
|
+
### 1. Identify Language & Package Manager
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Check for config files
|
|
18
|
+
ls -la package.json pyproject.toml requirements.txt go.mod Cargo.toml composer.json pom.xml build.gradle 2>/dev/null
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
| File Found | Language | Package Manager |
|
|
22
|
+
|------------|----------|-----------------|
|
|
23
|
+
| `package.json` | JavaScript/TypeScript | npm/pnpm/bun/yarn |
|
|
24
|
+
| `pnpm-lock.yaml` | - | pnpm |
|
|
25
|
+
| `bun.lockb` | - | bun |
|
|
26
|
+
| `yarn.lock` | - | yarn |
|
|
27
|
+
| `pyproject.toml` | Python | poetry/pip |
|
|
28
|
+
| `requirements.txt` | Python | pip |
|
|
29
|
+
| `go.mod` | Go | go mod |
|
|
30
|
+
| `Cargo.toml` | Rust | cargo |
|
|
31
|
+
| `composer.json` | PHP | composer |
|
|
32
|
+
| `pom.xml` | Java | maven |
|
|
33
|
+
| `build.gradle` | Java/Kotlin | gradle |
|
|
34
|
+
|
|
35
|
+
### 2. Detect Framework
|
|
36
|
+
|
|
37
|
+
**Node.js** - Check `package.json` dependencies:
|
|
38
|
+
- `next` → Next.js
|
|
39
|
+
- `react` → React (check for vite/CRA)
|
|
40
|
+
- `vue` → Vue.js
|
|
41
|
+
- `express`/`fastify`/`hono` → Backend
|
|
42
|
+
- `electron` → Desktop
|
|
43
|
+
|
|
44
|
+
**Python** - Check imports or dependencies:
|
|
45
|
+
- `django` → Django
|
|
46
|
+
- `fastapi` → FastAPI
|
|
47
|
+
- `flask` → Flask
|
|
48
|
+
- `pytorch`/`tensorflow` → ML
|
|
49
|
+
|
|
50
|
+
### 3. Identify Testing & Linting
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Node.js
|
|
54
|
+
cat package.json | grep -E "(jest|vitest|mocha|eslint|prettier|biome)"
|
|
55
|
+
|
|
56
|
+
# Python
|
|
57
|
+
cat pyproject.toml | grep -E "(pytest|ruff|black|mypy)"
|
|
58
|
+
|
|
59
|
+
# Check for config files
|
|
60
|
+
ls -la jest.config* vitest.config* pytest.ini .eslintrc* .prettierrc* ruff.toml
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 4. Check Project Structure
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Is it a monorepo?
|
|
67
|
+
ls -la turbo.json nx.json pnpm-workspace.yaml lerna.json 2>/dev/null
|
|
68
|
+
|
|
69
|
+
# Check directory structure
|
|
70
|
+
ls -la src/ app/ lib/ packages/ apps/ 2>/dev/null
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
| Indicator | Type |
|
|
74
|
+
|-----------|------|
|
|
75
|
+
| `packages/` + `turbo.json` | Turborepo monorepo |
|
|
76
|
+
| `apps/` + `packages/` | Nx or similar |
|
|
77
|
+
| `pnpm-workspace.yaml` | pnpm workspace |
|
|
78
|
+
| Single `src/` | Standard single repo |
|
|
79
|
+
|
|
80
|
+
### 5. Check CI/CD
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
ls -la .github/workflows/ .gitlab-ci.yml .circleci/ Jenkinsfile 2>/dev/null
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 6. Read Existing Docs
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Check for existing docs
|
|
90
|
+
cat README.md 2>/dev/null | head -100
|
|
91
|
+
cat CONTRIBUTING.md 2>/dev/null | head -50
|
|
92
|
+
cat CLAUDE.md 2>/dev/null
|
|
93
|
+
ls -la .claude/ 2>/dev/null
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Output Template
|
|
97
|
+
|
|
98
|
+
After analysis, produce this summary:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
## Project Analysis
|
|
102
|
+
|
|
103
|
+
### Stack
|
|
104
|
+
- **Language**: [X]
|
|
105
|
+
- **Framework**: [Y]
|
|
106
|
+
- **Package Manager**: [Z]
|
|
107
|
+
- **Runtime**: [Node vX / Python X.X / etc]
|
|
108
|
+
|
|
109
|
+
### Testing & Quality
|
|
110
|
+
- **Test Framework**: [jest/vitest/pytest/etc]
|
|
111
|
+
- **Linter**: [eslint/ruff/golangci-lint/etc]
|
|
112
|
+
- **Formatter**: [prettier/black/gofmt/etc]
|
|
113
|
+
- **Type Checking**: [TypeScript/mypy/etc]
|
|
114
|
+
|
|
115
|
+
### Structure
|
|
116
|
+
- **Type**: [monorepo/single]
|
|
117
|
+
- **Architecture**: [frontend/backend/fullstack]
|
|
118
|
+
- **Key Directories**: [list main dirs]
|
|
119
|
+
|
|
120
|
+
### Scripts Available
|
|
121
|
+
```bash
|
|
122
|
+
# From package.json/Makefile/etc
|
|
123
|
+
dev: [command]
|
|
124
|
+
test: [command]
|
|
125
|
+
build: [command]
|
|
126
|
+
lint: [command]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### CI/CD
|
|
130
|
+
- **Platform**: [GitHub Actions/GitLab CI/etc]
|
|
131
|
+
- **Key Workflows**: [list]
|
|
132
|
+
|
|
133
|
+
### Documentation Status
|
|
134
|
+
- [ ] README.md - [exists/missing] - [quality]
|
|
135
|
+
- [ ] CONTRIBUTING.md - [exists/missing]
|
|
136
|
+
- [ ] CLAUDE.md - [exists/missing]
|
|
137
|
+
|
|
138
|
+
### Recommendations
|
|
139
|
+
1. [First recommendation]
|
|
140
|
+
2. [Second recommendation]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Common Patterns by Stack
|
|
144
|
+
|
|
145
|
+
### Next.js App Router
|
|
146
|
+
```
|
|
147
|
+
app/
|
|
148
|
+
├── layout.tsx
|
|
149
|
+
├── page.tsx
|
|
150
|
+
├── api/
|
|
151
|
+
└── components/
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Turborepo
|
|
155
|
+
```
|
|
156
|
+
apps/
|
|
157
|
+
├── web/
|
|
158
|
+
└── docs/
|
|
159
|
+
packages/
|
|
160
|
+
├── ui/
|
|
161
|
+
└── config/
|
|
162
|
+
turbo.json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### FastAPI
|
|
166
|
+
```
|
|
167
|
+
app/
|
|
168
|
+
├── main.py
|
|
169
|
+
├── routers/
|
|
170
|
+
├── models/
|
|
171
|
+
└── services/
|
|
172
|
+
tests/
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Go Standard
|
|
176
|
+
```
|
|
177
|
+
cmd/
|
|
178
|
+
├── server/
|
|
179
|
+
internal/
|
|
180
|
+
├── handlers/
|
|
181
|
+
├── services/
|
|
182
|
+
pkg/
|
|
183
|
+
go.mod
|
|
184
|
+
```
|