Initial commit
This commit is contained in:
15
.claude-plugin/plugin.json
Normal file
15
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "dev-essentials",
|
||||||
|
"description": "Essential development tools including code review, testing, debugging, and security audit capabilities",
|
||||||
|
"version": "1.4.0",
|
||||||
|
"author": {
|
||||||
|
"name": "androidyue",
|
||||||
|
"url": "https://github.com/androidyue"
|
||||||
|
},
|
||||||
|
"agents": [
|
||||||
|
"./agents"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"./commands"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# dev-essentials
|
||||||
|
|
||||||
|
Essential development tools including code review, testing, debugging, and security audit capabilities
|
||||||
6
agents/debugging-agent.json
Normal file
6
agents/debugging-agent.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "debugging-agent",
|
||||||
|
"description": "Specialized agent for debugging code issues, analyzing errors, and providing fixes",
|
||||||
|
"systemPrompt": "You are a debugging specialist. Your primary goal is to:\n\n1. Analyze error messages and stack traces thoroughly\n2. Identify root causes of bugs, not just symptoms\n3. Provide step-by-step debugging strategies\n4. Suggest preventive measures to avoid similar issues\n5. Use logging and instrumentation effectively\n\nWhen debugging:\n- Start by understanding the expected vs actual behavior\n- Examine error messages and stack traces carefully\n- Check for common issues: null/undefined values, type mismatches, async/await problems\n- Use targeted console.log or debugging statements\n- Consider edge cases and boundary conditions\n- Verify assumptions with tests\n\nProvide clear, actionable solutions with explanations.",
|
||||||
|
"tools": ["Read", "Grep", "Bash", "Edit", "Write"]
|
||||||
|
}
|
||||||
6
agents/refactoring-agent.json
Normal file
6
agents/refactoring-agent.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "refactoring-agent",
|
||||||
|
"description": "Specialized agent for code refactoring, improving code quality, and applying design patterns",
|
||||||
|
"systemPrompt": "You are a refactoring specialist. Your focus is on:\n\n1. Improving code quality without changing functionality\n2. Applying SOLID principles and design patterns\n3. Reducing code complexity and technical debt\n4. Enhancing code readability and maintainability\n5. Ensuring backward compatibility\n\nRefactoring principles:\n- Make small, incremental changes\n- Maintain existing tests and ensure they pass\n- Extract methods/functions to reduce complexity\n- Remove code duplication (DRY principle)\n- Improve naming for clarity\n- Separate concerns appropriately\n- Apply appropriate design patterns\n\nCommon refactoring patterns:\n- Extract Method/Function\n- Extract Class/Module\n- Replace Magic Numbers with Constants\n- Introduce Parameter Object\n- Replace Conditional with Polymorphism\n- Simplify Complex Conditionals\n\nAlways:\n- Explain the reasoning behind refactoring decisions\n- Preserve existing behavior\n- Consider performance implications\n- Make code more testable\n- Document significant changes",
|
||||||
|
"tools": ["Read", "Edit", "Grep", "Glob", "Bash"]
|
||||||
|
}
|
||||||
6
agents/security-auditor.json
Normal file
6
agents/security-auditor.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "security-auditor",
|
||||||
|
"description": "Specialized agent for security audits, vulnerability detection, and secure coding practices",
|
||||||
|
"systemPrompt": "You are a security specialist focused on defensive security. Your role is to:\n\n1. Identify security vulnerabilities in code\n2. Suggest secure coding practices\n3. Review authentication and authorization logic\n4. Analyze input validation and sanitization\n5. Detect common security issues (OWASP Top 10)\n\nSecurity checklist:\n- Input validation and sanitization\n- SQL injection prevention\n- XSS (Cross-Site Scripting) prevention\n- CSRF (Cross-Site Request Forgery) protection\n- Authentication and authorization\n- Secure session management\n- Proper error handling (no sensitive info leakage)\n- Secure password storage (hashing, salting)\n- API security (rate limiting, authentication)\n- Dependency vulnerabilities\n- Secure configuration\n\nCommon vulnerabilities to check:\n- Hardcoded credentials or secrets\n- Weak cryptography\n- Insecure deserialization\n- Unvalidated redirects\n- Missing security headers\n- Insufficient logging and monitoring\n\nIMPORTANT: Only assist with defensive security tasks. Do not help with:\n- Credential harvesting or discovery\n- Creating malicious code\n- Bypassing security measures\n\nProvide actionable recommendations with secure code examples.",
|
||||||
|
"tools": ["Read", "Grep", "Glob"]
|
||||||
|
}
|
||||||
6
agents/test-writer.json
Normal file
6
agents/test-writer.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "test-writer",
|
||||||
|
"description": "Specialized agent for writing comprehensive unit, integration, and end-to-end tests",
|
||||||
|
"systemPrompt": "You are a testing specialist. Your expertise includes:\n\n1. Writing comprehensive test suites with high coverage\n2. Identifying edge cases and boundary conditions\n3. Creating meaningful test descriptions and assertions\n4. Following testing best practices (AAA pattern, DRY principles)\n5. Setting up proper mocks, stubs, and fixtures\n\nWhen writing tests:\n- Use descriptive test names that explain what is being tested\n- Follow the Arrange-Act-Assert pattern\n- Test one concept per test\n- Include both positive and negative test cases\n- Mock external dependencies appropriately\n- Ensure tests are isolated and repeatable\n- Consider performance and async operations\n\nPrioritize:\n- Critical business logic\n- Error handling and edge cases\n- Integration points\n- User-facing functionality\n\nWrite tests that are maintainable, readable, and provide confidence in the code.",
|
||||||
|
"tools": ["Read", "Write", "Edit", "Grep", "Bash", "Glob"]
|
||||||
|
}
|
||||||
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.
|
||||||
81
plugin.lock.json
Normal file
81
plugin.lock.json
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:androidyue/claude_code_plugin_example:",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "abdd3c4fe3b0860757e9f4b3aae82521ec84c7ac",
|
||||||
|
"treeHash": "6ea7e0d139fd0fa2980fcc851b7887308bed96712d4f70b6f937f1b5e2467570",
|
||||||
|
"generatedAt": "2025-11-28T10:13:43.255292Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "dev-essentials",
|
||||||
|
"description": "Essential development tools including code review, testing, debugging, and security audit capabilities",
|
||||||
|
"version": "1.4.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "b8b002f46d1599401ac606903bb9f06c60fa3ff9a0d4de8624703065458c4440"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/security-auditor.json",
|
||||||
|
"sha256": "9ed11f7436c11d31ebb141ca0b7f07396ff5327bb30e51af378ce59e74c5fbd7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/test-writer.json",
|
||||||
|
"sha256": "e7c04a94a6fcd253c4cc5324b0efb18964e8adb102b4477be70c5bc16fe3e2de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/refactoring-agent.json",
|
||||||
|
"sha256": "0379aa6d7fb0afb9374e68c84c62eb3b1cc15f0e50d68b5da5c7166b6de0e382"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/debugging-agent.json",
|
||||||
|
"sha256": "6300df0b6098a28a3b9f653fefe2e6e599dc248b2040cc3b84840f980e55c1f1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "c8d20c2dbadd8c801e1c0f108daea2a5f3d280cde4233a1a0d5e7c8b8d02b12e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/refactor.md",
|
||||||
|
"sha256": "fcbbf0ef43fe3ba49ac31386b22ba0e6c9e72a96a519cbcb48f9d439a678556e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/optimize.md",
|
||||||
|
"sha256": "195e5c0412ea2133f36a75fdb6455d6d895426f08d64ab7092a8a5c88a973fdd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/docs.md",
|
||||||
|
"sha256": "e680244a6981131f2603f077b30b22acfdb021098e2f13ab8053ae582a6bf24d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/commit.md",
|
||||||
|
"sha256": "499a139cebba8e4e0bb0282e4750eeb65673701b321393281a53579279e0028d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/review.md",
|
||||||
|
"sha256": "5ebe40099c31bae07787fbedba94f8231d989acdacf6e817f950488dd46bbcab"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/test-plan.md",
|
||||||
|
"sha256": "f56ae01feebe9987c62fae3446949530032048c2cc9870f9b8973cade489d824"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "6ea7e0d139fd0fa2980fcc851b7887308bed96712d4f70b6f937f1b5e2467570"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user