Initial commit
This commit is contained in:
36
commands/commit.md
Normal file
36
commands/commit.md
Normal file
@@ -0,0 +1,36 @@
|
||||
Generate a well-structured commit message for the current changes. Analyze the git diff and create a commit message that follows best practices.
|
||||
|
||||
## Commit Message Guidelines
|
||||
|
||||
1. **Format**
|
||||
- First line: Brief summary (50 chars or less)
|
||||
- Blank line
|
||||
- Detailed description explaining what and why (wrap at 72 chars)
|
||||
- Focus on the motivation and context, not just what changed
|
||||
|
||||
2. **Content Requirements**
|
||||
- Use imperative mood ("Add feature" not "Added feature")
|
||||
- Be specific and descriptive
|
||||
- Explain the reasoning behind changes
|
||||
- Mention any breaking changes or important notes
|
||||
- Group related changes logically
|
||||
|
||||
3. **Structure**
|
||||
- Start with the type: feat, fix, refactor, docs, test, chore, style, perf
|
||||
- Provide context about the problem being solved
|
||||
- Explain the solution approach if non-obvious
|
||||
- List key changes in bullet points for complex commits
|
||||
|
||||
4. **Important Restrictions**
|
||||
- Do NOT include any AI assistant names or references
|
||||
- Do NOT include tool attribution
|
||||
- Do NOT add co-author tags for AI assistants
|
||||
- Keep the message focused on the code changes only
|
||||
|
||||
5. **Quality Checks**
|
||||
- Is the message clear to someone unfamiliar with the change?
|
||||
- Does it explain both WHAT and WHY?
|
||||
- Would this be helpful when reviewing git history later?
|
||||
- Is it concise but complete?
|
||||
|
||||
Generate a commit message that is professional, clear, and follows these guidelines strictly.
|
||||
34
commands/docs.md
Normal file
34
commands/docs.md
Normal file
@@ -0,0 +1,34 @@
|
||||
Generate comprehensive documentation for the specified code. Include:
|
||||
|
||||
1. **Overview**
|
||||
- Purpose and functionality
|
||||
- Key features
|
||||
- Use cases
|
||||
|
||||
2. **API Documentation**
|
||||
- Function/method signatures
|
||||
- Parameter descriptions with types
|
||||
- Return values
|
||||
- Exceptions/errors that may be thrown
|
||||
|
||||
3. **Usage Examples**
|
||||
- Basic usage examples
|
||||
- Advanced use cases
|
||||
- Common patterns
|
||||
|
||||
4. **Configuration**
|
||||
- Required environment variables
|
||||
- Configuration options
|
||||
- Default values
|
||||
|
||||
5. **Dependencies**
|
||||
- Required libraries
|
||||
- Version requirements
|
||||
- Installation instructions
|
||||
|
||||
6. **Additional Notes**
|
||||
- Known limitations
|
||||
- Performance considerations
|
||||
- Best practices
|
||||
|
||||
Format the documentation in clear, professional markdown suitable for a README or API reference.
|
||||
34
commands/optimize.md
Normal file
34
commands/optimize.md
Normal file
@@ -0,0 +1,34 @@
|
||||
Analyze the code for performance optimization opportunities. Focus on:
|
||||
|
||||
1. **Algorithm Efficiency**
|
||||
- Time complexity analysis
|
||||
- Space complexity analysis
|
||||
- Suggest more efficient algorithms
|
||||
|
||||
2. **Database Optimization**
|
||||
- Query optimization
|
||||
- Index recommendations
|
||||
- N+1 query problems
|
||||
- Caching opportunities
|
||||
|
||||
3. **Memory Management**
|
||||
- Memory leaks
|
||||
- Unnecessary object creation
|
||||
- Resource cleanup
|
||||
|
||||
4. **Code Structure**
|
||||
- Redundant computations
|
||||
- Unnecessary loops or iterations
|
||||
- Lazy loading opportunities
|
||||
|
||||
5. **Network/IO Operations**
|
||||
- Batch operations
|
||||
- Connection pooling
|
||||
- Async/await optimization
|
||||
|
||||
6. **Caching Strategy**
|
||||
- What should be cached
|
||||
- Cache invalidation strategy
|
||||
- Memory vs performance tradeoffs
|
||||
|
||||
Provide specific refactoring suggestions with before/after code examples showing the performance improvements.
|
||||
31
commands/refactor.md
Normal file
31
commands/refactor.md
Normal file
@@ -0,0 +1,31 @@
|
||||
Refactor the specified code to improve quality and maintainability. Focus on:
|
||||
|
||||
1. **Code Structure**
|
||||
- Extract complex methods/functions
|
||||
- Reduce function/method length
|
||||
- Separate concerns appropriately
|
||||
- Apply SOLID principles
|
||||
|
||||
2. **Code Quality**
|
||||
- Remove code duplication (DRY)
|
||||
- Improve naming for clarity
|
||||
- Simplify complex conditionals
|
||||
- Replace magic numbers with constants
|
||||
|
||||
3. **Design Patterns**
|
||||
- Identify applicable design patterns
|
||||
- Suggest pattern implementations
|
||||
- Improve abstraction levels
|
||||
|
||||
4. **Maintainability**
|
||||
- Reduce cyclomatic complexity
|
||||
- Improve testability
|
||||
- Enhance readability
|
||||
- Add appropriate comments for complex logic
|
||||
|
||||
5. **Backward Compatibility**
|
||||
- Ensure existing functionality is preserved
|
||||
- Maintain existing test coverage
|
||||
- Document any breaking changes
|
||||
|
||||
Provide before/after code examples with clear explanations of the improvements and their benefits.
|
||||
26
commands/review.md
Normal file
26
commands/review.md
Normal file
@@ -0,0 +1,26 @@
|
||||
You are performing a comprehensive code review. Please analyze the current changes or specified files and provide:
|
||||
|
||||
1. **Code Quality Assessment**
|
||||
- Code readability and maintainability
|
||||
- Adherence to best practices and design patterns
|
||||
- Potential bugs or edge cases
|
||||
|
||||
2. **Security Concerns**
|
||||
- Vulnerability assessment
|
||||
- Input validation issues
|
||||
- Authentication/authorization problems
|
||||
|
||||
3. **Performance Considerations**
|
||||
- Inefficient algorithms or queries
|
||||
- Memory leaks or resource management
|
||||
- Optimization opportunities
|
||||
|
||||
4. **Testing Coverage**
|
||||
- Suggest test cases that should be added
|
||||
- Identify untested edge cases
|
||||
|
||||
5. **Documentation**
|
||||
- Missing or unclear comments
|
||||
- API documentation needs
|
||||
|
||||
Provide specific, actionable feedback with code examples where appropriate.
|
||||
27
commands/test-plan.md
Normal file
27
commands/test-plan.md
Normal file
@@ -0,0 +1,27 @@
|
||||
Create a comprehensive test plan for the specified feature or code. Include:
|
||||
|
||||
1. **Unit Tests**
|
||||
- List all functions/methods that need unit tests
|
||||
- Identify edge cases and boundary conditions
|
||||
- Suggest mock requirements
|
||||
|
||||
2. **Integration Tests**
|
||||
- Identify integration points
|
||||
- Define test scenarios for component interactions
|
||||
- Database/API integration test cases
|
||||
|
||||
3. **End-to-End Tests**
|
||||
- User workflow scenarios
|
||||
- Critical path testing
|
||||
- Error handling flows
|
||||
|
||||
4. **Test Data Requirements**
|
||||
- Sample data needed
|
||||
- Test fixtures setup
|
||||
- Database seeding requirements
|
||||
|
||||
5. **Expected Outcomes**
|
||||
- Success criteria for each test
|
||||
- Expected vs actual results format
|
||||
|
||||
Format the output as actionable test cases that can be implemented immediately.
|
||||
Reference in New Issue
Block a user