claude-code-templates 1.2.0 → 1.3.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/package.json +10 -8
- package/src/command-scanner.js +1 -1
- package/src/file-operations.js +44 -3
- package/src/hook-scanner.js +229 -52
- package/src/index.js +23 -3
- package/src/prompts.js +68 -2
- package/src/templates.js +31 -8
- package/scripts/sync-templates.js +0 -182
- package/templates/common/.claude/commands/git-workflow.md +0 -239
- package/templates/common/.claude/commands/project-setup.md +0 -316
- package/templates/common/CLAUDE.md +0 -109
- package/templates/common/README.md +0 -96
- package/templates/go/README.md +0 -25
- package/templates/javascript-typescript/.claude/commands/api-endpoint.md +0 -51
- package/templates/javascript-typescript/.claude/commands/debug.md +0 -52
- package/templates/javascript-typescript/.claude/commands/lint.md +0 -48
- package/templates/javascript-typescript/.claude/commands/npm-scripts.md +0 -48
- package/templates/javascript-typescript/.claude/commands/refactor.md +0 -55
- package/templates/javascript-typescript/.claude/commands/test.md +0 -61
- package/templates/javascript-typescript/.claude/commands/typescript-migrate.md +0 -51
- package/templates/javascript-typescript/.claude/settings.json +0 -142
- package/templates/javascript-typescript/.mcp.json +0 -13
- package/templates/javascript-typescript/CLAUDE.md +0 -185
- package/templates/javascript-typescript/README.md +0 -259
- package/templates/javascript-typescript/examples/angular-app/.claude/commands/components.md +0 -63
- package/templates/javascript-typescript/examples/angular-app/.claude/commands/services.md +0 -62
- package/templates/javascript-typescript/examples/node-api/.claude/commands/api-endpoint.md +0 -46
- package/templates/javascript-typescript/examples/node-api/.claude/commands/database.md +0 -56
- package/templates/javascript-typescript/examples/node-api/.claude/commands/middleware.md +0 -61
- package/templates/javascript-typescript/examples/node-api/.claude/commands/route.md +0 -57
- package/templates/javascript-typescript/examples/node-api/CLAUDE.md +0 -102
- package/templates/javascript-typescript/examples/react-app/.claude/commands/component.md +0 -29
- package/templates/javascript-typescript/examples/react-app/.claude/commands/hooks.md +0 -44
- package/templates/javascript-typescript/examples/react-app/.claude/commands/state-management.md +0 -45
- package/templates/javascript-typescript/examples/react-app/CLAUDE.md +0 -81
- package/templates/javascript-typescript/examples/vue-app/.claude/commands/components.md +0 -46
- package/templates/javascript-typescript/examples/vue-app/.claude/commands/composables.md +0 -51
- package/templates/python/.claude/commands/django-model.md +0 -124
- package/templates/python/.claude/commands/flask-route.md +0 -217
- package/templates/python/.claude/commands/lint.md +0 -111
- package/templates/python/.claude/commands/test.md +0 -73
- package/templates/python/CLAUDE.md +0 -276
- package/templates/rust/README.md +0 -26
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
# Project Setup Helper
|
|
2
|
-
|
|
3
|
-
Set up new projects with proper structure and best practices.
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
This command helps you set up new projects with proper directory structure, configuration files, and development environment.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
/project-setup
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## What this command does
|
|
16
|
-
|
|
17
|
-
1. **Creates project structure** with standard directories
|
|
18
|
-
2. **Sets up configuration files** (.gitignore, README, etc.)
|
|
19
|
-
3. **Initializes version control** and development tools
|
|
20
|
-
4. **Configures environment files** and dependencies
|
|
21
|
-
5. **Follows language-specific** conventions and best practices
|
|
22
|
-
|
|
23
|
-
## Project Structure Templates
|
|
24
|
-
|
|
25
|
-
### Generic Project Structure
|
|
26
|
-
```
|
|
27
|
-
project-name/
|
|
28
|
-
├── README.md # Project documentation
|
|
29
|
-
├── .gitignore # Git ignore rules
|
|
30
|
-
├── .env.example # Environment variables template
|
|
31
|
-
├── LICENSE # Project license
|
|
32
|
-
├── CHANGELOG.md # Version history
|
|
33
|
-
├── docs/ # Documentation
|
|
34
|
-
│ ├── API.md
|
|
35
|
-
│ ├── CONTRIBUTING.md
|
|
36
|
-
│ └── DEPLOYMENT.md
|
|
37
|
-
├── src/ # Source code
|
|
38
|
-
│ ├── main/
|
|
39
|
-
│ ├── utils/
|
|
40
|
-
│ └── config/
|
|
41
|
-
├── tests/ # Test files
|
|
42
|
-
│ ├── unit/
|
|
43
|
-
│ ├── integration/
|
|
44
|
-
│ └── fixtures/
|
|
45
|
-
├── scripts/ # Build and deployment scripts
|
|
46
|
-
│ ├── build.sh
|
|
47
|
-
│ ├── deploy.sh
|
|
48
|
-
│ └── setup.sh
|
|
49
|
-
└── config/ # Configuration files
|
|
50
|
-
├── development.yml
|
|
51
|
-
├── production.yml
|
|
52
|
-
└── testing.yml
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Web Application Structure
|
|
56
|
-
```
|
|
57
|
-
web-app/
|
|
58
|
-
├── public/ # Static assets
|
|
59
|
-
│ ├── index.html
|
|
60
|
-
│ ├── favicon.ico
|
|
61
|
-
│ └── assets/
|
|
62
|
-
│ ├── css/
|
|
63
|
-
│ ├── js/
|
|
64
|
-
│ └── images/
|
|
65
|
-
├── src/ # Source code
|
|
66
|
-
│ ├── components/ # Reusable components
|
|
67
|
-
│ ├── pages/ # Page components
|
|
68
|
-
│ ├── services/ # API services
|
|
69
|
-
│ ├── utils/ # Utility functions
|
|
70
|
-
│ ├── styles/ # Stylesheets
|
|
71
|
-
│ └── config/ # Configuration
|
|
72
|
-
├── tests/ # Test files
|
|
73
|
-
└── build/ # Build output
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### API Project Structure
|
|
77
|
-
```
|
|
78
|
-
api-project/
|
|
79
|
-
├── src/
|
|
80
|
-
│ ├── controllers/ # Request handlers
|
|
81
|
-
│ ├── models/ # Data models
|
|
82
|
-
│ ├── services/ # Business logic
|
|
83
|
-
│ ├── middleware/ # Custom middleware
|
|
84
|
-
│ ├── routes/ # API routes
|
|
85
|
-
│ ├── utils/ # Utility functions
|
|
86
|
-
│ └── config/ # Configuration
|
|
87
|
-
├── tests/
|
|
88
|
-
│ ├── unit/
|
|
89
|
-
│ ├── integration/
|
|
90
|
-
│ └── e2e/
|
|
91
|
-
├── docs/
|
|
92
|
-
│ ├── api-spec.yml # OpenAPI specification
|
|
93
|
-
│ └── README.md
|
|
94
|
-
└── scripts/
|
|
95
|
-
├── seed-db.js # Database seeding
|
|
96
|
-
└── migrate.js # Database migrations
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Essential Configuration Files
|
|
100
|
-
|
|
101
|
-
### .gitignore Template
|
|
102
|
-
```gitignore
|
|
103
|
-
# Dependencies
|
|
104
|
-
node_modules/
|
|
105
|
-
*.log
|
|
106
|
-
npm-debug.log*
|
|
107
|
-
|
|
108
|
-
# Environment files
|
|
109
|
-
.env
|
|
110
|
-
.env.local
|
|
111
|
-
.env.production
|
|
112
|
-
|
|
113
|
-
# Build outputs
|
|
114
|
-
dist/
|
|
115
|
-
build/
|
|
116
|
-
*.tgz
|
|
117
|
-
|
|
118
|
-
# IDE files
|
|
119
|
-
.vscode/
|
|
120
|
-
.idea/
|
|
121
|
-
*.swp
|
|
122
|
-
*.swo
|
|
123
|
-
|
|
124
|
-
# OS files
|
|
125
|
-
.DS_Store
|
|
126
|
-
Thumbs.db
|
|
127
|
-
|
|
128
|
-
# Temporary files
|
|
129
|
-
*.tmp
|
|
130
|
-
*.temp
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### README.md Template
|
|
134
|
-
```markdown
|
|
135
|
-
# Project Name
|
|
136
|
-
|
|
137
|
-
Brief description of what this project does.
|
|
138
|
-
|
|
139
|
-
## Features
|
|
140
|
-
|
|
141
|
-
- Feature 1
|
|
142
|
-
- Feature 2
|
|
143
|
-
- Feature 3
|
|
144
|
-
|
|
145
|
-
## Installation
|
|
146
|
-
|
|
147
|
-
\`\`\`bash
|
|
148
|
-
# Clone the repository
|
|
149
|
-
git clone https://github.com/username/project-name.git
|
|
150
|
-
|
|
151
|
-
# Install dependencies
|
|
152
|
-
npm install
|
|
153
|
-
|
|
154
|
-
# Copy environment file
|
|
155
|
-
cp .env.example .env
|
|
156
|
-
\`\`\`
|
|
157
|
-
|
|
158
|
-
## Usage
|
|
159
|
-
|
|
160
|
-
\`\`\`bash
|
|
161
|
-
# Start development server
|
|
162
|
-
npm run dev
|
|
163
|
-
|
|
164
|
-
# Run tests
|
|
165
|
-
npm test
|
|
166
|
-
|
|
167
|
-
# Build for production
|
|
168
|
-
npm run build
|
|
169
|
-
\`\`\`
|
|
170
|
-
|
|
171
|
-
## API Documentation
|
|
172
|
-
|
|
173
|
-
[API documentation](docs/API.md)
|
|
174
|
-
|
|
175
|
-
## Contributing
|
|
176
|
-
|
|
177
|
-
Please read [CONTRIBUTING.md](docs/CONTRIBUTING.md) for details.
|
|
178
|
-
|
|
179
|
-
## License
|
|
180
|
-
|
|
181
|
-
This project is licensed under the MIT License - see [LICENSE](LICENSE) file.
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### .env.example Template
|
|
185
|
-
```env
|
|
186
|
-
# Application
|
|
187
|
-
NODE_ENV=development
|
|
188
|
-
PORT=3000
|
|
189
|
-
HOST=localhost
|
|
190
|
-
|
|
191
|
-
# Database
|
|
192
|
-
DB_HOST=localhost
|
|
193
|
-
DB_PORT=5432
|
|
194
|
-
DB_NAME=myapp
|
|
195
|
-
DB_USER=username
|
|
196
|
-
DB_PASSWORD=password
|
|
197
|
-
|
|
198
|
-
# API Keys
|
|
199
|
-
API_KEY=your-api-key-here
|
|
200
|
-
SECRET_KEY=your-secret-key-here
|
|
201
|
-
|
|
202
|
-
# External Services
|
|
203
|
-
REDIS_URL=redis://localhost:6379
|
|
204
|
-
EMAIL_SERVICE_API_KEY=your-email-key
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## Development Environment Setup
|
|
208
|
-
|
|
209
|
-
### Package.json Scripts
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"scripts": {
|
|
213
|
-
"start": "node src/index.js",
|
|
214
|
-
"dev": "nodemon src/index.js",
|
|
215
|
-
"test": "jest",
|
|
216
|
-
"test:watch": "jest --watch",
|
|
217
|
-
"test:coverage": "jest --coverage",
|
|
218
|
-
"lint": "eslint src/",
|
|
219
|
-
"lint:fix": "eslint src/ --fix",
|
|
220
|
-
"format": "prettier --write src/",
|
|
221
|
-
"build": "webpack --mode production",
|
|
222
|
-
"build:dev": "webpack --mode development",
|
|
223
|
-
"clean": "rm -rf dist/"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### Git Initialization
|
|
229
|
-
```bash
|
|
230
|
-
# Initialize Git repository
|
|
231
|
-
git init
|
|
232
|
-
|
|
233
|
-
# Add initial files
|
|
234
|
-
git add .
|
|
235
|
-
|
|
236
|
-
# Create initial commit
|
|
237
|
-
git commit -m "feat: initial project setup
|
|
238
|
-
|
|
239
|
-
- Add project structure
|
|
240
|
-
- Configure development environment
|
|
241
|
-
- Add documentation templates
|
|
242
|
-
- Set up testing framework"
|
|
243
|
-
|
|
244
|
-
# Add remote origin
|
|
245
|
-
git remote add origin https://github.com/username/project-name.git
|
|
246
|
-
|
|
247
|
-
# Push to remote
|
|
248
|
-
git push -u origin main
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
## Language-Specific Setup
|
|
252
|
-
|
|
253
|
-
### Node.js/JavaScript
|
|
254
|
-
```bash
|
|
255
|
-
npm init -y
|
|
256
|
-
npm install --save-dev nodemon jest eslint prettier
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Python
|
|
260
|
-
```bash
|
|
261
|
-
python -m venv venv
|
|
262
|
-
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
263
|
-
pip install -r requirements.txt
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
### Docker Setup
|
|
267
|
-
```dockerfile
|
|
268
|
-
# Dockerfile
|
|
269
|
-
FROM node:16-alpine
|
|
270
|
-
WORKDIR /app
|
|
271
|
-
COPY package*.json ./
|
|
272
|
-
RUN npm install
|
|
273
|
-
COPY . .
|
|
274
|
-
EXPOSE 3000
|
|
275
|
-
CMD ["npm", "start"]
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
```yaml
|
|
279
|
-
# docker-compose.yml
|
|
280
|
-
version: '3.8'
|
|
281
|
-
services:
|
|
282
|
-
app:
|
|
283
|
-
build: .
|
|
284
|
-
ports:
|
|
285
|
-
- "3000:3000"
|
|
286
|
-
environment:
|
|
287
|
-
- NODE_ENV=development
|
|
288
|
-
volumes:
|
|
289
|
-
- .:/app
|
|
290
|
-
- /app/node_modules
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
## Best Practices
|
|
294
|
-
|
|
295
|
-
1. **Consistent Structure** - Follow established conventions
|
|
296
|
-
2. **Clear Documentation** - Write comprehensive README
|
|
297
|
-
3. **Environment Variables** - Keep secrets out of code
|
|
298
|
-
4. **Version Control** - Initialize Git from the start
|
|
299
|
-
5. **Testing Setup** - Configure testing from day one
|
|
300
|
-
6. **Code Quality** - Set up linting and formatting
|
|
301
|
-
7. **CI/CD Ready** - Structure for automated deployment
|
|
302
|
-
8. **Security** - Include security best practices
|
|
303
|
-
|
|
304
|
-
## Checklist
|
|
305
|
-
|
|
306
|
-
- [ ] Create project directory structure
|
|
307
|
-
- [ ] Initialize version control (Git)
|
|
308
|
-
- [ ] Set up package manager (npm, pip, etc.)
|
|
309
|
-
- [ ] Create README.md with project info
|
|
310
|
-
- [ ] Add .gitignore file
|
|
311
|
-
- [ ] Set up environment variables
|
|
312
|
-
- [ ] Configure linting and formatting
|
|
313
|
-
- [ ] Set up testing framework
|
|
314
|
-
- [ ] Create basic documentation
|
|
315
|
-
- [ ] Add license file
|
|
316
|
-
- [ ] Set up CI/CD configuration (if needed)
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Universal Development Guidelines
|
|
6
|
-
|
|
7
|
-
### Code Quality Standards
|
|
8
|
-
- Write clean, readable, and maintainable code
|
|
9
|
-
- Follow consistent naming conventions across the project
|
|
10
|
-
- Use meaningful variable and function names
|
|
11
|
-
- Keep functions focused and single-purpose
|
|
12
|
-
- Add comments for complex logic and business rules
|
|
13
|
-
|
|
14
|
-
### Git Workflow
|
|
15
|
-
- Use descriptive commit messages following conventional commits format
|
|
16
|
-
- Create feature branches for new development
|
|
17
|
-
- Keep commits atomic and focused on single changes
|
|
18
|
-
- Use pull requests for code review before merging
|
|
19
|
-
- Maintain a clean commit history
|
|
20
|
-
|
|
21
|
-
### Documentation
|
|
22
|
-
- Keep README.md files up to date
|
|
23
|
-
- Document public APIs and interfaces
|
|
24
|
-
- Include usage examples for complex features
|
|
25
|
-
- Maintain inline code documentation
|
|
26
|
-
- Update documentation when making changes
|
|
27
|
-
|
|
28
|
-
### Testing Approach
|
|
29
|
-
- Write tests for new features and bug fixes
|
|
30
|
-
- Maintain good test coverage
|
|
31
|
-
- Use descriptive test names that explain the expected behavior
|
|
32
|
-
- Organize tests logically by feature or module
|
|
33
|
-
- Run tests before committing changes
|
|
34
|
-
|
|
35
|
-
### Security Best Practices
|
|
36
|
-
- Never commit sensitive information (API keys, passwords, tokens)
|
|
37
|
-
- Use environment variables for configuration
|
|
38
|
-
- Validate input data and sanitize outputs
|
|
39
|
-
- Follow principle of least privilege
|
|
40
|
-
- Keep dependencies updated
|
|
41
|
-
|
|
42
|
-
## Project Structure Guidelines
|
|
43
|
-
|
|
44
|
-
### File Organization
|
|
45
|
-
- Group related files in logical directories
|
|
46
|
-
- Use consistent file and folder naming conventions
|
|
47
|
-
- Separate source code from configuration files
|
|
48
|
-
- Keep build artifacts out of version control
|
|
49
|
-
- Organize assets and resources appropriately
|
|
50
|
-
|
|
51
|
-
### Configuration Management
|
|
52
|
-
- Use configuration files for environment-specific settings
|
|
53
|
-
- Centralize configuration in dedicated files
|
|
54
|
-
- Use environment variables for sensitive or environment-specific data
|
|
55
|
-
- Document configuration options and their purposes
|
|
56
|
-
- Provide example configuration files
|
|
57
|
-
|
|
58
|
-
## Development Workflow
|
|
59
|
-
|
|
60
|
-
### Before Starting Work
|
|
61
|
-
1. Pull latest changes from main branch
|
|
62
|
-
2. Create a new feature branch
|
|
63
|
-
3. Review existing code and architecture
|
|
64
|
-
4. Plan the implementation approach
|
|
65
|
-
|
|
66
|
-
### During Development
|
|
67
|
-
1. Make incremental commits with clear messages
|
|
68
|
-
2. Run tests frequently to catch issues early
|
|
69
|
-
3. Follow established coding standards
|
|
70
|
-
4. Update documentation as needed
|
|
71
|
-
|
|
72
|
-
### Before Submitting
|
|
73
|
-
1. Run full test suite
|
|
74
|
-
2. Check code quality and formatting
|
|
75
|
-
3. Update documentation if necessary
|
|
76
|
-
4. Create clear pull request description
|
|
77
|
-
|
|
78
|
-
## Common Patterns
|
|
79
|
-
|
|
80
|
-
### Error Handling
|
|
81
|
-
- Use appropriate error handling mechanisms for the language
|
|
82
|
-
- Provide meaningful error messages
|
|
83
|
-
- Log errors appropriately for debugging
|
|
84
|
-
- Handle edge cases gracefully
|
|
85
|
-
- Don't expose sensitive information in error messages
|
|
86
|
-
|
|
87
|
-
### Performance Considerations
|
|
88
|
-
- Profile code for performance bottlenecks
|
|
89
|
-
- Optimize database queries and API calls
|
|
90
|
-
- Use caching where appropriate
|
|
91
|
-
- Consider memory usage and resource management
|
|
92
|
-
- Monitor and measure performance metrics
|
|
93
|
-
|
|
94
|
-
### Code Reusability
|
|
95
|
-
- Extract common functionality into reusable modules
|
|
96
|
-
- Use dependency injection for better testability
|
|
97
|
-
- Create utility functions for repeated operations
|
|
98
|
-
- Design interfaces for extensibility
|
|
99
|
-
- Follow DRY (Don't Repeat Yourself) principle
|
|
100
|
-
|
|
101
|
-
## Review Checklist
|
|
102
|
-
|
|
103
|
-
Before marking any task as complete:
|
|
104
|
-
- [ ] Code follows established conventions
|
|
105
|
-
- [ ] Tests are written and passing
|
|
106
|
-
- [ ] Documentation is updated
|
|
107
|
-
- [ ] Security considerations are addressed
|
|
108
|
-
- [ ] Performance impact is considered
|
|
109
|
-
- [ ] Code is reviewed for maintainability
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Common Claude Code Templates
|
|
2
|
-
|
|
3
|
-
This folder contains language-agnostic templates and configurations that can be used across different programming languages and project types.
|
|
4
|
-
|
|
5
|
-
## What's Included
|
|
6
|
-
|
|
7
|
-
### Core Files
|
|
8
|
-
- `CLAUDE.md` - Base configuration for Claude Code with universal best practices
|
|
9
|
-
- `.claude/commands/` - Custom commands for common development tasks
|
|
10
|
-
|
|
11
|
-
### Common Custom Commands
|
|
12
|
-
- `git-workflow.md` - Git operations and workflow automation
|
|
13
|
-
- `code-review.md` - Code review and quality assurance tasks
|
|
14
|
-
- `project-setup.md` - Project initialization and configuration
|
|
15
|
-
- `documentation.md` - Documentation generation and maintenance
|
|
16
|
-
|
|
17
|
-
## How to Use
|
|
18
|
-
|
|
19
|
-
### For New Projects
|
|
20
|
-
Copy the entire `common/` folder contents to your project root:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
cp -r claude-code-templates/common/* your-project/
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### For Existing Projects
|
|
27
|
-
Merge the relevant files with your existing Claude Code configuration:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
# Copy custom commands
|
|
31
|
-
cp -r claude-code-templates/common/.claude/commands/* your-project/.claude/commands/
|
|
32
|
-
|
|
33
|
-
# Review and merge CLAUDE.md content
|
|
34
|
-
cat claude-code-templates/common/CLAUDE.md >> your-project/CLAUDE.md
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Customization
|
|
38
|
-
|
|
39
|
-
### CLAUDE.md
|
|
40
|
-
The base CLAUDE.md file includes:
|
|
41
|
-
- Universal development best practices
|
|
42
|
-
- Common project patterns and conventions
|
|
43
|
-
- Git workflow guidelines
|
|
44
|
-
- Code quality standards
|
|
45
|
-
|
|
46
|
-
Customize it by:
|
|
47
|
-
- Adding project-specific information
|
|
48
|
-
- Modifying coding standards to match your team's preferences
|
|
49
|
-
- Including technology-specific guidelines
|
|
50
|
-
|
|
51
|
-
### Custom Commands
|
|
52
|
-
The included commands are designed to be generic and widely applicable. You can:
|
|
53
|
-
- Modify existing commands to match your workflow
|
|
54
|
-
- Add new commands for project-specific tasks
|
|
55
|
-
- Remove commands that don't apply to your project
|
|
56
|
-
|
|
57
|
-
## Language-Specific Integration
|
|
58
|
-
|
|
59
|
-
This common template is designed to work alongside language-specific templates:
|
|
60
|
-
|
|
61
|
-
1. Start with the common template
|
|
62
|
-
2. Add language-specific configurations from the appropriate folder
|
|
63
|
-
3. Customize both to match your project needs
|
|
64
|
-
|
|
65
|
-
## Examples
|
|
66
|
-
|
|
67
|
-
### Multi-language Projects
|
|
68
|
-
For projects using multiple programming languages:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Copy common base
|
|
72
|
-
cp -r claude-code-templates/common/* your-project/
|
|
73
|
-
|
|
74
|
-
# Add language-specific configurations
|
|
75
|
-
cp -r claude-code-templates/javascript-typescript/.claude/commands/* your-project/.claude/commands/
|
|
76
|
-
cp -r claude-code-templates/python/.claude/commands/* your-project/.claude/commands/
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Team Standardization
|
|
80
|
-
Organizations can use this as a base template and customize it for their specific needs:
|
|
81
|
-
|
|
82
|
-
1. Fork this repository
|
|
83
|
-
2. Modify the common templates to match your standards
|
|
84
|
-
3. Distribute to development teams
|
|
85
|
-
4. Keep synchronized with updates
|
|
86
|
-
|
|
87
|
-
## Best Practices
|
|
88
|
-
|
|
89
|
-
- **Start Simple**: Begin with the common template and add complexity as needed
|
|
90
|
-
- **Document Changes**: Keep track of customizations in your project's documentation
|
|
91
|
-
- **Regular Updates**: Periodically review and update your Claude Code configuration
|
|
92
|
-
- **Team Alignment**: Ensure all team members understand the custom commands and workflows
|
|
93
|
-
|
|
94
|
-
## Contributing
|
|
95
|
-
|
|
96
|
-
If you create useful generic commands or improvements to the common template, consider contributing them back to this repository to help other developers.
|
package/templates/go/README.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Go Claude Code Templates
|
|
2
|
-
|
|
3
|
-
## Coming Soon! 🚧
|
|
4
|
-
|
|
5
|
-
We're actively working on creating comprehensive Claude Code templates for Go development.
|
|
6
|
-
|
|
7
|
-
### What to Expect
|
|
8
|
-
- Best practices for Go project structure
|
|
9
|
-
- Integration with popular Go tools and frameworks
|
|
10
|
-
- Workflow optimizations for Go development
|
|
11
|
-
- Testing and benchmarking configurations
|
|
12
|
-
- Deployment and build automation
|
|
13
|
-
|
|
14
|
-
### Meanwhile...
|
|
15
|
-
You can use the [common templates](../common/README.md) as a starting point for your Go projects. The universal guidelines and git workflows will work well with Go development.
|
|
16
|
-
|
|
17
|
-
### Stay Updated
|
|
18
|
-
⭐ Star this repository to get notified when the Go templates are released!
|
|
19
|
-
|
|
20
|
-
### Contributing
|
|
21
|
-
Interested in helping build these templates? We welcome contributions! Please check the main repository's contribution guidelines and feel free to open an issue or pull request.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
*Expected release: Coming soon*
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# API Endpoint Generator
|
|
2
|
-
|
|
3
|
-
Generate a complete API endpoint for $ARGUMENTS following project conventions.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
I'll analyze the project structure and create a new API endpoint with:
|
|
8
|
-
|
|
9
|
-
1. Route definition
|
|
10
|
-
2. Controller/handler function
|
|
11
|
-
3. Input validation
|
|
12
|
-
4. Service layer logic (if applicable)
|
|
13
|
-
5. Data access layer (if applicable)
|
|
14
|
-
6. Unit tests
|
|
15
|
-
7. Documentation
|
|
16
|
-
|
|
17
|
-
## Process
|
|
18
|
-
|
|
19
|
-
I'll follow these steps:
|
|
20
|
-
|
|
21
|
-
1. Examine the project structure to understand the architecture pattern
|
|
22
|
-
2. Identify existing patterns for routes, controllers, and validation
|
|
23
|
-
3. Create all necessary files following project conventions
|
|
24
|
-
4. Implement the endpoint with proper error handling
|
|
25
|
-
5. Add appropriate tests
|
|
26
|
-
6. Document the new endpoint
|
|
27
|
-
|
|
28
|
-
## Best Practices
|
|
29
|
-
|
|
30
|
-
I'll ensure the implementation includes:
|
|
31
|
-
|
|
32
|
-
- Strong typing with TypeScript
|
|
33
|
-
- Comprehensive error handling
|
|
34
|
-
- Input validation
|
|
35
|
-
- Security considerations (authentication/authorization)
|
|
36
|
-
- Proper logging
|
|
37
|
-
- Performance considerations
|
|
38
|
-
- Test coverage
|
|
39
|
-
|
|
40
|
-
## Adaptability
|
|
41
|
-
|
|
42
|
-
I'll adapt to various API architectures:
|
|
43
|
-
|
|
44
|
-
- Express/Koa/Fastify REST APIs
|
|
45
|
-
- GraphQL resolvers
|
|
46
|
-
- Next.js/Nuxt.js API routes
|
|
47
|
-
- Serverless functions
|
|
48
|
-
- tRPC endpoints
|
|
49
|
-
- NestJS controllers
|
|
50
|
-
|
|
51
|
-
I'll examine your project first to determine which pattern to follow.
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Debug Assistant
|
|
2
|
-
|
|
3
|
-
Help me debug the issue with $ARGUMENTS in this project.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
I'll help you identify and fix the problem by:
|
|
8
|
-
|
|
9
|
-
1. Understanding the issue description
|
|
10
|
-
2. Analyzing relevant code
|
|
11
|
-
3. Identifying potential causes
|
|
12
|
-
4. Suggesting and implementing fixes
|
|
13
|
-
5. Verifying the solution works
|
|
14
|
-
|
|
15
|
-
## Process
|
|
16
|
-
|
|
17
|
-
I'll follow these steps:
|
|
18
|
-
|
|
19
|
-
1. Examine error messages, logs, or unexpected behaviors
|
|
20
|
-
2. Locate relevant files and code sections
|
|
21
|
-
3. Analyze the code flow and potential failure points
|
|
22
|
-
4. Identify common JavaScript/TypeScript pitfalls that might apply
|
|
23
|
-
5. Suggest specific fixes with explanations
|
|
24
|
-
6. Help implement and test the solution
|
|
25
|
-
|
|
26
|
-
## Debugging Techniques
|
|
27
|
-
|
|
28
|
-
I'll apply appropriate debugging techniques such as:
|
|
29
|
-
|
|
30
|
-
- Static code analysis to find syntax or type errors
|
|
31
|
-
- Runtime error analysis from logs or stack traces
|
|
32
|
-
- Control flow tracing to understand execution paths
|
|
33
|
-
- State inspection to identify incorrect values
|
|
34
|
-
- Dependency analysis to find version conflicts
|
|
35
|
-
- Network request inspection for API issues
|
|
36
|
-
- Browser console analysis for frontend problems
|
|
37
|
-
- Database query inspection for data issues
|
|
38
|
-
|
|
39
|
-
## Common Issues I Can Help With
|
|
40
|
-
|
|
41
|
-
- Type errors and null/undefined issues
|
|
42
|
-
- Asynchronous code problems (Promises, async/await)
|
|
43
|
-
- React/Vue/Angular component lifecycle issues
|
|
44
|
-
- API integration problems
|
|
45
|
-
- State management bugs
|
|
46
|
-
- Performance bottlenecks
|
|
47
|
-
- Memory leaks
|
|
48
|
-
- Build/compilation errors
|
|
49
|
-
- Testing failures
|
|
50
|
-
- Environment configuration issues
|
|
51
|
-
|
|
52
|
-
I'll adapt my approach based on your specific project structure, frameworks, and the nature of the problem.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Lint Assistant
|
|
2
|
-
|
|
3
|
-
Analyze and fix linting issues in $ARGUMENTS following project conventions.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
I'll help you identify and fix code style and quality issues by:
|
|
8
|
-
|
|
9
|
-
1. Running appropriate linters for the project
|
|
10
|
-
2. Analyzing linting errors and warnings
|
|
11
|
-
3. Fixing issues automatically when possible
|
|
12
|
-
4. Explaining complex issues that require manual intervention
|
|
13
|
-
5. Ensuring code follows project style guidelines
|
|
14
|
-
|
|
15
|
-
## Process
|
|
16
|
-
|
|
17
|
-
I'll follow these steps:
|
|
18
|
-
|
|
19
|
-
1. Identify the linting tools used in the project (ESLint, Prettier, TSLint, etc.)
|
|
20
|
-
2. Run the appropriate linting commands
|
|
21
|
-
3. Parse and categorize the results
|
|
22
|
-
4. Apply automatic fixes for common issues
|
|
23
|
-
5. Provide explanations and suggestions for more complex problems
|
|
24
|
-
6. Verify fixes don't introduce new issues
|
|
25
|
-
|
|
26
|
-
## Common Linting Issues I Can Fix
|
|
27
|
-
|
|
28
|
-
- Code style inconsistencies (spacing, indentation, quotes, etc.)
|
|
29
|
-
- Unused variables and imports
|
|
30
|
-
- Missing type annotations in TypeScript
|
|
31
|
-
- Accessibility (a11y) issues in UI components
|
|
32
|
-
- Potential bugs flagged by static analysis
|
|
33
|
-
- Performance issues in React/Vue components
|
|
34
|
-
- Security vulnerabilities detected by linters
|
|
35
|
-
- Deprecated API usage
|
|
36
|
-
- Import ordering problems
|
|
37
|
-
- Missing documentation
|
|
38
|
-
|
|
39
|
-
## Linting Tools I Can Work With
|
|
40
|
-
|
|
41
|
-
- ESLint (with various plugins and configs)
|
|
42
|
-
- Prettier
|
|
43
|
-
- TSLint (legacy)
|
|
44
|
-
- stylelint (for CSS/SCSS)
|
|
45
|
-
- commitlint (for commit messages)
|
|
46
|
-
- Custom lint rules specific to your project
|
|
47
|
-
|
|
48
|
-
I'll adapt my approach based on your project's specific linting configuration and style guide requirements.
|