xp-harness: Skill for Claude Code

.apm/skills/define-requirements/SKILL.md

define-requirements is a skill for Claude Code, Codex from sei-newbear/xp-harness. It costs 229 tokens per session (6,913 once invoked), scanned A, original, MIT.

A requirements-definition step used before designing or building a requested change. It clarifies the underlying reason, desired outcome, boundaries, and affected parts of the project.

In plain words
What is it for?
Use it for new features, changes, removals, improvements, and review feedback. It helps agree whether to discuss the request together or let the agent proceed independently before making consequential changes.
Why use it?
It prevents an agent from implementing the request literally when the stated solution may not address the real problem. It also reduces rework caused by unclear goals or mixed requests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; names the AskUserQuestion tool.

This is sei-newbear/xp-harness's own configuration. It tells Claude Code and Codex how to work on xp-harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything xp-harness configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sei-newbear/xp-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sei-newbear/xp-harness/main/.apm/skills/define-requirements/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sei-newbear/xp-harness

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/sei-newbear/xp-harness/define-requirements.svg)](https://agentmods.dev/skills/sei-newbear/xp-harness/define-requirements)
Your own site
<a href="https://agentmods.dev/skills/sei-newbear/xp-harness/define-requirements"><img src="https://agentmods.dev/badge/skills/sei-newbear/xp-harness/define-requirements.svg" alt="Measured on agentmods" height="20"></a>
Per session 229 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,913 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.00229 $0.06913
Opus 5 $0.00114 $0.03456
Sonnet 5 $0.00046 $0.01383
Haiku 4.5 $0.00023 $0.00691

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

Security

Grade A, and why

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

.apm/skills/define-requirements/SKILL.md · 305 lines

How it starts

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

要件定義フェーズ

なぜこの skill があるか

実装に入る前に「何を、誰のために、なぜ作るか」を固めないと、エンドユーザーに価値が届かない設計が通る。依頼者は依頼者であってエンドユーザーではない。プロのエンジニアとして、依頼者の言葉の裏にある真の課題を引き出すのがこのフェーズの責務。

依頼者のインテント(真の意図)を読み取る

依頼者の発言の表面(「○○を作って」「○○を消して」「○○を確認して」)の裏にあるインテントを読み取る。なぜそれが必要か、誰のためか、何が真の課題か。表面的な依頼に縛られず、Why から最善の一手を考える。

依頼が md ファイル(review / TODO / 改善要望リスト)にまとまっていても同じ。md に書かれているのは「依頼者の表面的な要望」であって、その裏のインテントを読み取り対話で引き出す。「やることが具体的だから skip」と判断しない — 具体的な解決策の裏に真の課題があり、別の解決策の方が良いかもしれない。

モードを合意してから帰結ある行動に入る ★最初に通す

発火したら、いきなり Why 掘りや下の 5 セクションの要件定義に入らない。まず「今どのモードにいるか」を意識する。モードは 3 つ:

  • モード未確定: 依頼を受けた直後 / 調査中。まだどちらのモードか決まっていない
  • 対話モード: 決めに行かず、確認しながら認識を揃える(このスキルの通常フロー)
  • 自走モード: ゴールが明確で「任せる」とき。決めて進め、終わってから共有する

守りたいのは「合意なしで帰結ある行動に滑り込むこと」の一点

ゲートは 1 つだけ。設計・実装・変更という帰結ある行動(=やり直しにコストがかかる動き)に入る手前で、どのモードで進めるかを依頼者と合意する。これ以外はゲートで止めない。特に次の非破壊な動きは、モード未確定でも止めない:

  • 調査(読む・探る・理解を作る、戻せる動き): そのまま進めてよい。調査は「どちらのモードでいくか」を決めるための情報集めだから。ただし調査が終わって帰結ある行動に入る手前で、必ずモード合意に戻る(調査は実装への抜け道ではない)
  • 議論・要件対話(依頼者と認識を揃える動き): 依頼者がいきなり議論を始めたら、それは既に対話モードそのもの。止める対象ではない(むしろ望ましい)。その場で dialogue-principles skill を呼んでから議論に応じる

モード合意 ← ここがゲート

帰結ある行動に入る手前で、AskUserQuestion で「対話モードで深掘る / 自走モードで進める」を出し、自分の見立てを推奨に置く。勝手にどちらかのモードに入らない(重いから一人でゴールを決めて設計・実装まで進める、調査したからそのまま実装に直行する、はどちらも「合意なしで帰結ある行動に滑り込む」)。止めたいのは 自分が勝手に帰結ある行動へ突入すること であって、深掘り(Why 掘り)や調査そのものではない — それらはむしろ進めてよい(重いタスクほど深掘る価値がある)。見立ての目安:

  • 対話モードを推奨: 依頼が特定の手段・解決策を指していて、その裏の Why 次第では別のやり方の方が良いかもしれないとき。「○○を表示して」「○○を追加して」のような解決策の指定は、それ自体が深掘る理由になりうる(手段が明確なだけで、真の課題への最善とは限らない — 下の代案提案の例を参照)
  • 自走モードを推奨: 純粋作業(タブ削除・typo 的な文言修正・整形)/ゴールが明確で手段はお任せ(「任せる」「やり方は問わない」)/掘っても手段が変わらなそう、のとき

見立ては当てにいくものではなく外すことがある(機械的に見分けるのは難しい)。だから独断で決めず、見立てを述べて依頼者に確認する — この確認が見立てのブレを受け止める安全網。依頼者は自分の意図(探ってほしいのか、任せて進めてほしいのか)を分かっているので選べる。迷ったら対話モード側を推奨に置く(「簡単そうで難しい/指定された手段が最善でない」を取りこぼさないため)。

モードが決まったら

  • 自走モードで合意 → 「何をするか」「どうなったら完了か」の最小限だけ口頭で揃え、basic-design skill を挟まず slice-tdd skill での実装にそのまま渡す(最小合意を口頭で持って渡す)。要件定義.md は作らない。この時点で終わり — 下の「やること」以降のセクションは実行しない
  • 対話モードで合意dialogue-principles skill を呼んでから、下の通常フローに進む(Why を掘り要件を固める)。対話モードで進めると決めた時点が、対話の規律を効かせ始める地点

Read the full file on GitHub · 305 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 · 305 lines · 229 tokens per session scan A 98227f71f0f7

Subscribe to this mod's changes

define-requirements is a skill published in the GitHub repository sei-newbear/xp-harness (9 stars, last pushed 1mo ago), licensed MIT. It adds 229 tokens to every session and 6,913 once invoked, about $0.0011 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