Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

diff-review-doc差异审查文档

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

196

周安装

8

GitHub Stars

公开资料未说明

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:diff-review-doc(差异审查文档)
来源仓库:https://github.com/arcblock/agent-skills
仓库路径:skills/diff-review-doc
安装命令:
npx skills add arcblock/agent-skills --skill "diff-review-doc"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add arcblock/agent-skills --skill "diff-review-doc"

简介

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。

  • 使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。
  • 通过 npx skills add arcblock/agent-skills --skill "diff-review-doc" 安装。
  • 需确认文档内容准确性,避免传播错误信息。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
diff-review-doc
description
Generate comprehensive, reviewer-ready code review documents from git diffs. Use this when the user provides code changes (git diff output, file changes, or asks to review code changes) and wants a structured review document. Creates detailed analysis covering change overview, business flow, key code explanation, risk assessment, and review recommendations. Supports both manual diff input and automatic git workspace detection. Particularly useful for reviewing pull requests, feature branches, or any code changes requiring thorough documentation for reviewers.

Diff Review Doc

Generate comprehensive code review documents from git diffs, providing detailed analysis with real code snippets, business flow breakdown, and actionable review recommendations.

Workflow

1. Obtain Diff Content

If user provides diff directly:

  • Accept the diff content as-is
  • Parse to identify changed files and hunks

If no diff is provided:

  • Use scripts/get_diff.sh to retrieve changes:
  # Get all uncommitted changes (default)
  ./scripts/get_diff.sh

  # Get staged changes only
  ./scripts/get_diff.sh --staged

  # Compare with a branch
  ./scripts/get_diff.sh --branch main

  # Get changes from specific commit
  ./scripts/get_diff.sh --commit abc123

2. Analyze the Changes

Parse the diff to extract:

  • File paths and change types (added/modified/deleted)
  • Line-level changes (+/- lines)
  • Context around changes

Read relevant files:

  • For significant changes, read the full file to understand context
  • For large files (>500 lines), focus on changed sections with surrounding context
  • Pay special attention to backend files and large file changes

Identify patterns:

  • Consult references/patterns.md for common code issues
  • Look for anti-patterns, security vulnerabilities, performance issues
  • Check architectural concerns

3. Structure the Analysis

Follow this analysis framework:

  1. 改动概览 (Change Summary)

- Count files changed, lines added/removed - Identify change type (feature/bugfix/refactor/performance/security) - List key files with brief descriptions - Note dependency or configuration changes

  1. 业务流程分析 (Business Flow Analysis)

- Explain what functionality is being implemented/changed - Map out the complete business flow - Show data flow between components - Identify all affected modules

  1. 关键代码详解 (Key Code Analysis)

- For each significant file: - Show actual diff snippets (use real code from the diff) - Explain what the code does and why it changed - Highlight logic correctness, edge cases, error handling, performance - Prioritize backend files and large changes (>200 lines) - Include file paths with line numbers for reference

  1. 风险评估 (Risk Assessment)

- Categorize risks as High/Medium/Low - Identify breaking changes, security concerns, performance impacts - Suggest mitigation measures - Flag large file changes and backend-critical changes

4. Generate Review Recommendations

Consult references/review-checklist.md for comprehensive evaluation criteria:

  • 代码质量 (Code Quality): Readability, complexity, best practices
  • 架构设计 (Architecture): Modularity, coupling, extensibility, data flow
  • 功能验证 (Functionality): Business logic, error handling, data consistency
  • 安全性 (Security): Input validation, authentication, data protection (if applicable)
  • 性能 (Performance): Database queries, resource usage, caching (if applicable)

For each category:

  • Give a rating (1-5 stars)
  • List strengths (what's done well)
  • List issues (what needs improvement)
  • Provide specific, actionable recommendations

Final recommendation:

  • Must Fix: Critical issues that block merge
  • Should Fix: Important issues to address
  • Nice to Have: Optional improvements
  • Merge decision: Approve / Conditional / Needs Work

5. Write the Review Document

Use assets/review-template.md as the base structure:

  • Copy the template structure
  • Fill in all sections with actual analysis from steps 2-4
  • Ensure all code snippets are real (from the actual diff)
  • Include complete business flow explanation
  • Provide specific, actionable review suggestions

Output:

  • Save as a Markdown file (e.g., REVIEW.md)
  • Format for easy reading (proper headings, code blocks, lists)
  • Include generation timestamp

Key Principles

Base on Real Code

  • All code snippets must be extracted from the actual diff
  • Never use placeholder or example code
  • Show actual line numbers and file paths

Complete Business Context

  • Explain the full user journey and data flow
  • Connect frontend changes to backend logic
  • Show how pieces fit together

Actionable Review Suggestions

  • Be specific about what to check
  • Identify potential risks with clear explanations
  • Provide concrete improvement suggestions
  • Prioritize issues by severity

Focus on Critical Areas

  • Large file changes: >200 lines need detailed review
  • Backend changes: API, database, auth, integrations
  • Architectural changes: Design patterns, module boundaries
  • Security-sensitive code: Input validation, data access

Resources

scripts/get_diff.sh

Bash script to retrieve git diffs in various scenarios. Supports getting uncommitted changes, staged changes, branch comparisons, and specific commits.

references/review-checklist.md

Comprehensive checklist covering all aspects of code review: quality, architecture, functionality, security, performance, testing, compatibility, operations, and documentation.

Load this reference when generating review recommendations to ensure thorough evaluation.

references/patterns.md

Catalog of common code patterns to watch for, including anti-patterns, security vulnerabilities, performance issues, and architectural concerns.

Load this reference during analysis phase to identify potential issues in the code changes.

assets/review-template.md

Structured Markdown template for the review document. Provides consistent format with sections for change summary, business flow, code analysis, risk assessment, and review recommendations.

Use as the base structure and fill in with actual analysis.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

29.25%
按下载量换算18

Cursor

23.7%
按下载量换算15

Codex

18.72%
按下载量换算12

Claude Code

13.36%
按下载量换算8

Antigravity

6.65%
按下载量换算4

Gemini CLI

2.92%
按下载量换算2

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills