pr-review-canvas
Skill này làm gì
Skill xây dựng một trang review dễ đọc cho pull request, với các thay đổi được sắp xếp theo mức độ quan trọng. Dành cho người review muốn hiểu nhanh một thay đổi lớn.
Khi nào nên dùng
- ✓Khi bạn yêu cầu review một pull request từ liên kết GitHub.
- ✓Khi diff lớn và bạn muốn tách logic cốt lõi khỏi mã lặp lại.
- ✓Khi bạn muốn một hướng dẫn qua các đoạn code phức tạp hoặc bất ngờ trong thay đổi.
Liên kết skill
https://github.com/cursor/plugins/blob/main/pr-review-canvas/skills/pr-review-canvas/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy tạo một canvas review cho https://github.com/acme/app/pull/42 để tôi thấy những gì quan trọng nhất trước.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc diff của pull request bằng công cụ dòng lệnh GitHub, nhóm các thay đổi theo mức người review cần chúng, rồi xây trang canvas. Nếu bạn chưa đưa liên kết pull request, nó sẽ hỏi bạn một liên kết.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
PR Review Canvas
Build a canvas that presents a PR diff reorganized for reviewer comprehension — not in file-tree order.
Prerequisites
Read ~/.cursor/skills-cursor/canvas/SKILL.md first. It contains the generation policy, design guidance, slop rules, self-check, and file-path conventions you must follow. The full component and hook surface is declared in ~/.cursor/skills-cursor/canvas/sdk/index.d.ts and its sibling .d.ts files — read them to discover exact exports and prop shapes rather than guessing.
Gather the diff
Expect a GitHub PR link (a full URL like https://github.com/<owner>/<repo>/pull/<n>, or an equivalent gh-resolvable reference). Use gh pr diff <pr> to collect every file's path, additions, deletions, and hunks.
If the user didn't provide a PR link, stop and ask. Do not guess at the current branch, infer from recent history, or fall back to a local git diff. Ask the user which diff they want to review — a specific PR URL or number — and wait for their reply before continuing.
Group changes for comprehension
Do not present files in alphabetical or tree order. Reorganize into sections ordered by reviewer value:
- Core logic — New behavior, algorithm changes, state transitions, API surface changes. Show full diffs with surrounding context.
- Wiring & integration — Route registration, dependency injection, config plumbing that connects the core logic. Condensed — enough to confirm correctness.
- Boilerplate & mechanical — Import reordering, renames, generated code, formatting, type re-exports. Summarize as a list of file names and stats. No inline diffs unless specifically relevant.
Lead with core logic. The reviewer's attention is freshest at the top.
Distill complex logic into pseudocode
When a core change involves dense or intricate logic — deeply nested conditions, state machines, retry/backoff flows, multi-step transformations — add a short pseudocode summary next to the diff. The pseudocode should strip away language syntax, error handling, and boilerplate to expose the essential algorithm or control flow in a few lines. This lets the reviewer confirm intent before reading the real code.
Only do this when the actual diff is hard to scan. Straightforward changes don't need a pseudocode mirror.
Trace tricky logic on a concrete example
Pseudocode shows the shape of the change; an example trace shows it executing. When a hunk changes behavior in a way that's hard to predict from reading it — reordered effects, new short-circuits, altered edge cases — pick a concrete input and walk it through both the old and new code paths side-by-side, highlighting the step where they diverge and what the observable outcome is. Keep the input small and realistic.
Use this for genuinely surprising behavior changes, not every core hunk.
Call attention to tricky things
When a hunk contains something surprising, risky, or easy to miss, visually separate it from the surrounding diff and pair it with a short tag (e.g. "Subtle", "Breaking", "Race condition", "Perf") and a one-sentence explanation so the reviewer sees the concern and the code together.
Reserve these callouts for genuinely tricky items — overuse destroys signal.
Tone and content
Write reviewer-facing commentary, not a changelog. Focus on:
- Why something changed, not just what changed.
- Interactions between files — e.g. "The new validator in
core.tsis invoked by the route added inroutes.ts." - Anything the diff alone doesn't make obvious.
Keep commentary terse. One or two sentences per note.
Be creative
The sections above are a floor, not a ceiling. The goal is the fastest possible path for the reviewer to understand this specific change — so look at the diff in front of you and ask what representation would actually help. A tiny state diagram, a before/after call graph, a table of input→output pairs, a timeline of commits, a confidence annotation per file, a single large callout with everything else collapsed — whatever fits the change.
The canvas SDK has charts, tables, diff views, DAG layout, cards, stats, interactive state, and more. Reach for whichever components best serve the change at hand. A review of a refactor looks different from a review of a bug fix looks different from a review of a new feature — let the canvas reflect that.
Câu hỏi thường gặp
Nó có hoạt động với nhánh cục bộ không?
Không. Skill yêu cầu liên kết pull request và không đoán từ các thay đổi cục bộ của bạn.
Nó có cần đọc hướng dẫn canvas trước không?
Có. Skill đọc file hướng dẫn canvas trước khi xây trang.
Các thay đổi được sắp xếp theo thứ tự nào?
Theo mức độ quan trọng với người review, như logic cốt lõi trước, chứ không theo thứ tự file.
Chi tiết
Mô tả gốc của tác giả
Render a PR diff review as a Cursor Canvas that groups changes by reviewer importance, separates boilerplate from core logic, and highlights tricky or unexpected code. Use when reviewing a pull request, summarizing a diff for review, or when the user asks for a PR review canvas, diff walkthrough, or change-set overview.
repo: cursor/plugins
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11007
- Giấy phép
- —
- Cập nhật
- 31/10/2026
Bình luận
- …
Thêm skill từ kho mã này
advisor
15kCho agent hỏi ý kiến một mô hình thứ hai mạnh hơn tại các điểm then chốt, như trước quyết định lớn hoặc khi bị kẹt ở lỗi, nếu bạn bật nó.
check-agent-compatibility
15kKiểm tra xem coding agent AI có khởi động, xác minh và ghi tài liệu được cho một repository không, rồi trả về một điểm tương thích và vấn đề chính.
cli-for-agents
15kDạy agent thiết kế hoặc rà soát công cụ dòng lệnh để các coding agent AI chạy được mà không cần lời nhắc, với trợ giúp rõ ràng và ví dụ.
continual-learning
15kGiữ các ghi chú AGENTS.md của bạn cập nhật bằng cách giao việc rà soát các cuộc trò chuyện trước cho một trình cập nhật bộ nhớ chuyên dụng.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.