Agent skill

Understand

by smallnest in smallnest/goal-workflow

Review and understand freshly AI-generated code. An agent skill from smallnest/goal-workflow.

MITAuto-check passedDevelopment

Install Understand

skills CLI
$ npx skills add smallnest/goal-workflow --skill understand -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install smallnest/goal-workflow understand --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/smallnest/goal-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/understand .claude/skills/understand && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
understand
GitHub stars
289
Token cost
~1.1k tokens
SKILL.md length
180 words
Files
3
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

Review and understand freshly AI-generated code. An agent skill from smallnest/goal-workflow.

  • Works in 3 steps: 扫描变更 → 通读改动并撰写注释 → 渲染并打开
  • Tasks that involve Technical documentation
  • SKILL.md covers 何时用, 组成, 执行流程 and 注意
  • Runs Python scripts from its folder; calls python3 and git

What it does

Understand is an agent skill from smallnest/goal-workflow. Review and understand freshly AI-generated code. Scans the current repo's uncommitted/branch changes and builds a Claude-style light-themed two-column webpage — left is the project folder tree of changed files, right is the selected file's syntax-highlighted diff (additions/deletions clearly distinguished from unchanged code) with a side rail showing, per code segment, the related unit requirement (相关单位需求) and a plain-language code explanation (代码解释). Invoke for "/understand", "code review 这次改动", "解释一下新生成的代码"…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `understand.py`).

It sits in Development, covering Technical documentation and Plain language and style rules. The repository describes itself as: AI-driven development workflow with /prd, /goal, /review-it and /ship-it skills. The licence is MIT.

When your agent uses it

  • Tasks that involve Technical documentation
  • Tasks that involve Plain language and style rules

Example prompts

  • “/understand”
  • “code review 这次改动”
  • “解释一下新生成的代码”
  • “/understand”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 扫描变更
  2. 通读改动并撰写注释
  3. 渲染并打开

What it can do on your machine

Read from SKILL.md and the folder at commit b06ab3c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Understand loads about 1.1k tokens when it runs. Until then it costs about 134 tokens; SKILL.md has 180 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~134
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from smallnest/goal-workflow at commit b06ab3c, republished under its MIT licence (© smallnest). 180 words, ~1,121 tokens.

Download SKILL.mdSave it as .claude/skills/understand/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
understand
description
Review and understand freshly AI-generated code. Scans the current repo's uncommitted/branch changes and builds a Claude-style light-themed two-column webpage — left is the project folder tree of changed files, right is the selected file's syntax-highlighted diff (additions/deletions clearly distinguished from unchanged code) with a side rail showing, per code segment, the related unit requirement (相关单位需求) and a plain-language code explanation (代码解释). Invoke for "/understand", "code review 这次改动", "解释一下新生成的代码", "看看这次变更".
metadata.author
smallnest
metadata.version
1.0.0

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. 扫描变更
bash
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 顺序,逐个填充)。结构:

json
{
  "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
        }
      ]
    }
  ]
}

注释字段:

  • side — "new" 锚定新版本行号(增行/上下文),"old" 锚定旧版本行号(删行)。绝大多数解释用 "new"。
  • start / end — 该段代码的行号区间(data.json 里对应 side 的 newNo/oldNo;单行时 end 可省或等于 start)。行号是文件真实行号,不是 diff 里的序号。
  • requirement — 该段对应的单位需求(简短一句,作为标签展示)。可留空。
  • explanation — 代码解释:讲清这段在干嘛、为什么这么写、有何风险/前提。可用 `code` 和 **bold**。
  • pseudocode / callTree — 可选的两种补充视图(参考 show-me skill),给了字段,该卡片解释下方才会出现「伪代码」「调用树」按钮,点击展开文本面板:
    • pseudocode — 把这段的逻辑/算法写成语言无关的伪代码:两空格缩进表结构与分支,只保留关键判断、边界与数据流向,不照抄源码(不写变量声明、类型等噪音)。
    • callTree — 这段代码运行期的控制流调用树:根节点是本段入口,两空格缩进表调用层级,只列真正会执行到的调用(必要处可带一句 # 注释 说明分支条件),不列未走过的分支。
    • 这两个视图不必每条注释都写:只为算法较绕(多分支/状态机/缓存判定)或调用链较深(跨多层模块)的段落写;都不适用就两个都省略。
  • inferred — 需求为推测时置 true。

注释密度:聚焦关键/易错/体现需求的段落(新增的核心逻辑、边界处理、并发/事务、类型坑、SQL 口径等),不必逐行;每个重要文件给 1~5 条即可。可参考项目记忆里的常见坑(如 Vert.x Future.await()、PG = ANY 数值数组、timestamptz 编码)来判断哪些点值得解释。

3. 渲染并打开
bash
python3 "$SKILL_DIR/understand.py" render
open .understand/report.html    # macOS;Linux 用 xdg-open

render 会把 data.json + annotations.json 合并注入模板,产出 .understand/report.html(单文件,纯前端,Prism 走 CDN)。用浏览器打开即可:左树选文件 → 右侧看 diff → 边栏卡片点「定位 →」跳到对应代码行(会高亮闪一下);若注释写了 pseudocode/callTree,卡片解释下方会出现「伪代码」「调用树」按钮,点击展开/收起(同卡片内两个视图互斥)。左侧文件树栏可拖动分隔条调整宽度(宽度记忆在 localStorage,双击分隔条恢复默认)。

最后用中文向用户简述:改了几个文件、核心变更是什么、有哪些值得注意的点,并给出 report.html 路径。

注意

  • .understand/ 是产物目录,建议提醒用户按需 git clean 或加 .gitignore,别误提交。
  • 若 data.json 为空(无变更),如实告知用户没有检测到改动,不要硬造。
  • 行号务必对齐 data.json:annotations.json 里的 start/end 用文件真实行号,side 决定用新/旧行号系。填错会导致边栏卡片锚不到代码行(不报错,但点「定位」无反应)。
  • 不改动用户业务代码;本 skill 只读代码 + 写 .understand/ 下的产物。

© smallnest, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/understand of smallnest/goal-workflow.

  • SKILL.md
  • template.html
  • understand.py

Open the folder on GitHubat commit b06ab3c

Compare with similar skills

Understand next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Understand compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Understand this skillsmallnest/goal-workflow289—~1.1kAutomated safety check: PassMIT
Agent Stylepchalasani/claude-code-tools2k—~1.4kAutomated safety check: PassMIT
Content Modelguardana/guardana129—~1.2kAutomated safety check: PassApache-2.0
Tabler Docs Writertabler/tabler42k—~2.5kAutomated safety check: PassMIT
Writing Guidelinesrohitg00/pro-workflow2.9k—~593Automated safety check: PassNone
Writing User Facing CopyPostHog/posthog40k—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Agent Style

    pchalasani/claude-code-tools

    Literature-backed English technical-prose writing rules (agent-style, 21 rules).

    2k GitHub stars~1.4k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Content Model

    guardana/guardana

    Route wording work to GPT (codex CLI) or Gemini (agy CLI) instead of writing it with Claude — landing-page copy, a readability rewrite of a README or docs page, attack and judge prompts for a rule…

    129 GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Tabler Docs Writer

    tabler/tabler

    Writes and updates Tabler documentation pages in simple English following the repository's page schema, and flags new components that have no docs yet.

    42k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Writing Guidelines

    rohitg00/pro-workflow

    Apply clear-writing standards to any prose the agent produces - READMEs, docs, UI copy, error messages, commit and PR text, release notes.

    2.9k GitHub stars~593 tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Official

    Sets the voice and word choices for any text a person reads in PostHog: UI labels, buttons, tooltips, empty and error states, notifications, in-app messages, onboarding, docs, and support replies.

    40k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Comment Layout And Formatting

    kitchen-engineer42/pdf2skills

    Apply proper indentation and spacing rules to code comments to enhance readability and maintain code visual structure.

    134 GitHub stars~408 tokensUpdated 7 mo ago
    DevelopmentAuto-check passed

More from smallnest/goal-workflow

All 20 skills in this repo
  • Article Icons

    smallnest/goal-workflow

    Illustrate an article (Markdown, HTML, etc.) with animated-style icons from itshover.com/icons.

    289 GitHub stars~1.6k tokensUpdated 25 days ago
    Auto-check passed
  • Graph

    smallnest/goal-workflow

    Graph engineering for parallel task execution: convert a task, PRD, SPEC, or issue set into a dependency graph (DAG), layer it into supersteps, then implement each independent node concurrently with…

    289 GitHub stars~3.9k tokensUpdated 25 days ago
    Auto-check passed
  • Walkthrough

    smallnest/goal-workflow

    Generate a Phase-2 Walkthrough artifact (walkthrough.md) once implementation and verification are complete.

    289 GitHub stars~4.7k tokensUpdated 25 days ago
    Auto-check: notes
  • Insight Diagram

    smallnest/goal-workflow

    为任意项目生成 UML 图、架构图和流程图。分析代码库后让用户选择要生成的图表类型,使用 architecture-diagram skill 渲染为 HTML+SVG,保存到 docs/ 目录。适用于任何软件项目的文档可视化。

    289 GitHub stars~1.6k tokensUpdated 25 days ago
    Auto-check passed
  • Code To Spec

    smallnest/goal-workflow

    Reverse-engineer a SPEC document from an existing project. An agent skill from smallnest/goal-workflow.

    289 GitHub stars~2.7k tokensUpdated 25 days ago
    Auto-check passed
  • Design It

    smallnest/goal-workflow

    A skill your agent uses when turning a requirement, spec, or feature brief into a single self-contained HTML design document in a fixed house style — one styled HTML page with a table-of-contents…

    289 GitHub stars~1.1k tokensUpdated 25 days ago
    Auto-check passed

Questions about Understand

What does Understand do?

Review and understand freshly AI-generated code. An agent skill from smallnest/goal-workflow. Understand is an agent skill from smallnest/goal-workflow. Review and understand freshly AI-generated code.

When should I use Understand?

Understand fits situations like: tasks that involve Technical documentation; tasks that involve Plain language and style rules.

How do I install Understand in Claude Code?

Run `npx skills add smallnest/goal-workflow --skill understand -a claude-code`. Or copy the skill folder (skills/understand in smallnest/goal-workflow) into .claude/skills/understand in your project. Claude Code loads it when a task matches its description.

How do I install Understand in Codex?

Run `npx skills add smallnest/goal-workflow --skill understand -a codex`. Or copy the skill folder (skills/understand in smallnest/goal-workflow) into .agents/skills/understand in your project. Codex loads it when a task matches its description.

Can I use Understand in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add smallnest/goal-workflow --skill understand -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/understand, .gemini/skills/understand, .github/skills/understand and .opencode/skills/understand in your project.

What does Understand need to run?

Going by SKILL.md and its folder, Understand needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and git). Our summary lists: Python 3.

Does Understand access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Understand safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Understand use?

Understand is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Understand use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Understand?

Skills that share tags, products or a category with Understand: Agent Style (pchalasani/claude-code-tools, 2k stars), Content Model (guardana/guardana, 129 stars), Tabler Docs Writer (tabler/tabler, 42k stars) and Writing Guidelines (rohitg00/pro-workflow, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Understand?

smallnest (a GitHub user) maintains it in smallnest/goal-workflow, which has 289 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on September 13, 2026.

Source: smallnest/goal-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.