cap-define

cap-define is a skill for Claude Code from RainFlashPoint/capital-agent-skills. It costs 208 tokens per session (8,454 once invoked), scanned A, original, MIT.

A requirements-design workflow that turns an unclear software idea into an approved specification file. It asks for decisions about scope and behavior before implementation begins.

In plain words
What is it for?
Use it to define a feature, clarify what is included and excluded, set acceptance criteria, create spec.md, and prepare a requirement for task planning.
Why use it?
It prevents coding from starting while important requirements are still ambiguous. This can reduce rework and gives later planning a clear document to follow.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is 入口先执行 `../cap/SKILL.md` 的“研发上下文门禁”:`.cap` 检查不可跳过,知识库注入失败可记录后离线继续。.

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

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add RainFlashPoint/capital-agent-skills
Claude Code
/plugin install capital-agent-skills

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-define

README.md
[![agentmods](https://agentmods.dev/badge/skills/rainflashpoint/capital-agent-skills/cap-define.svg)](https://agentmods.dev/skills/rainflashpoint/capital-agent-skills/cap-define)
Your own site
<a href="https://agentmods.dev/skills/rainflashpoint/capital-agent-skills/cap-define"><img src="https://agentmods.dev/badge/skills/rainflashpoint/capital-agent-skills/cap-define.svg" alt="Measured on agentmods" height="20"></a>
Per session 208 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,454 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00208 $0.08454
Opus 5 $0.00104 $0.04227
Sonnet 5 $0.00042 $0.01691
Haiku 4.5 $0.00021 $0.00845

Measured 2d ago against content hash 27d1c082d63c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

cap-define 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 2d 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-define/SKILL.md · 464 lines

How it starts

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

cap-define — 收敛阶段:模糊点子 → 获批规格

入口先执行 ../cap/SKILL.md 的“研发上下文门禁”:.cap 检查不可跳过,知识库注入失败可记录后离线继续。

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

把"想做点什么"变成一份获批的、无歧义、能被 cap-plan 直接吃进去的规格。

铁律(HARD-GATE):spec 拿到用户批准之前,不写任何实现代码、不搭脚手架、不调任何实现类阶段。 需求看起来越简单越危险——"简单"往往是没被检视的假设,返工最多都出在这。规格可以很短(简单需求几句话), 但必须呈现并获批

本阶段是 cap-flow 派来的收敛器:知识与状态都是纯文件,引擎 = 一个能 Read/Edit/Bash/Grep 的模型。 唯一的终态 = 产出获批 spec.md + 把交接写回 STATE,由 cap-flow 路由到 cap-plan


0. 可移植前置(每次入口先做)

共享 references 的位置:本文引用的 role-routing.mddivergence-frames.mdroles/<role>.mdweb-review/playbook.md 物理上都在编排器目录 cap-flow/references/ 下,不在本阶段目录里。解析路径一律 指向 cap-flow/references/...(相对 skills 根)或经软链接定位,别当相对本目录读。

本阶段要在 Claude 和 Codex 上都能跑。两条降级范式贯穿始终:

0.1 交互降级 —— 纯文本编号选项(默认)

凡向用户提问(澄清、选方案、确认范围、过门),默认用纯文本编号列表,不硬依赖任何富交互控件:

需要你定一个点:
  1) 选项 A —— 说明 / 取舍
  2) 选项 B —— 说明 / 取舍
  3) 其它(你来描述)
回个编号即可(或直接补充文字)。

宿主有结构化提问控件可以用,但回退路径永远是上面这种编号文本。若用户选"其它"又没填内容 → 输出一行 "你想补充什么?" 然后停下等,别重问、别自答。

0.2 并行降级 —— 能并行就并行,不能就串行

本阶段的外部研究(§3 可选)若要多源调研:探测宿主有无并行能力——有 → fan-out 子调研,各写各的临时 笔记;无 → 串行 inline 跑同一份 playbook。任何时候不得两个写手同写 STATE.md / spec.md(单写者)。


1. 入口条件

进入本阶段应满足(cap-flow 保证;独立调用时自检):

条件 要确认的事
<target-repo>/.cap/PROFILE.md,或确认是 greenfield 有 PROFILE 即可;brownfield 缺 PROFILE 应先 cap-understand
STATE.stageshape,或这是一个全新特性的开始 .cap/STATE.md;无 STATE = 新特性,本阶段初始化一份
手头有一个待澄清的"点子 / 需求 / 变更意图" 来自用户原话

入口动作:先看一眼 <target-repo>/.cap/ 有没有 PROFILE / STATE / 既有 spec,再:

  • PROFILE.md → 拿技术栈、约定、surface-map(模块 / glob / 默认角色 / 验证项),当 Explore 的地图。
  • STATE.md(若有)→ 看 Decisions log 里有没有相关旧决策,别重复问已定的事

1.0 入口先做:改动面 → 角色 + 验证项 预解析

即便本阶段还没真动代码,也要先定本特性"打算动哪块 surface",因为它决定:

  • 要不要在 spec 里前置 eval 契约(动 AI / 模型 / 策略 → 必须,见 §5);
  • 后续 build / verify / review 会装哪些角色卡、跑哪些验证项。

Read the full file on GitHub · 464 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. 2d ago Changed · +2 lines 27d1c082d63c
  2. 5d ago First seen · 462 lines · 208 tokens per session scan A 192bb303aff9

Subscribe to this mod's changes

cap-define is a skill published in the GitHub repository RainFlashPoint/capital-agent-skills (2 stars, last pushed yesterday), licensed MIT. It adds 208 tokens to every session and 8,454 once invoked, about $0.0010 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

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

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 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