跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 review-and-simplify-changes

审查和简化更改

审查一个 git diff 或清晰的文件范围,用于再利用,代码质量,效率,清晰度,以及标准问题,然后可选地应用由 Codex 驱动的安全修正. 当用户要求\"简化代码",\"审查已更改代码","检查代码再利用","审查代码质量","审查效率","简化修改","清理代码","补真修改","运行简化"时使用.

742 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

审查重用、代码质量、效率、清晰度和标准问题的 git diff 或明确文件范围,然后可选择地应用安全 Codex 驱动的校正

何时用

用户要求\"简化代码",\"审查已修改代码","检查代码再使用","审查代码质量","审查效率","简化修改","清理代码","修改因素","运行简化"

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Review and Simplify Changes、Modes、Step 1: Determine the Scope and Diff Command、Step 2: Launch Four Read-Only Review Sub-Agents in Parallel、Sub-Agent 1: Code Reuse Review、Sub-Agent 2: Code Quality Review。 其中含规范建议的小节:分步指令。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Review a git diff or explicit file scope for reuse, code quality, efficiency, clarity, and standards issues, then optionally apply safe Codex-driven fixes. Use when the user asks to \"simplify code\", \"review changed code\", \"check for code reuse\", \"review code quality\", \"review efficiency\", \"simplify changes\", \"clean up code\", \"refactor changes\", or \"run simplify\".

Review and Simplify ChangesModesStep 1: Determine the Scope and Diff CommandStep 2: Launch Four Read-Only Review Sub-Agents in ParallelSub-Agent 1: Code Reuse ReviewSub-Agent 2: Code Quality ReviewSub-Agent 3: Efficiency ReviewSub-Agent 4: Clarity and Standards ReviewStep 3: Aggregate FindingsStep 4: Fix Issues CarefullyStep 5: Validate When RequiredStep 6: Summarize Outcome

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
review-and-simplify-changes
description
Review a git diff or explicit file scope for reuse, code quality, efficiency, clarity, and standards issues, then optionally apply safe Codex-driven fixes. Use when the user asks to \"simplify code\", \"review changed code\", \"check for code reuse\", \"review code quality\", \"review efficiency\", \"simplify changes\", \"clean up code\", \"refactor changes\", or \"run simplify\".
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「review-and-simplify-changes」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-9fe65843b2a36b6a-%E5%AE%A1%E6%9F%A5%E5%92%8C%E7%AE%80%E5%8C%96%E6%9B%B4%E6%94%B9.html
请存为 .cursor/skills/review-and-simplify-changes/SKILL.md 或 .claude/skills/review-and-simplify-changes/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/dimillian/skills' --list

npx skills add 'https://github.com/dimillian/skills' --skill 'review-and-simplify-changes'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版

name: review-and-simplify-changes description: "Review a git diff or explicit file scope for reuse, code quality, efficiency, clarity, and standards issues, then optionally apply safe Codex-driven fixes. Use when the user asks to "simplify code", "review changed code", "check for code reuse", "review code quality", "review efficiency", "simplify changes", "clean up code", "refactor changes", or "run simplify"."

Review and Simplify Changes

Review changed code for reuse, quality, efficiency, and clarity issues. Use Codex sub-agents to review in parallel, but keep those sub-agents read-only: they should only inspect code and send findings back to the main agent. Only the main agent may apply high-confidence, behavior-preserving fixes.

Modes

Choose the mode from the user's request:

  • review-only: user asks to review, audit, or check the changes
  • safe-fixes: user asks to simplify, clean up, or refactor the changes
  • fix-and-validate: same as safe-fixes, but also run the smallest relevant validation after edits

If the user does not specify, default to:

  • review-only for "review", "audit", or "check"
  • safe-fixes for "simplify", "clean up", or "refactor"

Step 1: Determine the Scope and Diff Command

Prefer this scope order:

  1. Files or paths explicitly named by the user
  2. Current git changes
  3. Files edited earlier in the current Codex turn
  4. Most recently modified tracked files, only if the user asked for a review but there is no diff

If there is no clear scope, stop and say so briefly.

When using git changes, determine the smallest correct diff command based on the repo state:

  • unstaged work: git diff
  • staged work: git diff --cached
  • branch or commit comparison explicitly requested by the user: use that exact diff target
  • mixed staged and unstaged work: review both

Do not assume git diff HEAD is the right default when a smaller diff is available.

Before reviewing standards or applying fixes, read the repo's local instruction files and relevant project docs for the touched area. Prefer the closest applicable guidance, such as:

  • AGENTS.md
  • repo workflow docs
  • architecture or style docs for the touched module

Use those instructions to distinguish real issues from intentional local patterns.

Step 2: Launch Four Read-Only Review Sub-Agents in Parallel

Use Codex sub-agents when the scope is large enough for parallel review to help. For a tiny diff or one very small file, it is acceptable to review locally instead.

When spawning sub-agents:

  • give each sub-agent the same scope
  • tell each sub-agent to inspect only its assigned review role
  • tell each sub-agent it is operating in a read-only review pass
  • do not let sub-agents edit files, run apply_patch, stage changes, commit, or perform other state-mutating actions
  • ask for concise, structured findings only
  • ask each sub-agent to report file, line or symbol, problem, recommended fix, and confidence
  • ask each sub-agent to return findings to the main agent only; they must not implement fixes themselves

Use four review roles.

Sub-Agent 1: Code Reuse Review

Review the changes for reuse opportunities:

  1. Search for existing helpers, utilities, or shared abstractions that already solve the same problem.
  2. Flag duplicated functions or near-duplicate logic introduced in the change.
  3. Flag inline logic that should call an existing helper instead of re-implementing it.

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: explorer for broad codebase lookup, or reviewer if a stronger review pass is more useful than wide search.

Sub-Agent 2: Code Quality Review

Review the same changes for code quality issues:

  1. Redundant state, cached values, or derived values stored unnecessarily
  2. Parameter sprawl caused by threading new arguments through existing call chains
  3. Copy-paste with slight variation that should become a shared abstraction
  4. Leaky abstractions or ownership violations across module boundaries
  5. Stringly-typed values where existing typed contracts, enums, or constants already exist

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Sub-Agent 3: Efficiency Review

Review the same changes for efficiency issues:

  1. Repeated work, duplicate reads, duplicate API calls, or unnecessary recomputation
  2. Sequential work that could safely run concurrently
  3. New work added to startup, render, request, or other hot paths without clear need
  4. Pre-checks for existence when the operation itself can be attempted directly and errors handled
  5. Memory growth, missing cleanup, or listener/subscription leaks
  6. Overly broad reads or scans when the code only needs a subset

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Sub-Agent 4: Clarity and Standards Review

Review the same changes for clarity, local standards, and balance:

  1. Violations of local project conventions or module patterns
  2. Unnecessary complexity, deep nesting, weak names, or redundant comments
  3. Overly compact or clever code that reduces readability
  4. Over-simplification that collapses separate concerns into one unclear unit
  5. Dead code, dead abstractions, or indirection without value

This sub-agent is read-only. It must not edit files, apply patches, or make any other workspace changes.

Recommended sub-agent role: reviewer

Only report issues that materially improve maintainability, correctness, or cost. Do not churn code just to make it look different.

Step 3: Aggregate Findings

Wait for all review sub-agents to complete, then merge their findings.

The main agent owns this step. Treat sub-agent output as review input only, not as permission to delegate code changes back out.

Normalize findings into this shape:

  1. File and line or nearest symbol
  2. Category: reuse, quality, efficiency, or clarity
  3. Why it is a problem
  4. Recommended fix
  5. Confidence: high, medium, or low

Discard weak, duplicative, or instruction-conflicting findings before editing.

Step 4: Fix Issues Carefully

In review-only mode, stop after reporting findings.

In safe-fixes or fix-and-validate mode:

  • Only the main agent applies fixes for this skill
  • Apply only high-confidence, behavior-preserving fixes
  • Skip subjective refactors that need product or architectural judgment
  • Preserve local patterns when they are intentional or instruction-backed
  • Keep edits scoped to the reviewed files unless a small adjacent change is required to complete the fix correctly

Prefer fixes like:

  • replacing duplicated code with an existing helper
  • removing redundant state or dead code
  • simplifying control flow without changing behavior
  • narrowing overly broad operations
  • renaming unclear locals when the scope is contained

Do not stage, commit, or push changes as part of this skill.

Step 5: Validate When Required

In fix-and-validate mode, after the main agent finishes edits, run the smallest relevant validation for the touched scope.

Examples:

  • targeted tests for the touched module
  • typecheck or compile for the touched target
  • formatter or lint check if that is the project's real safety gate

Prefer fast, scoped validation over full-suite runs unless the change breadth justifies more.

If validation is skipped because the user asked not to run it, say so explicitly.

Step 6: Summarize Outcome

Close with a brief result:

  • what was reviewed
  • what was fixed, if anything
  • what was intentionally left alone
  • whether validation ran

If the code is already clean for this rubric, say that directly instead of manufacturing edits.

相关技能

Agent 工作流

技能创建者Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

克劳德胡布Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

团队指挥Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

超级力量Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…