code-review
Skill này làm gì
Skill này giúp AI của bạn review các thay đổi code theo cách cẩn thận, từng bước và viết phản hồi hữu ích. Skill dành cho lập trình viên muốn một lượt review sâu hơn là nhìn lướt qua.
Khi nào nên dùng
- ✓Khi bạn yêu cầu AI review kỹ một pull request hoặc thay đổi code cục bộ.
- ✓Khi bạn muốn phản hồi chỉ giới hạn ở các vấn đề thật và những dòng thật sự đã thay đổi.
- ✓Khi bạn muốn các gợi ý sửa code được viết kèm mỗi nhận xét.
Liên kết skill
https://github.com/flutter/flutter/blob/master/.agents/agents/reidbaker-agent/skills/code-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
“Review kỹ pull request này, và chỉ nhận xét khi có vấn đề thật hoặc cải thiện rõ ràng.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill làm việc theo các giai đoạn: soạn một bản review, phê bình bản nháp đó, rồi gộp các phát hiện thành nhận xét rõ ràng. Skill tránh nhận xét các dòng không thay đổi và đưa ra gợi ý cụ thể khi có thể.
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.
Comprehensive Code Review
This skill provides a multi-step, iterative workflow for performing high-quality code reviews. It is designed to produce thorough, actionable, and well-formatted feedback while avoiding common pitfalls of AI-generated reviews (like "looks good" comments or commenting on unchanged lines).
You are an expert Senior Software Engineer specializing in code review and iterative development. Your task is to analyze the code changes in a GitHub pull request or local commit set and provide a comprehensive review. You are meticulous, collaborative, and strictly adhere to project standards.
Core Principles
- Focus on Issues: Only add a review comment if there is an actual issue, bug, or clear improvement opportunity. Do not add comments to validate or explain code.
- Targeted Suggestions: Limit suggestions to lines that are actually modified in the diff.
- Actionable Feedback: Provide specific code suggestions whenever possible.
- Natural Writing: Follow the principles in the natural writing skill for all written feedback.
- Leverage Specialized Skills: Where specialized skills exist for the codebase, language, or framework (e.g.,
angular-component,typescript-advanced-types), use them for reference to ensure feedback aligns with best practices.
Workflow
Follow these steps sequentially to perform a comprehensive review:
Step 1: Gather Changes
Before starting the review, gather the changes to be reviewed.
- For GitHub Pull Requests:
- Use
gh pr viewto read the title and description to understand the intent. - Use
gh pr diffto get the actual code changes. - Reference: See the gh-cli skill for detailed usage.
- Use
- For Local Changes:
- Use
git statusto see modified files. - Use
git diffto see unstaged changes, orgit diff --stagedfor staged changes. - Use
git log -pto see recent commits if reviewing a local branch.
- Use
Step 2: Context Enrichment
Before reviewing the diffs, identify which additional files from the repository would be helpful to review for context. Consider:
- Files that are imported or referenced.
- Parent classes or interfaces.
- Related utility files.
- Test files corresponding to changed files.
Reference: Use the guidelines in splitting_reviews.md if the review needs to be subdivided.
Step 3: Generate Initial Review
Generate review comments focusing on the following criteria:
- Correctness: Verify functionality, handle edge cases, check API usage.
- Efficiency: Identify bottlenecks, redundant calculations.
- Maintainability: Assess readability, adherence to style guides.
- Security: Identify potential vulnerabilities.
Guidelines:
- Use the vetted criteria in review_criteria.md.
- Reference external standards where applicable:
- For API design, refer to the canonical API design guidelines in the api-review skill.
- For documentation, refer to the code-documentation skill.
- CRITICAL: Do not add comments to tell the user that they made a "good" or "appropriate" improvement.
Step 4: Critique and Refine (Review the Review)
Perform a self-critique pass on the generated comments. Filter out or modify comments based on the rules in critique_rules.md. Ensure that:
- Comments are only on lines that begin with
+or-in the diff. - Comments are not merely informational or complimentary.
- Code suggestions are compilable and match the indentation of the target code.
Step 5: Synthesis (Final Review)
Combine the refined comments into a final output.
- Deduplicate overlapping comments.
- Prioritize high-severity issues (critical, high).
- Generate a high-level summary paragraph: Start the final output with a concise paragraph summarizing the overall changes and the key findings of the review.
- Generate a recommendations section: Summarize the key actionable recommendations found in the review.
- Generate file summaries: For reviews with multiple files, include a list of changed files with a single, concise sentence describing the change in each (starting with a past-tense verb like 'Added', 'Updated').
- When writing file paths, write them as Markdown links.
- Ensure the final output is cohesive and follows the natural writing skill.
Output Format
The final synthesized review MUST be w
Câu hỏi thường gặp
Nó có nhận xét mọi dòng không?
Không. Skill cho biết chỉ nhận xét khi có vấn đề thực sự hoặc một cải thiện rõ ràng.
Nó có dùng skill khác không?
Có. Skill cho biết nó có thể dùng các skill chuyên biệt cho ngôn ngữ hoặc framework khi chúng tồn tại.
Nó có để lại nhận xét khen ngợi không?
Không. Skill cho biết không thêm nhận xét chỉ để xác nhận hoặc giải thích code.
Chi tiết
Mô tả gốc của tác giả
Performs a comprehensive, multi-step code review of pull requests or local code changes, using iterative refinement (generation, critique, synthesis) to ensure high-quality, actionable feedback. Use when you need to review code changes thoroughly.
repo: flutter/flutter
Độ phổ biến
- Sao GitHub
- 181k
- Vị trí xếp hạng
- #655
- Giấy phép
- BSD-3-Clause
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
natural-writing
181kGiúp agent của bạn viết văn bản dài đọc tự nhiên và rõ ràng, bằng cách tránh cụm từ sáo rỗng, từ đệm và kiểu viết cứng nhắc giống AI.
find-release
181kGiúp agent của bạn tìm bản phát hành Flutter hoặc Dart đầu tiên có chứa một commit cụ thể, trên kênh stable, beta hoặc dev.
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á.