一键导入
review-code
Perform a thorough code review on note content, checking correctness, security, performance, and style — auto-executes and writes feedback to note
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Perform a thorough code review on note content, checking correctness, security, performance, and style — auto-executes and writes feedback to note
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | review-code |
| description | Perform a thorough code review on note content, checking correctness, security, performance, and style — auto-executes and writes feedback to note |
| approval | auto |
| model | opus |
Perform a production-grade code review on code blocks in the current note. Uses Opus for deep analysis, checking correctness, security vulnerabilities, performance bottlenecks, and adherence to project patterns. Writes structured feedback directly to the note.
Use this skill when:
/review-code)Example:
User: "Review this FastAPI endpoint I wrote"
AI reviews:
- Security: SQL injection risk in raw query? Missing RLS enforcement?
- Performance: N+1 query in loop? Missing eager loading?
- Correctness: Missing error handling? Wrong HTTP status codes?
- Style: Type hints? Pydantic v2 model? Conventional naming?
Collect Code to Review
search_note_content to find referenced dependencies or patternsget_issue if issue context is in note headersAnalyze Code
Classify Findings
Write Review to Note
write_to_note to append a ## Code Review sectionAuto-Execute
status: completed with finding counts{
"status": "completed",
"skill": "review-code",
"note_id": "note-uuid",
"summary": "Code review complete: 0 CRITICAL, 1 HIGH, 2 MEDIUM, 3 LOW",
"findings": {
"critical": 0,
"high": 1,
"medium": 2,
"low": 3
},
"verdict": "REQUEST_CHANGES"
}
Input: FastAPI endpoint code block in note
Output: Appends to note:
## Code Review
**Verdict**: REQUEST_CHANGES | **Score**: 7/10
### [HIGH] Missing workspace_id filter — potential RLS bypass
**Location**: `routers/invitations.py:34`
**Issue**: `repo.list_all()` does not filter by workspace_id. RLS policies at DB level prevent data leakage, but application-layer filtering is required per security architecture.
**Fix**:
\`\`\`python
# Before
results = await repo.list_all()
# After
results = await repo.list_by_workspace(workspace_id)
\`\`\`
### [MEDIUM] No HTTP 404 handling
**Location**: `routers/invitations.py:41`
**Issue**: `repo.get_by_id()` may return `None` but code does not raise HTTPException(404).
**Fix**: Add `if not invitation: raise HTTPException(status_code=404, detail="Invitation not found")`
### [LOW] Missing return type annotation
**Location**: `routers/invitations.py:28`
**Fix**: Add `-> InvitationResponse` to function signature
Input: React component with state management
Output: Flags direct state mutation, missing observer() wrapper, missing key prop in list render.
search_note_content: Find code blocks and referenced context in the noteget_issue: Fetch issue requirements if review is issue-linkedwrite_to_note: Append review findings to the note (read-only review, no code edits)/review-code command (Opus model for depth)write_to_note is append-only to review sectionGenerate a sprint retrospective with KPI dashboard and action decision records
Generate a risk register PM block with probability, impact, and mitigation strategies
Generate downloadable Markdown or HTML files (reports, summaries, styled docs)
Conversational skill creator — build, test, and refine skills in chat
Generate a lightweight Architecture Decision Record as a Decision block
Creates a structured note from a homepage chat conversation