codereview

A code-review guide focused on recurring design problems in software projects, such as duplicated state, unclear layer responsibilities, and inconsistent data models.

In plain words
What is it for?
Use it to review state ownership, boundaries between layers, model definitions, renamed APIs, package exports, tests, and related documentation, with findings tied to file locations.
Why use it?
It helps reviewers find bugs and maintenance risks that may not appear in a basic style review, including changes that were not updated across tests, exports, or 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/363045841/klinechartquant/codereview
Any agent
npx skills add 363045841/KLineChartQuant --skill codereview
Clone the repo
git clone --depth 1 https://github.com/363045841/KLineChartQuant

Made for: Claude Code, Codex.

Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 420 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.00029 $0.00420
Opus 5 $0.00015 $0.00210
Sonnet 5 $0.00006 $0.00084
Haiku 4.5 $0.00003 $0.00042

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

Security

Grade A, and why

codereview 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.

.opencode/skills/codereview/SKILL.md · 47 lines

What it actually says

Code Review Principles

在进行代码和架构 Review 时,重点检查以下四类问题:

1. 状态一致性

检查同一业务状态是否被拆成多个字段、缓存或存储位置维护。

  • 优先确认是否存在单一事实来源。
  • 派生值应通过 computed 或统一投影获得。
  • 关注手动同步、影子缓存和异步覆盖造成的不一致。

2. 边界职责

检查各层是否职责重叠。

  • 避免多个层重复保存同一状态。
  • 避免无实际价值的转发方法和包装层。
  • 公共 API 不应暴露未完成或仅属于内部实现的抽象。

3. 模型契约

检查协议模型、领域模型和 UI 模型是否有清晰且唯一的权威定义。

  • 避免重复定义结构相同的类型。
  • 若协议模型就是前端标准模型,直接复用领域类型。
  • 若两者确实不同,必须明确字段转换、校验和默认值规则。

4. 变更传播

检查重命名、状态重构和公共 API 变化是否同步传播到代码、测试、文档和导出入口。

  • 搜索旧名称和残留引用。
  • 确认测试代码也经过 TypeScript 检查,避免只通过运行时转译。
  • 检查包级导出、README、设计文档和框架绑定是否同步。

Review Output

优先报告可复现的问题和高风险坏味道,并提供文件与行号。 每个 finding 说明:问题是什么、为什么有风险、建议如何收敛。 如果没有发现问题,说明已检查的边界和剩余测试风险。

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 · 47 lines · 29 tokens per session scan A ef708eec5bfe

Subscribe to this mod's changes

codereview is a skill published in the GitHub repository 363045841/KLineChartQuant (21 stars, last pushed 2d ago), licensed MIT. It adds 29 tokens to every session and 420 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-30.