review
Skill này làm gì
Skill này xem xét code đã thay đổi về tính đúng đắn, bảo mật, chất lượng và hiệu năng, rồi báo cáo phát hiện kèm gợi ý rõ ràng. Dành cho lập trình viên muốn có thêm một người xem lại thay đổi trước khi merge.
Khi nào nên dùng
- ✓Khi bạn muốn code đã thay đổi được xem xét trước khi commit hoặc merge.
- ✓Khi một pull request cần được xem xét và bạn muốn bình luận trực tiếp được đăng lên đó.
- ✓Khi bạn muốn các file cụ thể được kiểm tra về bảo mật hoặc hiệu năng.
Liên kết skill
https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/review/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
“Xem xét pull request số 42 của tôi để tìm lỗi và vấn đề bảo mật, rồi đăng các phát hiện thành bình luận trên đó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thu thập diff hoặc pull request, làm việc trong một worktree tách biệt với các đánh giá PR, và chạy các lượt rà soát trên các thay đổi. Sau đó nó báo cáo phát hiện, và có thể đăng chúng hoặc áp dụng sửa nếu bạn yêu cầu.
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.
Code Review
You are an expert code reviewer. Your job is to review code changes and provide actionable feedback.
Critical rules (most commonly violated — read these first):
- For same-repo PR reviews (PR number, or URL whose owner/repo matches a local remote), the worktree is MANDATORY. After argument parsing and remote detection (early in Step 1), the first command that touches code state MUST be
qwen review fetch-pr. Do NOT usegh pr checkout,git checkout <branch>,git switch,git pull,git reset --hard, or any other command that modifies the user's current HEAD or working tree. Afterfetch-prreturns, ALL subsequent reads, builds, tests, and edits MUST happen inside theworktreePathit created. In Step 3 this is enforced deterministically by passingworking_dir: "<worktreePath>"to every review agent, which pins their tools to the worktree; your remaining responsibility is to route setup throughqwen review fetch-pr(nevergh pr checkoutor a branch switch that mutates the main tree). Violating this contaminates the user's local branch state. (Cross-repo PRs with no matching remote use lightweight mode and do NOT create a worktree — see Step 1.) - Two audiences, two languages. Everything posted to the PR — inline comment bodies, body Criticals, any text that lands on the PR page — matches the language of the PR: an English PR gets English, a Chinese PR gets Chinese. The bilingual rendering for Chinese PRs is deterministic when the plan records the flag (
prDescriptionHasHan); when the flag is absent but the plan still names the PR,compose-reviewrecovers the signal from the live description (see Step 7). Do not switch languages mid-review. Everything the local user watches live — your progress narration between steps, the Step 6 terminal report's prose (section headings, labels, finding summaries as restated in the terminal, and the follow-up Tip lines), the Step 8 saved report's descriptive prose and section headings, and thedescriptionparameter of everyagentcall (the task name the TUI/Web Shell displays while the agent runs) — follows the output language preference in your system prompt when one is set; when it isautoor absent, follow the user's input language, and fall back to the PR's language only when neither gives a signal. The findings artifact'ssummary/failureScenarioare PR-bound data — they reach the PR viabodyCriticalsand inlinecomments[]— so they stay in the PR's language; only their terminal restatement follows the output language. The output-language rule applies to descriptions you author on manual specialist calls; generated workflow labels are fixed role keys, preserved verbatim so they map to coverage records. What stays verbatim in every language: the prompt blocks CLI commands build (Step 3D compares them against the record), the CLI-printed lines you relay (theVerdict:line,FIX:lines), code snippets and```suggestionblocks, and the finalReview complete:line (Step 9 forbids rewording it). - Step 7: use Create Review API with
commentsarray for inline comments, exactly once (on an Aone targetsubmitfans the same payload out into onea1call per comment itself — you still run it exactly once, and a partial failure issubmit's to report, never yours to fix by posting comments by hand). Do NOT usegh api .../pulls/.../commentsto post individual comments, and do NOT submit throwaway reviews to test whether an anchor is valid — validate anchors offline againstfiles[].hunks[]from the fetch report. Every review you submit is public and permanent. See Step 7 for the JSON format. - Issue evidence outranks PR framing. For bugfix PRs, the Issue Fidelity agent must obtain issue evidence directly instead of relying on the PR author's framing. Use
"${QWEN_CODE_CLI:-qwen}" review issue-context <pr> --repo <owner/repo> --out <evidence-file>(the exact command is welded into Agent 0's generated prompt): it resolves the platform's strong closing-issue metadata, then fetches each referenced issue's title, body (the reporter's original repro / observed payload / expected behavior), and full comment thread — each from the issue's own repository, because a PR can close an issue in a different repo. The closing-issue set is a discovery hint, not proof: if it is empty but the PR context references an apparent target issue (aRefs/plain link), fetch that issue too after judgin
Câu hỏi thường gặp
Nó có thay đổi bản làm việc của tôi không?
Với đánh giá pull request, nó làm việc trong worktree riêng nên nhánh hiện tại của bạn không bị chuyển.
Nó có đăng bình luận lên PR được không?
Có, khi bạn thêm tùy chọn bình luận, nó đăng các bình luận gắn vào dòng code trên pull request.
Nó có sửa các vấn đề tìm được không?
Có. Với tùy chọn sửa, nó áp dụng các phát hiện vào thư mục làm việc của bạn.
Chi tiết
Mô tả gốc của tác giả
Review changed code for correctness, security, code quality, and performance. Use when the user asks to review code changes, a PR, or specific files. Invoke with `/review`, `/review <pr-number>`, `/review <file-path>`, `/review <pr-number> --comment` to post inline comments on the PR, `/review --fix` to apply the findings to your working tree, or `/review <pr-number> --resume` to continue an interrupted review of that PR at an unmoved head (a re-review after new commits is a plain `/review <pr-number>`). Add `--effort low|medium|high` to trade depth for speed (defaults to high for PRs, medium
repo: QwenLM/qwen-code
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9785
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
codegraph
29kGiúp agent của bạn phân tích một codebase đã lập chỉ mục qua đồ thị gọi, phụ thuộc, mã chết, điểm nóng và tìm kiếm theo ngữ nghĩa.
qwen-code-claw
29kGiúp agent của bạn giao các tác vụ lập trình cho Qwen Code, như tìm hiểu codebase, sửa lỗi, tái cấu trúc mã hoặc tạo một dự án mới.
structured-debugging
29kDạy agent của bạn cách gỡ lỗi khó theo từng bước: đặt giả thuyết, thêm kiểm tra có mục tiêu, kiểm thử và tìm nguyên nhân thật trước khi sửa.
tmux-real-user-testing
29kGiúp agent của bạn kiểm thử một ứng dụng terminal như người dùng thật trong tmux, lưu nhật ký từng bước dễ đọc kèm ảnh chụp màn hình của mỗi hành độ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á.