understand

understand is a skill for Claude Code from smallnest/goal-workflow. It costs 125 tokens per session (2,172 once invoked), scanned A, original, MIT.

A review tool for understanding newly generated code changes. It builds a two-column webpage with the changed files on the left and a highlighted diff, or line-by-line change view, on the right, with explanations in Chinese.

In plain words
What is it for?
Use it to review committed, staged, unstaged, or newly created files in the current repository. It helps explain what changed, why it may be needed, and how the changed code works.
Why use it?
It makes a large or unfamiliar set of changes easier to inspect. The file tree, highlighted additions and removals, and explanations connect each code change to its surrounding project context.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the goal-workflow-skills plugin — 20 skills shipped together

Good fit Use it to review committed, staged, unstaged, or newly created files in the current repository. It helps explain what changed, why it may be needed, and how the changed code works.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smallnest/goal-workflow/understand
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add smallnest/goal-workflow --skill understand
Clone the repo
git clone --depth 1 https://github.com/smallnest/goal-workflow

Made for: Claude Code.

Or install goal-workflow-skills, the plugin that ships this one along with the rest of its 20 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for understand

README.md
[![agentmods](https://agentmods.dev/badge/skills/smallnest/goal-workflow/understand/github.svg)](https://agentmods.dev/skills/smallnest/goal-workflow/understand)
Your own site
<a href="https://agentmods.dev/skills/smallnest/goal-workflow/understand"><img src="https://agentmods.dev/badge/skills/smallnest/goal-workflow/understand/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for understand

Your own site · 80×15
<a href="https://agentmods.dev/skills/smallnest/goal-workflow/understand"><img src="https://agentmods.dev/badge/skills/smallnest/goal-workflow/understand.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00125 $0.02172
Opus 5.5 $0.00050 $0.00869
Sonnet 5.5 $0.00025 $0.00434
Haiku 4.5 $0.00013 $0.00217

Measured 1mo ago against content hash 337a1bfb4198, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

understand scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (understand.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/understand/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

understand

把「本次(AI)新生成的代码变更」变成一个可交互的审阅网页:左侧按真实项目布局列出变更文件树,右侧显示所选文件的 diff(高亮、增删与未变更代码明显区分),并在右侧边栏逐段给出相关单位需求与代码解释;解释下方可按需提供「伪代码」「调用树」两个展开式文本视图(参考 show-me skill 的呈现方式)。

始终用中文产出解释与需求。

何时用

  • 用户说 /understand、"review 这次改动"、"解释下新写的代码"、"看看这次变更做了啥"。
  • 目标是理解 + 审阅当前工作区里尚未吃透的改动(通常是 AI 刚生成的),不是重构或修 bug。

组成

skill 目录下三件套(都在 ~/.claude/skills/understand/):

  • understand.py — 纯标准库生成器,两个子命令:scan(解析 git diff → data.json + annotations.json 骨架)、render(合并注释 → report.html)。
  • template.html — Claude light 主题两栏页面(占位符 __UNDERSTAND_PAYLOAD__ 注入数据),Prism.js 走 CDN 做语法高亮。
  • 本文件 — 流程说明。

执行流程

在**用户当前工作目录(仓库内)**执行以下步骤。全程把 SKILL_DIR 当作本 skill 目录的绝对路径(即本文件所在目录)。

1. 扫描变更

python3 "$SKILL_DIR/understand.py" scan
  • 默认基线 = 当前分支与主分支(origin/main→main→master)的 merge-base;如用户指定范围可加 --base <ref>(例如只看最后一次提交用 --base HEAD~1)。
  • 默认输出目录 .understand/(相对 CWD)。可用 --out <dir> 改。
  • 它覆盖:已提交(base..HEAD) + 已暂存 + 未暂存 + 未跟踪新文件。
  • 命令会打印 JSON:文件数、增删行数、data.json / annotations.json 路径、以及 paths(变更文件列表)。读这个输出了解改了哪些文件。

2. 通读改动并撰写注释

先把改动读懂,再落注释。建议:

  • Read 每个变更文件(结合 data.json 里的 hunks 看具体增删行号),必要时读周边未改代码补足上下文。
  • 判断每处改动对应的单位需求:优先从仓库线索找真实依据——commit message、docs/ 需求文档、代码注释里写的需求编号/背景、相关 issue。找到真实需求就照写;确实找不到,就基于代码逻辑写「推测意图」并在注释里把 inferred 置为 true(前端会标成灰色「推测意图」而非「需求」,避免把猜测伪装成事实)。

然后编辑 .understand/annotations.json(scan 已生成骨架,保留其 files[].path 顺序,逐个填充)。结构:

{
  "title": "本次变更的一句话主题",
  "summary": "整体在做什么、为什么(2~4 句,可用 **加粗** 与 `代码`)",
  "files": [
    {
      "path": "src/main/java/.../PwaTierInvitationService.java",
      "summary": "这个文件这次改了什么、为何改(1~3 句)",
      "annotations": [
        {
          "side": "new",
          "start": 52,
          "end": 53,
          "requirement": "expires_at 为 timestamptz,需正确编码",
          "explanation": "Vert.x PG 客户端不支持 `java.time.Instant`,改绑 `OffsetDateTime`(`atOffset(UTC)`),否则运行期报 coercion 错误。",
          "pseudocode": "on(save)\n  if content is unchanged\n    return cached result\n  write new content\n  return fresh result",
          "callTree": "submitForm\n  createSession\n    persistPrompt\n    launchAgent\n  navigateToSession",
          "inferred": false
        }
      ]
    }
  ]
}

Read the full file on GitHub · 108 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +6 lines 337a1bfb4198
  2. 1mo ago First seen · 102 lines · 125 tokens per session scan A 878dde837fcb

Subscribe to this mod's changes

understand is a skill published in the GitHub repository smallnest/goal-workflow (293 stars, last pushed 1mo ago), licensed MIT. It adds 125 tokens to every session and 2,172 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

review-resolution

You MUST use this when code-review findings, PR comments, CI review output, or reviewer suggestions need technical validation before any fix or disposition, including feedback from human reviewers, subagents, GitHub, static-analysis tools, or external review systems.

sentimony/skills · 52 tokens

verification-gate

You MUST use this when work is about to be called complete, done, fixed, ready, or mergeable - before a completion claim, a merge or pull request, a branch finish, or a handoff report.

sentimony/skills · 48 tokens

cross-review

You MUST use this when an implementation plan or a finished implementation needs an independent review by other agent CLIs - by default the opposite CLI (Codex for work done in Claude Code, Claude Code for work done in Codex) together with Antigravity (Gemini) - whether the user asks for a cross-review or a second…

sentimony/skills · 123 tokens

review-request

You MUST use this when a completed or partially committed implementation needs an independent code review against explicit requirements, a defined task scope, and the actual Git diff, including committed and working-tree changes.

sentimony/skills · 41 tokens

criticism-self-criticism

A structured review method for examining completed work, criticism, and repeated mistakes. It focuses on specific evidence, causes, effects, and practical improvements.

HughYau/qiushi-skill · 197 tokens

validate-issue

Use when the user asks to validate, review, or check a GitHub issue against the code. Returns a cited update decision with a complexity score, or a cited close recommendation when the issue is already completed or invalid.

richkuo/rk-skills · 48 tokens