cap-understand

cap-understand is a skill for Claude Code from RainFlashPoint/capital-agent-skills. It costs 239 tokens per session (5,393 once invoked), scanned A, original, MIT.

A read-only project-mapping step for an existing codebase. It records the project's technology, conventions, entry points, risks, modules, and checks in a `.cap/PROFILE.md` file.

In plain words
What is it for?
Use it to scan an existing repository, document how its parts are organized, detect deployment details, and prepare reliable routes for future code changes.
Why use it?
It gives later coding tasks a shared, traceable map of unfamiliar code. It also separates basic investigation from making changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **全程契约**:开始实质工作前读取并执行 `../cap-flow/references/progress-protocol.md` 与 `../cap-flow/references/task-reconnaissance.md`。先播报当前动作和下一步;新任务没有新鲜 `.cap/task-context.md`.

Part of the capital-agent-skills plugin — 10 skills shipped together

Good fit Use it to scan an existing repository, document how its parts are organized, detect deployment details, and prepare reliable routes for future code changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/RainFlashPoint/capital-agent-skills
agentmods
npx agentmods add skills/rainflashpoint/capital-agent-skills/cap-understand

Made for: Claude Code.

Or install capital-agent-skills, the plugin that ships this one along with the rest of its 10 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 cap-understand

README.md
[![agentmods](https://agentmods.dev/badge/skills/rainflashpoint/capital-agent-skills/cap-understand.svg)](https://agentmods.dev/skills/rainflashpoint/capital-agent-skills/cap-understand)
Your own site
<a href="https://agentmods.dev/skills/rainflashpoint/capital-agent-skills/cap-understand"><img src="https://agentmods.dev/badge/skills/rainflashpoint/capital-agent-skills/cap-understand.svg" alt="Measured on agentmods" height="20"></a>
Per session 239 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,393 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.
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.00239 $0.05393
Opus 5 $0.00120 $0.02697
Sonnet 5 $0.00048 $0.01079
Haiku 4.5 $0.00024 $0.00539

Measured 8d ago against content hash 8779be829b6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

cap-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 8d ago.

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/cap-understand/SKILL.md · 259 lines

How it starts

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

cap-understand — brownfield 入口:测绘已有项目 → PROFILE.md

全程契约:开始实质工作前读取并执行 ../cap-flow/references/progress-protocol.md../cap-flow/references/task-reconnaissance.md。先播报当前动作和下一步;新任务没有新鲜 .cap/task-context.md 时,先调查当前仓库代码,不能只依赖 PROFILE。

你是主线的测绘师。一个已有项目第一次走这套流程时,cap-flow 先把你叫进来。你的唯一交付物是 <target-repo>/.cap/PROFILE.md —— 项目级、长寿、被之后每个特性共享的记忆。其中最关键的是 surface-map(模块 → glob → 默认角色 → 验证项),它是改动代码路由的可追踪输入。

定位:PROFILE = 项目级、建一次、共享;STATE = 特性级、短寿、每任务交接。本阶段只写 PROFILE,不碰 STATE只读纪律:测绘期间只读源码、只陈述代码里能查证的事实,不改代码、不提改进建议、不臆测意图。唯一写动作 = 结尾写 .cap/PROFILE.md。改进是后续特性的事,不在测绘阶段做。


可移植约定

共享 references 的位置:本文提到的 role-routing.mdroles/<role>.mdtemplates/*.md 物理上都在 cap-flow 编排器目录下(cap-flow/references/),不在本阶段目录里。解析路径一律指向 cap-flow/references/... (相对 skills 根),或经软链接定位——别当作相对本目录去读。验证项 playbook 则在 cap-test/checks/

  • 交互:凡需用户拿主意(确认技术栈推断、确认 surface-map 草案、确认新建还是刷新),用纯文本编号列表。
  • 并行:采证阶段可拆成 4 个正交视角(stack / arch / conventions / concerns)。有并行能力就 fan-out,各自把发现 写进各自的临时笔记(.cap/map-notes/<focus>.md),最后聚合成单一 PROFILE.md;没有就串行逐视角跑同一份清单。 产物永远是单一聚合的 PROFILE.md,并行只是加速采证,不改变交付形态。

1. 入口条件

进入本阶段应满足(cap-flow 判定,独立调用时自检):

条件 要确认的事
repo 非空(有真实代码) 目录里有源码文件。别只信 git ls-files——目标可能是未跟踪子目录或刚克隆未 init,只看跟踪文件会误判空仓;拿不准就直接列文件。
尚无 PROFILE.md,或用户要求刷新 <repo>/.cap/PROFILE.md 不存在;或架构漂移触发(见 §6)

两种入口模式:

  • 新建(无 PROFILE)→ 走完整 Phase A→D。
  • 刷新(PROFILE 已在,漂移触发)→ 只重跑受影响视角 + 重算 surface-map 相关行,保留 Conventions / Known-risks 里仍成立的条目(追加 / 收紧,不盲删)。

入口先用编号文本报告并确认:

.cap/PROFILE.md: <无 / 已存在>
repo: 非空(检测到 <N> 个被跟踪文件)
→ 模式:<新建 / 刷新(架构漂移:<触发面>)>
  1) 按上述模式开始(推荐)
  2) 改为只跑一次现状审计(交回 cap-flow: cap-test --check=journey --scope=full-chain)
回个编号。

2. 步骤流程(四阶段管道)

Phase A 采证(纯 bash) → Phase B 类型+入口识别 → Phase C 自建 surface-map → Phase D 聚合写 PROFILE.md

Phase A — 采证(先把证据收齐,再下判断)

目标:在归类型、建 surface-map 之前先收齐客观证据——靠仓库里查得到的事实,不靠印象。怎么采你定 (grep / find / wc / git 这类只读工具);本阶段只约束采什么避哪些坑

Read the full file on GitHub · 259 lines

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. 8d ago First seen · 259 lines · 239 tokens per session scan A 8779be829b6d

Subscribe to this mod's changes

cap-understand is a skill published in the GitHub repository RainFlashPoint/capital-agent-skills (2 stars, last pushed 4d ago), licensed MIT. It adds 239 tokens to every session and 5,393 once invoked, about $0.0012 per session on Opus 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens