claude-code-templates 1.16.1 → 1.17.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/README.md +7 -7
- package/bin/create-claude-config.js +17 -8
- package/package.json +2 -3
- package/src/analytics/core/AgentAnalyzer.js +17 -3
- package/src/analytics/core/ProcessDetector.js +23 -7
- package/src/analytics/core/StateCalculator.js +102 -33
- package/src/analytics/data/DataCache.js +7 -7
- package/src/analytics-web/chats_mobile.html +2590 -0
- package/src/analytics-web/components/App.js +10 -10
- package/src/analytics-web/components/SessionTimer.js +1 -1
- package/src/analytics-web/components/Sidebar.js +5 -14
- package/src/analytics-web/index.html +932 -78
- package/src/analytics.js +263 -5
- package/src/chats-mobile.js +682 -0
- package/src/claude-api-proxy.js +460 -0
- package/src/file-operations.js +239 -36
- package/src/health-check.js +310 -0
- package/src/index.js +1256 -36
- package/src/tracking-service.js +31 -34
- package/components/agents/api-security-audit.md +0 -92
- package/components/agents/database-optimization.md +0 -94
- package/components/agents/react-performance-optimization.md +0 -64
- package/components/commands/check-file.md +0 -53
- package/components/commands/generate-tests.md +0 -68
- package/components/mcps/deepgraph-nextjs.json +0 -12
- package/components/mcps/deepgraph-react.json +0 -12
- package/components/mcps/deepgraph-typescript.json +0 -12
- package/components/mcps/deepgraph-vue.json +0 -12
- package/components/mcps/filesystem-access.json +0 -12
- package/components/mcps/github-integration.json +0 -11
- package/components/mcps/memory-integration.json +0 -8
- package/components/mcps/mysql-integration.json +0 -11
- package/components/mcps/postgresql-integration.json +0 -11
- package/components/mcps/web-fetch.json +0 -8
- package/src/analytics-web/components/AgentsPage.js +0 -4761
- package/templates/common/.claude/commands/git-workflow.md +0 -239
- package/templates/common/.claude/commands/project-setup.md +0 -316
- package/templates/common/.mcp.json +0 -41
- package/templates/common/CLAUDE.md +0 -109
- package/templates/common/README.md +0 -96
- package/templates/go/.mcp.json +0 -78
- 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 -80
- 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/react-app/agents/react-performance-optimization.md +0 -530
- package/templates/javascript-typescript/examples/react-app/agents/react-state-management.md +0 -295
- 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/lint.md +0 -111
- package/templates/python/.claude/commands/test.md +0 -73
- package/templates/python/.claude/settings.json +0 -153
- package/templates/python/.mcp.json +0 -78
- package/templates/python/CLAUDE.md +0 -276
- package/templates/python/examples/django-app/.claude/commands/admin.md +0 -264
- package/templates/python/examples/django-app/.claude/commands/django-model.md +0 -124
- package/templates/python/examples/django-app/.claude/commands/views.md +0 -222
- package/templates/python/examples/django-app/CLAUDE.md +0 -313
- package/templates/python/examples/django-app/agents/django-api-security.md +0 -642
- package/templates/python/examples/django-app/agents/django-database-optimization.md +0 -752
- package/templates/python/examples/fastapi-app/.claude/commands/api-endpoints.md +0 -513
- package/templates/python/examples/fastapi-app/.claude/commands/auth.md +0 -775
- package/templates/python/examples/fastapi-app/.claude/commands/database.md +0 -657
- package/templates/python/examples/fastapi-app/.claude/commands/deployment.md +0 -160
- package/templates/python/examples/fastapi-app/.claude/commands/testing.md +0 -927
- package/templates/python/examples/fastapi-app/CLAUDE.md +0 -229
- package/templates/python/examples/flask-app/.claude/commands/app-factory.md +0 -384
- package/templates/python/examples/flask-app/.claude/commands/blueprint.md +0 -243
- package/templates/python/examples/flask-app/.claude/commands/database.md +0 -410
- package/templates/python/examples/flask-app/.claude/commands/deployment.md +0 -620
- package/templates/python/examples/flask-app/.claude/commands/flask-route.md +0 -217
- package/templates/python/examples/flask-app/.claude/commands/testing.md +0 -559
- package/templates/python/examples/flask-app/CLAUDE.md +0 -391
- package/templates/ruby/.claude/commands/model.md +0 -360
- package/templates/ruby/.claude/commands/test.md +0 -480
- package/templates/ruby/.claude/settings.json +0 -146
- package/templates/ruby/.mcp.json +0 -83
- package/templates/ruby/CLAUDE.md +0 -284
- package/templates/ruby/examples/rails-app/.claude/commands/authentication.md +0 -490
- package/templates/ruby/examples/rails-app/CLAUDE.md +0 -376
- package/templates/rust/.mcp.json +0 -78
- package/templates/rust/README.md +0 -26
|
@@ -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/.mcp.json
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"mcpServers": {
|
|
3
|
-
"go-sdk": {
|
|
4
|
-
"name": "Go SDK",
|
|
5
|
-
"description": "Official SDK maintained with Google for Go MCP development",
|
|
6
|
-
"command": "go-sdk-server",
|
|
7
|
-
"args": [],
|
|
8
|
-
"env": {}
|
|
9
|
-
},
|
|
10
|
-
"language-server": {
|
|
11
|
-
"name": "MCP Language Server",
|
|
12
|
-
"description": "Semantic tools for Go: definitions, references, diagnostics",
|
|
13
|
-
"command": "mcp-language-server",
|
|
14
|
-
"args": [],
|
|
15
|
-
"env": {}
|
|
16
|
-
},
|
|
17
|
-
"gin": {
|
|
18
|
-
"name": "Gin MCP",
|
|
19
|
-
"description": "Expose Gin APIs automatically as MCP tools",
|
|
20
|
-
"command": "gin-mcp",
|
|
21
|
-
"args": [],
|
|
22
|
-
"env": {}
|
|
23
|
-
},
|
|
24
|
-
"mysql": {
|
|
25
|
-
"name": "Go MySQL MCP",
|
|
26
|
-
"description": "Easy-to-use MySQL MCP server built in Go",
|
|
27
|
-
"command": "go-mcp-mysql",
|
|
28
|
-
"args": [],
|
|
29
|
-
"env": {
|
|
30
|
-
"MYSQL_DSN": "user:pass@tcp(host)/db"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"archer": {
|
|
34
|
-
"name": "Go Archer",
|
|
35
|
-
"description": "Visual dependency analysis for Go packages",
|
|
36
|
-
"command": "go-archer",
|
|
37
|
-
"args": [],
|
|
38
|
-
"env": {}
|
|
39
|
-
},
|
|
40
|
-
"memory-bank": {
|
|
41
|
-
"name": "Memory Bank MCP",
|
|
42
|
-
"description": "Centralized memory system for AI agents",
|
|
43
|
-
"command": "server-memory",
|
|
44
|
-
"args": [],
|
|
45
|
-
"env": {}
|
|
46
|
-
},
|
|
47
|
-
"sequential-thinking": {
|
|
48
|
-
"name": "Sequential Thinking MCP",
|
|
49
|
-
"description": "Helps LLMs decompose complex tasks into logical steps",
|
|
50
|
-
"command": "code-reasoning",
|
|
51
|
-
"args": [],
|
|
52
|
-
"env": {}
|
|
53
|
-
},
|
|
54
|
-
"brave-search": {
|
|
55
|
-
"name": "Brave Search MCP",
|
|
56
|
-
"description": "Privacy-focused web search tool",
|
|
57
|
-
"command": "server-brave-search",
|
|
58
|
-
"args": [],
|
|
59
|
-
"env": {}
|
|
60
|
-
},
|
|
61
|
-
"google-maps": {
|
|
62
|
-
"name": "Google Maps MCP",
|
|
63
|
-
"description": "Integrates Google Maps for geolocation and directions",
|
|
64
|
-
"command": "server-google-maps",
|
|
65
|
-
"args": [],
|
|
66
|
-
"env": {
|
|
67
|
-
"GOOGLE_MAPS_API_KEY": "..."
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"deep-graph": {
|
|
71
|
-
"name": "Deep Graph MCP (Code Graph)",
|
|
72
|
-
"description": "Transforms source code into semantic graphs via DeepGraph",
|
|
73
|
-
"command": "mcp-code-graph",
|
|
74
|
-
"args": [],
|
|
75
|
-
"env": {}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
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.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# NPM Scripts Assistant
|
|
2
|
-
|
|
3
|
-
Help me with NPM scripts: $ARGUMENTS
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
I'll help you work with package.json scripts by:
|
|
8
|
-
|
|
9
|
-
1. Analyzing existing npm scripts in your project
|
|
10
|
-
2. Creating new scripts or modifying existing ones
|
|
11
|
-
3. Explaining what specific scripts do
|
|
12
|
-
4. Suggesting improvements or optimizations
|
|
13
|
-
5. Troubleshooting script execution issues
|
|
14
|
-
|
|
15
|
-
## Process
|
|
16
|
-
|
|
17
|
-
I'll follow these steps:
|
|
18
|
-
|
|
19
|
-
1. Examine your package.json file to understand current scripts
|
|
20
|
-
2. Analyze dependencies and devDependencies for available tools
|
|
21
|
-
3. Identify common patterns and conventions in your scripts
|
|
22
|
-
4. Implement requested changes or create new scripts
|
|
23
|
-
5. Provide explanations of how the scripts work
|
|
24
|
-
6. Test scripts when possible to verify functionality
|
|
25
|
-
|
|
26
|
-
## Common Script Types I Can Help With
|
|
27
|
-
|
|
28
|
-
- Build processes (webpack, rollup, esbuild, etc.)
|
|
29
|
-
- Development servers and hot reloading
|
|
30
|
-
- Testing (unit, integration, e2e)
|
|
31
|
-
- Linting and code formatting
|
|
32
|
-
- Type checking
|
|
33
|
-
- Deployment and CI/CD
|
|
34
|
-
- Database migrations
|
|
35
|
-
- Code generation
|
|
36
|
-
- Environment setup
|
|
37
|
-
- Pre/post hooks for git operations
|
|
38
|
-
|
|
39
|
-
## Script Optimization Techniques
|
|
40
|
-
|
|
41
|
-
- Parallelizing tasks for faster execution
|
|
42
|
-
- Adding cross-platform compatibility
|
|
43
|
-
- Improving error reporting and logging
|
|
44
|
-
- Implementing watch modes for development
|
|
45
|
-
- Creating composite scripts for common workflows
|
|
46
|
-
- Adding appropriate exit codes for CI/CD pipelines
|
|
47
|
-
|
|
48
|
-
I'll adapt my approach based on your project's specific needs, dependencies, and build tools.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Code Refactoring Assistant
|
|
2
|
-
|
|
3
|
-
Refactor $ARGUMENTS following modern JavaScript/TypeScript best practices.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
I'll help you refactor code by:
|
|
8
|
-
|
|
9
|
-
1. Analyzing the current implementation
|
|
10
|
-
2. Identifying improvement opportunities
|
|
11
|
-
3. Applying modern patterns and practices
|
|
12
|
-
4. Maintaining existing functionality
|
|
13
|
-
5. Ensuring type safety and test coverage
|
|
14
|
-
6. Documenting the changes made
|
|
15
|
-
|
|
16
|
-
## Process
|
|
17
|
-
|
|
18
|
-
I'll follow these steps:
|
|
19
|
-
|
|
20
|
-
1. Examine the code to understand its purpose and structure
|
|
21
|
-
2. Identify code smells, anti-patterns, or outdated approaches
|
|
22
|
-
3. Plan the refactoring strategy with clear goals
|
|
23
|
-
4. Implement changes incrementally while maintaining behavior
|
|
24
|
-
5. Verify refactored code with tests
|
|
25
|
-
6. Document improvements and benefits
|
|
26
|
-
|
|
27
|
-
## Refactoring Techniques
|
|
28
|
-
|
|
29
|
-
I can apply various refactoring techniques:
|
|
30
|
-
|
|
31
|
-
- Converting to modern JavaScript/TypeScript features
|
|
32
|
-
- Improving type definitions and type safety
|
|
33
|
-
- Extracting reusable functions and components
|
|
34
|
-
- Applying design patterns appropriately
|
|
35
|
-
- Converting callbacks to Promises or async/await
|
|
36
|
-
- Simplifying complex conditionals and loops
|
|
37
|
-
- Removing duplicate code
|
|
38
|
-
- Improving naming and readability
|
|
39
|
-
- Optimizing performance
|
|
40
|
-
- Enhancing error handling
|
|
41
|
-
|
|
42
|
-
## Modern Practices I Can Apply
|
|
43
|
-
|
|
44
|
-
- ES modules and import/export syntax
|
|
45
|
-
- Optional chaining and nullish coalescing
|
|
46
|
-
- Array and object destructuring
|
|
47
|
-
- Spread and rest operators
|
|
48
|
-
- Template literals
|
|
49
|
-
- Arrow functions
|
|
50
|
-
- Class fields and private methods
|
|
51
|
-
- TypeScript utility types
|
|
52
|
-
- Functional programming patterns
|
|
53
|
-
- React hooks (for React components)
|
|
54
|
-
|
|
55
|
-
I'll ensure the refactored code maintains compatibility with your project's requirements while improving quality and maintainability.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Test Assistant
|
|
2
|
-
|
|
3
|
-
Help with tests for $ARGUMENTS following project conventions and testing best practices.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
I'll help you with testing by:
|
|
8
|
-
|
|
9
|
-
1. Creating comprehensive test suites for your code
|
|
10
|
-
2. Implementing different types of tests (unit, integration, e2e)
|
|
11
|
-
3. Mocking dependencies and external services
|
|
12
|
-
4. Improving test coverage for existing code
|
|
13
|
-
5. Troubleshooting failing tests
|
|
14
|
-
6. Setting up testing infrastructure
|
|
15
|
-
|
|
16
|
-
## Process
|
|
17
|
-
|
|
18
|
-
I'll follow these steps:
|
|
19
|
-
|
|
20
|
-
1. Examine your project to understand testing frameworks and patterns
|
|
21
|
-
2. Analyze the code to be tested to understand its functionality
|
|
22
|
-
3. Identify appropriate testing strategies and edge cases
|
|
23
|
-
4. Implement tests with proper structure and assertions
|
|
24
|
-
5. Ensure tests are maintainable and follow best practices
|
|
25
|
-
6. Run tests to verify they pass and provide adequate coverage
|
|
26
|
-
|
|
27
|
-
## Testing Frameworks I Can Work With
|
|
28
|
-
|
|
29
|
-
- Jest, Vitest, Mocha, Jasmine for JavaScript/TypeScript
|
|
30
|
-
- React Testing Library, Enzyme for React components
|
|
31
|
-
- Cypress, Playwright, Puppeteer for E2E testing
|
|
32
|
-
- Supertest, Pactum for API testing
|
|
33
|
-
- Storybook for component testing
|
|
34
|
-
- Testing-library family for various frameworks
|
|
35
|
-
|
|
36
|
-
## Testing Techniques
|
|
37
|
-
|
|
38
|
-
I can implement various testing approaches:
|
|
39
|
-
|
|
40
|
-
- TDD (Test-Driven Development)
|
|
41
|
-
- BDD (Behavior-Driven Development)
|
|
42
|
-
- Snapshot testing
|
|
43
|
-
- Property-based testing
|
|
44
|
-
- Parameterized tests
|
|
45
|
-
- Contract testing
|
|
46
|
-
- Visual regression testing
|
|
47
|
-
- Performance testing
|
|
48
|
-
|
|
49
|
-
## Mocking Strategies
|
|
50
|
-
|
|
51
|
-
I can help with different mocking approaches:
|
|
52
|
-
|
|
53
|
-
- Function mocks and spies
|
|
54
|
-
- Module mocks
|
|
55
|
-
- HTTP request mocking
|
|
56
|
-
- Browser API mocking
|
|
57
|
-
- Timer mocking
|
|
58
|
-
- Database mocking
|
|
59
|
-
- Service worker mocking
|
|
60
|
-
|
|
61
|
-
I'll adapt to your project's specific testing frameworks, patterns, and conventions to ensure consistency with your existing codebase.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# TypeScript Migration Assistant
|
|
2
|
-
|
|
3
|
-
Migrate $ARGUMENTS from JavaScript to TypeScript with proper typing and modern practices.
|
|
4
|
-
|
|
5
|
-
## Task
|
|
6
|
-
|
|
7
|
-
I'll help you migrate JavaScript code to TypeScript by:
|
|
8
|
-
|
|
9
|
-
1. Converting JavaScript files to TypeScript (.js/.jsx to .ts/.tsx)
|
|
10
|
-
2. Adding appropriate type definitions and interfaces
|
|
11
|
-
3. Configuring TypeScript settings for your project
|
|
12
|
-
4. Resolving type errors and compatibility issues
|
|
13
|
-
5. Implementing modern TypeScript patterns and features
|
|
14
|
-
6. Ensuring backward compatibility with existing code
|
|
15
|
-
|
|
16
|
-
## Process
|
|
17
|
-
|
|
18
|
-
I'll follow these steps:
|
|
19
|
-
|
|
20
|
-
1. Examine your project structure and dependencies
|
|
21
|
-
2. Analyze the JavaScript code to understand its functionality
|
|
22
|
-
3. Create or update tsconfig.json with appropriate settings
|
|
23
|
-
4. Convert files to TypeScript with proper type annotations
|
|
24
|
-
5. Add necessary type definitions for libraries
|
|
25
|
-
6. Fix type errors and implement type safety
|
|
26
|
-
7. Refactor code to leverage TypeScript features
|
|
27
|
-
|
|
28
|
-
## TypeScript Features I Can Implement
|
|
29
|
-
|
|
30
|
-
- Interfaces and type aliases for complex data structures
|
|
31
|
-
- Generics for reusable, type-safe components and functions
|
|
32
|
-
- Union and intersection types for flexible typing
|
|
33
|
-
- Enums for related constants
|
|
34
|
-
- Utility types (Partial, Pick, Omit, etc.)
|
|
35
|
-
- Type guards and type narrowing
|
|
36
|
-
- Mapped and conditional types
|
|
37
|
-
- Function overloading
|
|
38
|
-
- Readonly properties and immutability
|
|
39
|
-
- Module augmentation for extending third-party types
|
|
40
|
-
|
|
41
|
-
## Migration Strategies
|
|
42
|
-
|
|
43
|
-
I can apply different migration approaches based on your needs:
|
|
44
|
-
|
|
45
|
-
- Gradual migration with allowJs and incremental adoption
|
|
46
|
-
- File-by-file conversion while maintaining functionality
|
|
47
|
-
- Comprehensive migration with full type safety
|
|
48
|
-
- Hybrid approach with .d.ts files for complex modules
|
|
49
|
-
- Integration with existing type definitions (@types packages)
|
|
50
|
-
|
|
51
|
-
I'll adapt to your project's specific requirements and ensure a smooth transition to TypeScript while maintaining existing functionality.
|