code-review
8
总安装量
8
周安装量
#35128
全站排名
安装命令
npx skills add https://github.com/felixwayne0318/aitrader --skill code-review
Agent 安装分布
amp
8
github-copilot
8
codex
8
kimi-cli
8
gemini-cli
8
opencode
8
Skill 文档
Code Review
Multi-dimensional code review based on Claude Code best practices.
Review Modes
| Argument | Mode | Command |
|---|---|---|
(empty) or --staged |
staged | git diff --cached |
--unstaged |
unstaged | git diff |
--all |
all | git diff HEAD |
--pr <number> |
PR | gh pr diff <number> |
--commit <hash> |
commit | git show <hash> |
--branch |
branch | git diff main...HEAD |
--file <path> |
file | Read file directly |
Review Dimensions
1. Bug Detection
- Logic errors, boundary conditions, null pointers, type errors
- Missing exception handling, resource leaks
- Concurrency issues, race conditions
- Hardcoded values, magic numbers
2. Security Review
- OWASP Top 10 vulnerabilities
- Missing input validation
- Sensitive data exposure (API keys, passwords, tokens)
- SQL/command injection risks
- Insecure dependencies
3. Architecture & Code Quality
- CLAUDE.md compliance
- Code style consistency
- Naming conventions
- Function complexity (warn if cyclomatic > 10)
- Code duplication, over-engineering
4. Project-Specific (AItrader)
- Stop-loss validation: LONG SL < entry, SHORT SL > entry
- API keys must be from environment variables
- Entry file must be
main_live.py - Telegram notification configuration
- Multi-agent divergence handling
Confidence Scoring
| Score | Meaning | Action |
|---|---|---|
| 0-49 | Possible false positive | Don’t report |
| 50-79 | Medium confidence | List in “Suggestions” |
| 80-100 | High confidence | Must report |
Default threshold: â¥80%
Output Format
# Code Review Report
## Summary
- Review scope: [mode description]
- Files: N
- High confidence issues: N
## Issues Found
### ð´ [Critical] Issue Title
- **File**: path/to/file.py:123
- **Confidence**: 95%
- **Type**: Bug | Security | Architecture | Project
- **Description**: Detailed description
- **Suggestion**: Fix recommendation
## Suggestions (50-79% confidence)
- Issue list
## Conclusion
â
Review passed / â Found N high-confidence issues
Severity Levels
| Level | Icon | Confidence | Action |
|---|---|---|---|
| Critical | ð´ | â¥90% | Block merge |
| High | ð | â¥85% | Should fix |
| Medium | ð¡ | â¥80% | Recommend fix |
| Low | ðµ | â¥70% | Optional |
Key Files
| File | Review Focus |
|---|---|
strategy/deepseek_strategy.py |
Stop-loss logic, signals, divergence |
utils/*.py |
API calls, error handling |
patches/*.py |
Compatibility, side effects |
main_live.py |
Config loading, initialization |
configs/base.yaml |
Base configuration (all parameters) |
configs/production.yaml |
Production environment overrides |
å彿£æµ (审æ¥åå¿ é¡»è¿è¡)
# æºè½å彿£æµ (è§åèªå¨ä» git åå²çæ)
python3 scripts/smart_commit_analyzer.py
# é¢æç»æ: â
ææè§åéªè¯éè¿