llm/llmapi/miniagent/skills/code-review/SKILL.md
进行全面的代码审查,涵盖安全、性能与可维护性分析。适用于用户要求审查代码、排查缺陷或审计代码库的场景。
npx skillsauth add linkxzhou/mylib code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
你现在具备进行全面代码审查的专业能力。请遵循以下结构化方法:
检查项:
npm audit、pip-audit 等检查)# 快速安全扫描
npm audit # Node.js
pip-audit # Python
cargo audit # Rust
grep -r "password\|secret\|api_key" --include="*.py" --include="*.js"
检查项:
检查项:
检查项:
检查项:
## 代码审查:[文件/组件名]
### 概要
[1-2 句概述]
### 严重问题
1. **[问题]**(第 X 行):[描述]
- 影响:[可能的风险/后果]
- 修复:[建议的解决方案]
### 改进建议
1. **[建议]**(第 X 行):[描述]
### 正向反馈
- [做得好的地方]
### 结论
[ ] 可以合并
[ ] 需要小改
[ ] 需要大改
# 不推荐:SQL 注入
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# 推荐:
cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))
# 不推荐:命令注入
os.system(f"ls {user_input}")
# 推荐:
subprocess.run(["ls", user_input], check=True)
# 不推荐:可变默认参数
def append(item, lst=[]): # Bug:可变默认参数会在多次调用间共享
# 推荐:
def append(item, lst=None):
lst = lst or []
// 不推荐:原型污染
Object.assign(target, userInput)
// 推荐:
Object.assign(target, sanitize(userInput))
// 不推荐:使用 eval
eval(userCode)
// 推荐:不要对用户输入使用 eval
// 不推荐:回调地狱
getData(x => process(x, y => save(y, z => done(z))))
// 推荐:
const data = await getData();
const processed = await process(data);
await save(processed);
# 查看最近变更
git diff HEAD~5 --stat
git log --oneline -10
# 查找潜在问题
grep -rn "TODO\|FIXME\|HACK\|XXX" .
grep -rn "password\|secret\|token" . --include="*.py"
# 检查复杂度(Python)
pip install radon && radon cc . -a
# 检查依赖
npm outdated # Node
pip list --outdated # Python
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.