code-reviewer

A code-review process that compares an implementation with API specifications, process diagrams, database definitions, and security requirements. API specifications describe how software endpoints should behave.

In plain words
What is it for?
Use it to review AI-generated code, validate API and database behavior, check unusual failure cases, and produce a structured review report.
Why use it?
It helps find missing error handling, mismatches with the design, unsafe input handling, and database or authentication problems.

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/miniidealab/openlogos/code-reviewer
Any agent
npx skills add miniidealab/openlogos --skill code-reviewer
Clone the repo
git clone --depth 1 https://github.com/miniidealab/openlogos

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,610 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.00000 $0.02610
Opus 5 $0.00000 $0.01305
Sonnet 5 $0.00000 $0.00522
Haiku 4.5 $0.00000 $0.00261

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

Security

Grade A, and why

code-reviewer 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.

examples/flowtask/logos/skills/code-reviewer/SKILL.md · 210 lines

How it starts

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

Skill: Code Reviewer

审查 AI 生成的代码,基于 OpenLogos 全链路规格(API YAML、时序图 EX 用例、DB DDL)进行系统性校验,确保代码与设计文档完全一致,覆盖所有异常路径,满足安全要求。

触发条件

  • 用户要求审查代码或 Code Review
  • 用户提到 "Phase 3 Step 4"、"代码审核"、"代码审查"
  • AI 刚生成了一段代码,需要验证其质量
  • 部署前的最终检查
  • 编排测试失败后需要定位代码问题

前置依赖

  • logos/resources/api/ 中包含 API YAML 规格
  • logos/resources/prd/3-technical-plan/2-scenario-implementation/ 中包含场景时序图(含 EX 用例)
  • logos/resources/database/ 中包含 DB DDL
  • 待审查的代码已可读取

无 API 的项目(纯 CLI / 库)可省略 API 一致性检查,聚焦时序图覆盖和异常处理。

核心能力

  1. 校验代码实现与 API YAML 规格的一致性
  2. 检查异常处理是否覆盖所有 EX 用例
  3. 检查 DB 操作是否符合 DDL 设计
  4. 检查安全策略(认证、RLS、输入校验)
  5. 检查代码风格和最佳实践
  6. 输出结构化的审查报告

执行步骤

Step 1: 加载规格上下文

前置检查 — YAML 有效性(优先于一切):

在加载 API 规格之前,先验证所有 logos/resources/api/*.yaml 文件是否为有效 YAML 且符合 OpenAPI 3.x 规范。如果任何文件解析失败(例如 description 字段中特殊字符未加引号),立即报告为 Critical 阻塞项——在 YAML 错误修复前不进行后续审查。

然后读取以下文件,建立代码审查的"参照基准":

  • API YAMLlogos/resources/api/*.yaml):提取端点清单,记录每个端点的路径、方法、请求体 schema、响应 schema、状态码
  • 场景时序图logos/resources/prd/3-technical-plan/2-scenario-implementation/):提取所有 EX 异常用例编号和预期行为
  • DB DDLlogos/resources/database/):提取表结构、字段类型、约束、索引
  • logos-project.yaml:读取 tech_stack 确认技术栈,external_dependencies 确认外部依赖

汇总为审查检查清单:

审查范围:S01 相关代码
- API 端点:4 个(auth.yaml)
- EX 异常用例:7 个(EX-2.1 ~ EX-5.2)
- DB 表:2 张(users, profiles)
- 安全策略:RLS 2 条

Step 2: API 一致性审查

逐个端点对比代码实现与 API YAML 规格:

检查项

检查项 说明 严重程度
路径匹配 代码中的路由路径是否与 YAML 中的 paths 完全一致 Critical
HTTP 方法 GET/POST/PUT/DELETE 是否匹配 Critical
请求体字段 代码是否读取了 YAML 中 requestBody.schema 定义的所有 required 字段 Critical
请求体校验 字段类型、format(email/uuid)、minLength 等约束是否在代码中有校验 Warning
响应字段 代码返回的 JSON 字段名和类型是否与 YAML 中 responses.schema 一致 Critical
状态码 正常和异常情况下返回的 HTTP 状态码是否与 YAML 定义一致 Critical
错误响应格式 错误响应是否遵循 { code, message, details? } 统一格式 Warning
YAML 有效性 logos/resources/api/*.yaml 所有文件是否为有效 YAML 且符合 OpenAPI 3.x 规范——description/summary 值中未加引号的特殊字符(:#)是常见故障点 Critical

Read the full file on GitHub · 210 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 · 210 lines · 0 tokens per session scan A f5015501ed38

Subscribe to this mod's changes

code-reviewer is a skill published in the GitHub repository miniidealab/openlogos (71 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,610 tokens. 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.

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