code-review-checklist

A checklist for reviewing code for correctness, security, performance, clarity, tests, and documentation. It also includes checks for AI-generated code, such as unsafe prompts and unhandled failures.

In plain words
What is it for?
Use it during code reviews to check input handling, injection risks, exposed credentials, database queries, package size, tests, comments, API documentation, and AI-related safeguards.
Why use it?
It gives reviewers a consistent way to find bugs, security risks, inefficient database access, unclear code, missing tests, and outdated documentation.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/misonl/ling/code-review-checklist
Any agent
npx skills add MisonL/Ling --skill code-review-checklist
Clone the repo
git clone --depth 1 https://github.com/MisonL/Ling

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,135 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.01135
Opus 5 $0.00010 $0.00567
Sonnet 5 $0.00004 $0.00227
Haiku 4.5 $0.00002 $0.00113

Measured 2d ago against content hash 712c8b22c1c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-review-checklist scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/code-review-checklist/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

代码审查检查清单

快速审查清单

正确性

  • 功能对齐:代码是否实现了预期的功能?
  • 边缘情况:是否处理了所有的边缘情况?
  • 错误处理:是否建立了完善的错误处理机制?
  • 无明显 Bug:是否存在显而易见的逻辑漏洞?

安全性

  • 输入校验:是否对所有输入进行了验证与净化(sanitized)?
  • 注入防护:是否存在 SQL/NoSQL 注入风险?
  • XSS/CSRF:是否存在跨站脚本或跨站请求伪造漏洞?
  • 凭据安全:是否存在硬编码的密钥(secrets)或敏感凭据?
  • AI 特定:是否针对提示词注入(Prompt Injection)进行了防护(如适用)?
  • AI 特定:输出内容在进入关键接收端(Sinks)前是否已净化?

性能

  • N+1 问题:是否存在数据库 N+1 查询问题?
  • 循环优化:是否存在不必要的循环逻辑?
  • 缓存策略:是否使用了适当的缓存机制?
  • 包体积:是否考虑了对 bundle size(包体积)的影响?

代码质量

  • 命名清晰:变量及函数命名是否意图明确?
  • DRY(不要重复自己):是否遵循 DRY 原则,无冗余代码?
  • SOLID(面向对象设计原则):是否遵循 SOLID 原则?
  • 抽象层次:抽象层级是否恰当?

测试

  • 单元测试:新代码是否配有相应的单元测试?
  • 边缘测试:边缘情况是否包含在测试范围内?
  • 可读性:测试用例是否易于阅读与维护?

文档

  • 逻辑注释:复杂逻辑是否配有必要的说明注释?
  • API 文档:公共 API 是否已记录?
  • README:如有必要,是否已更新项目 README 文件?

AI/LLM(大语言模型)审查模式(2025)

逻辑与幻觉

  • 思维链(Chain of Thought):其逻辑推理路径是否可验证?
  • 边缘情况:AI 是否考虑了空状态、超时及部分失败的情况?
  • 外部状态:代码对于文件系统或网络的假设是否安全?

提示词工程审查

// [FAIL]  代码中存在模糊的提示词
const response = await ai.generate(userInput);

// [OK]  结构化且安全的提示词
const response = await ai.generate({
  system: "您是一个专业的解析器......",
  input: sanitize(userInput),
  schema: ResponseSchema
});

应标识的反模式

// [FAIL]  魔术数字
if (status === 3) { ... }

// [OK]  具名常量
if (status === Status.ACTIVE) { ... }

// [FAIL]  深度嵌套
if (a) { if (b) { if (c) { ... } } }

// [OK]  卫语句/早期返回
if (!a) return;
if (!b) return;
if (!c) return;
// 处理核心逻辑

// [FAIL]  长函数 (超过 100 行)
// [OK]  短小且专注的函数

// [FAIL]  使用 any 类型
const data: any = ...

// [OK]  使用正确的类型
const data: UserData = ...

审查评注指南

// [CRITICAL]  阻塞性问题:关键路径中存在 SQL 注入漏洞
[CRITICAL]  BLOCKING(阻塞): 此处存在 SQL 注入风险

// [SUGGESTION]  重要建议:考虑使用 useMemo 优化性能
[SUGGESTION]  SUGGESTION(建议): 考虑此处使用 useMemo 进行性能优化

// [NIT]  细节修饰 (Nits):对于不可变变量,优先使用 const
[NIT]  NIT(细节): 对于不可变变量,建议优先使用 const 而非 let

//  疑问确认:如果此处用户(User)为空会怎样?
 QUESTION(疑问): 如果此处 User(用户)为 null 会发生什么情况?

Read the full file on GitHub · 126 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 126 lines · 20 tokens per session scan A 712c8b22c1c1

Subscribe to this mod's changes

code-review-checklist is a skill published in the GitHub repository MisonL/Ling (9 stars, last pushed 5mo ago), licensed MIT. It adds 20 tokens to every session and 1,135 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens