Logo Code Review

Code Review

Cộng đồng
UnpaidAttention
code-review

Review a diff or pull request — including your own before delivery — in a fixed pass order (correctness, then safety/security, then design, then style) and report findings ranked by severity. Trigger this when asked to review a PR or diff, when checking over a change before committing or handing it off, and as the design-and-correctness half of your own pre-delivery review. Do NOT trigger for the mechanical did-it-run gate (use verification-and-review) or for a dedicated vulnerability sweep (use security-review, which this skill's safety pass defers to) — this skill is holistic human-style review of a change set.

Tổng quan

Nhà phát hànhUnpaidAttention
Kho mãfable5-methodology
Tên kỹ năngcode-review
Sao
94
Bản fork
21
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được UnpaidAttention công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Code Review trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/code-review
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnpaidAttention/fable5-methodology.git /tmp/fable5-methodology
mkdir -p .claude/skills
cp -r /tmp/fable5-methodology/skills/code-review .claude/skills/code-review
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Code Review trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Code Review ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Code Review với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Code Review

Review in order of what costs most to get wrong. A style nit found while a correctness bug goes unnoticed is a review that failed. Do the passes in sequence — do not let a formatting distraction pull you off the correctness pass.

Setup: get the whole diff and its intent

  1. Read the full change set (git diff <base>...HEAD, or the PR diff) — not just the latest commit. Review the change as it will land.
  2. Know the intent: the PR description, the linked issue, or the task. A diff can be internally perfect and still wrong — because it does the wrong thing. Judge against intent.
  3. Read big diffs in dependency order (types → logic → interfaces), not file-alphabetical.

Pass 1: Correctness (highest priority)

For each hunk ask:

  • Does it do what the intent says? Are all stated requirements actually met by this diff?
  • Edge cases: empty inputs, boundaries (off-by-one, < vs <=), null vs empty vs zero, duplicates, malformed input. Walk the same edge list as verification-and-review against the new code.
  • Logic errors: inverted conditions, wrong operator, wrong variable, swapped arguments, incorrect loop bounds, mishandled async (unawaited promises, missing error propagation).
  • Are there tests, and do they assert concrete behavior (not just "ran without throwing")? Does a test exist for the bug this PR claims to fix, failing on the old code?

Pass 2: Safety and security

  • Trust boundaries: is new external input validated? New sinks (query, command, path, HTML, deserializer) safe? If the diff touches auth, input handling, or sensitive data, run the full security-review checklist rather than a glance.
  • Failure behavior: fallible operations handled, not silently swallowed; errors carry context; resources cleaned up on all paths.
  • Secrets: none introduced in code or fixtures. Concurrency: new shared state or check-then-act races? Data safety: migrations reversible, destructive operations guarded.

Pass 3: Design

  • Right place: does the change belong where it was put, following the codebase's existing patterns? Or does it fight them / duplicate an existing utility?
  • Scope: does the diff exceed its intent (drive-by refactors, unrelated changes)? Flag scope creep — it's a review finding, not a courtesy.
  • Complexity: simpler equivalent available? Speculative abstraction (interface with one impl, config for a constant) to cut? Duplication that should be extracted (rule of three)?
  • Interfaces: are new public signatures/names clear and consistent with the codebase? Any breaking change to an existing contract, intended or accidental?

Pass 4: Style (lowest priority)

Naming clarity, comment quality (why-not-what, no process narration), formatting consistency. Rule: never let Pass 4 findings crowd out or outnumber Pass 1–2 findings in the report. If the linter enforces it, don't hand-review it — say "linter covers formatting" and move on.

Reporting

Rank by severity, most severe first. Each finding: file:line, what's wrong, why it matters (the failure it causes), and a concrete fix or a specific question.

  • CRITICAL — will break in production / security hole / data loss. Must fix before merge.
  • HIGH — bug under realistic conditions, missing error handling on a real path, requirement unmet. Fix before merge.
  • MEDIUM — design smell, missing test, scope creep, maintainability drag. Should fix.
  • LOW — style, naming, nit. Optional.

End with a one-line verdict: approve / approve-with-nits / changes-requested, and the count by severity. If there are zero substantive findings, say so plainly — don't manufacture nits to look thorough.

Reviewing your own diff

Same passes, plus: read it as a stranger's (you're blind to your own intent — lean on the written requirements instead), and specifically hunt your signature failure modes: unverified API calls stated as correct, requirements quietly narrowed, success implied without a run. Collect all findings in one read-through before fixing any — fixing mid-read hides structural problems.

Worked example finding

HIGH  src/auth/session.ts:88  Missing expiry check
  refreshSession() issues a new token whenever the old one decodes, without checking exp.
  An expired token still refreshes → sessions never actually expire (defeats the timeout the
  PR's issue asks for — requirement unmet).
  Fix: reject when payload.exp < now() before issuing; add a test with an expired token
  asserting 401.

Done when

All four passes ran in order over the complete diff judged against its stated intent; findings are ranked by severity with file:line, impact, and a concrete fix; Pass 1–2 findings are not buried under Pass 4 nits; and the report ends with an explicit verdict and severity counts. For your own work, the signature-failure-mode hunt was done before delivery.

Câu hỏi thường gặp

Kỹ năng AI Code Review làm được gì?

Review a diff or pull request — including your own before delivery — in a fixed pass order (correctness, then safety/security, then design, then style) and report findings ranked by severity. Trigger this when asked to review a PR or diff, when checking over a change before committing or handing it off, and as the design-and-correctness half of your own pre-delivery review. Do NOT trigger for the mechanical did-it-run gate (use verification-and-review) or for a dedicated vulnerability sweep (use security-review, which this skill's safety pass defers to) — this skill is holistic human-style...

Vì sao nên dùng Code Review trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Code Review là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Code Review trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/code-review. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Code Review?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Code Review với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Code Review với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Code Review có miễn phí không?

Kỹ năng này được UnpaidAttention phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇