Agent skill
code-review-assistant
Comprehensive code review assistant that analyzes code for security vulnerabilities, performance issues, and code quality. Use when reviewing pull requests, conducting code audits, or analyzing code changes. Supports Python, JavaScript/TypeScript, and general code patterns. Includes automated analysis scripts and structured checklists.
Install this agent skill to your Project
npx add-skill https://github.com/kaelen2026/skills-mvp/tree/main/code-review-assistant
SKILL.md
Code Review Assistant
Perform structured code reviews using checklists and automated analysis tools.
Review Workflow
- Gather context - Understand the scope of changes
- Run automated analysis - Execute scripts for metrics and security scans
- Apply checklists - Review using category-specific checklists
- Synthesize findings - Compile issues with severity and recommendations
Quick Start
For a standard code review:
# 1. View changes
git diff HEAD~1
# 2. Analyze code complexity and metrics
python scripts/analyze.py <file_or_directory>
# 3. Scan for security patterns (optional)
python scripts/security_scan.py <file_or_directory>
Then apply the appropriate checklists based on the code type.
Automated Analysis
Code Metrics Analysis
Run scripts/analyze.py to get code metrics:
python scripts/analyze.py path/to/code --output json
python scripts/analyze.py src/ --recursive
Outputs:
- Lines of code (total, code, comments, blank)
- Function/method count and average length
- Cyclomatic complexity estimates
- File-level metrics summary
Security Pattern Scan
Run scripts/security_scan.py for quick security checks:
python scripts/security_scan.py path/to/code
python scripts/security_scan.py src/ --severity high
Detects:
- Dangerous function calls (eval, exec, shell injection)
- Hardcoded credentials patterns
- SQL injection indicators
- XSS vulnerability patterns
Review Checklists
Select checklists based on the type of changes being reviewed:
Security Review
When to use: Authentication changes, user input handling, API endpoints, database queries
See SECURITY.md for complete security checklist covering:
- Injection vulnerabilities (SQL, XSS, command injection)
- Authentication and authorization
- Data exposure and encryption
- Input validation
Performance Review
When to use: Database operations, loops, API calls, data processing
See PERFORMANCE.md for performance checklist covering:
- N+1 query detection
- Memory management
- Algorithmic complexity
- Caching opportunities
Code Quality Review
When to use: All code changes, especially new features and refactoring
See QUALITY.md for quality checklist covering:
- Naming conventions
- Function complexity
- DRY principle adherence
- Error handling patterns
Review Output Format
Structure findings using this format:
## Code Review Summary
**Files reviewed**: [count]
**Issues found**: Critical: X | High: Y | Medium: Z | Low: W
### Critical Issues
1. **[File:Line]** Description
- Code: `snippet`
- Fix: Recommendation
### High Priority Issues
[Same format]
### Positive Observations
- [Note well-implemented patterns]
### Recommendations
1. [Prioritized action items]
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
demand-mining
需求挖掘助手,从社交平台(X/Twitter、Reddit、Hacker News 等)自动搜索和分析用户抱怨、痛点和未满足需求。 用于发现产品机会、竞品分析、市场调研。 触发场景: - 用户说"帮我挖掘 XX 领域/产品的用户需求" - 用户说"分析 XX 产品的用户抱怨" - 用户说"看看用户对 XX 有什么不满" - 用户说"找找 XX 领域的痛点" - 用户说"调研 XX 市场机会"
requirements-analyst
需求分析助手,将模糊需求转换为结构化文档。支持两种输出格式:用户故事(User Story)适合敏捷开发,PRD(产品需求文档)适合完整功能规划。通过针对性提问澄清歧义。
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Didn't find tool you were looking for?