本文へ移動
cccskills
無料GitHub で公開日本語紹介

writing-for-agents

AIエージェントが読むスキルや指示文を、手順・参照情報・完了条件に整理し、必要な資料を読む条件の明確化や重複の削減まで支援する文書作成・編集のスキル。

原文原文の説明を見る

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

インストール方法を見る

こんなときに便利

  • スキル文書を作成・編集したいとき
  • AGENTS.mdやCLAUDE.mdの整理
  • 参照資料を読む条件を明確にしたいとき
  • エージェントの作業完了条件の設計

日本語での紹介

できること

AIエージェントが読む文書の構成や表現を整えるための指針を提供します。スキル、AGENTS.md、CLAUDE.md、そこから参照する資料が対象です。実行する手順と必要時に読む参考情報を分け、作業の完了条件を確認可能な形にします。別資料への参照には、何が書かれているかと、どの場面で読むかを明示します。

こんなときに便利

スキルを新しく作るときや、長くなった指示文を見直すときに向いています。同じ内容が複数箇所にある、必要な資料が読まれない、作業が早く切り上げられるといった問題を、文書の構成から検討できます。設定ファイルを見れば分かる情報と、文書に残すべき慣習や理由の区別も扱います。

使い方の例

  • 「この SKILL.md の手順と参考情報を整理して」
  • 「AGENTS.md の重複を減らし、参照資料を読む条件を明確にして」
  • 「各手順の完了条件を、確認できる表現に書き直して」

注意点

スキルを書く場合は、付属の SKILL-MECHANICS.md を参照する構成です。文書の分割や短縮は一律に行う方針ではなく、必要な情報へのアクセスと、利用者が文書を管理する負担を踏まえて判断します。

この紹介文は、公開されている SKILL.md をもとに AI(Claude Haiku)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(3)

  • SKILL.md10.6 KB
  • agents/openai.yaml102 B
  • SKILL-MECHANICS.md2.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Reference for writing any document an agent consumes: a skill, an AGENTS.md / CLAUDE.md, a doc reached by a pointer. The packaging differs; the writing does not: the same levers make each one predictable, since the agent takes the same process every run rather than producing the same output.

When the document you're writing is a skill, read SKILL-MECHANICS.md for frontmatter, invocation choice, and router skills.

Context pointers

A context pointer is a reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. A skill's description is one; a line in AGENTS.md naming a doc is the same object. The pointer's wording, not its target, decides when the agent reaches the material, and how reliably. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.

A pointer does two jobs: state what the material is, and list the branches that should trigger reaching it (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:

  • Front-load the leading word: the pointer is where it does its triggering work.
  • One trigger per branch. Synonyms that rename a single branch are one branch written twice; collapse them and keep only genuinely distinct branches.
  • Cut identity the body already carries.

The two loads

Every document and pointer you add spends one of two budgets:

  • Context load is the cost of always-loaded material on the agent's window: an AGENTS.md line, a skill description, anything sitting in context every turn, spending tokens and attention whether or not it fires.
  • Cognitive load is the cost on the human: which documents exist and when to reach for each. The human is the index. Not a cost to minimise: it is the price of human agency; spend it where human judgement matters, remove it where it does not.

Material reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.

Information hierarchy

A document is built from two content types: steps (the ordered actions the agent performs) and reference (definitions, rules, facts consulted on demand). The two mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the information hierarchy, a ladder ranked by how immediately the agent needs the material:

  1. In-file step is the primary tier: what the agent does, in order.
  2. In-file reference is consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung), which is a fine arrangement, not a smell.
  3. Disclosed reference is pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.

Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.

Progressive disclosure is the move down the ladder (out of the main file and behind a pointer) so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip: a variance lever, not just a legibility one.

Co-location is the within-file companion: where the ladder decides how far down a piece sits, co-location decides what sits beside it once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent. Grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)

Sprawl is the failure mode here: a document simply too long, even when every line is live and unique. Attention thins across the excess, and every extra line is one more to keep relevant. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.

Steps and completion criteria

Every step ends on a completion criterion, the condition that tells the agent the work is done. Two properties make it a lever:

  • Clarity: can the agent tell done from not-done? A vague bound ("understanding reached") invites premature completion: ending the step before it is genuinely done, attention slipping to being done. The visible steps still ahead (the post-completion steps) supply the pull; the criterion's clarity is the resistance. Defend in order: sharpen the bound first (local and cheap); only if it is irreducibly fuzzy and you observe the rush, hide the later steps by splitting the sequence. Hiding only works across a real context boundary (a hand-off or a subagent dispatch; an inline call leaves the later steps in context and clears nothing).
  • Demand: how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not. Demand drives legwork (the digging the agent does within the work, latent in the wording rather than written as its own step), and it is not step-bound: "every rule applied" binds a body of flat reference just as "every step done" binds a sequence, which is how an all-reference document still carries an exhaustiveness bar.

The strongest criteria are both checkable and exhaustive.

When to split

Splitting one document into two spends one of the two loads, so split only when the cut earns it:

  • By sequence: split a run of steps where the post-completion steps tempt the agent to rush the one in front of it. Keeping them out of view drives more legwork on the current task. Beware the reverse: merging sequences exposes each step's later steps to what follows, inviting premature completion.
  • By invocation, skill-specific: see SKILL-MECHANICS.md.

Leading words

A leading word is a compact concept already living in the model's pretraining that the agent thinks with while running the document (lesson, fog of war, tracer bullets). Repeated as a token, never as a sentence, it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds. Coining your own works if you define it clearly, but a made-up word recruits no priors: you pay in definition tokens what a pretrained word gives free; reach for an existing word first.

It anchors twice. In the body, execution: the agent reaches for the same behaviour every time the word appears, and inside flat reference it focuses attention on a class of thing to look for. In a pointer, invocation: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the material and reaches it more reliably.

Hunt for opportunities to refactor with leading words. A triad spelled out at three sites, a pointer spending a sentence to gesture at one idea. Each is a passage begging to collapse into a single token:

  • "fast, deterministic, low-overhead" → tight (a tight loop).
  • "a loop you believe in" → red, turning a fuzzy gate into a binary observable state (the loop goes red on the bug, or it doesn't).

You win twice: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every document is carrying restatements that leading words retire. Go find them.

Negation is the failure mode beside this lever: steering by prohibition drags the forbidden behaviour into context and makes it more available, not less. Don't think of an elephant, and the elephant is all there is; the negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Prompt the positive: state the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.

Pruning

  • Keep each meaning in a single source of truth: one authoritative place, so changing the behaviour is a one-place edit. Duplication (the same meaning in more than one place) costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank. (The accidental inverse of a leading word, which repeats a token on purpose, never the meaning.)
  • The environment is a source of truth too (package.json scripts, config files, the directory layout, --help output), and a document that restates it is a cache: a copy of a lookup, earning its load only when the lookup is expensive. Cache what the agent cannot find by looking: the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave the one-file, one-command lookups to the environment, where they cannot go stale.
  • Check every line for relevance: does it still bear on what the document does? A line loses relevance by never bearing on the task (mere exposition, or a branch that should be disclosed) or by going stale as the behaviour or world it describes changes. Shorter documents are easier to keep relevant. Without a pruning discipline the default fate is sediment: stale layers that settle because adding feels safe and removing feels risky, until you must core down through them to find what is still live.
  • Hunt no-ops sentence by sentence: an instruction the model already obeys by default pays load to say nothing. The test (does it change behaviour versus the default?) is model-relative, not reader-relative: two people disagreeing about a no-op disagree about the default, and settle it by running the document, not by debate. When a sentence fails, delete the whole sentence rather than trim words from it. The test also grades leading words: a word too weak to beat the default (be thorough when the agent is already thorough-ish) is a no-op, and the fix is a stronger word (relentless), not a different technique.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

ask-matt

無料日本語概要

アイデアの整理、実装、不具合調査など、状況に合う関連スキルと使う順序を案内します。作業の規模や段階に応じて、次に進む手順を選ぶための相談役です。

  • アイデアから実装までの手順選び
  • 不具合調査の始め方を知りたいとき
  • 複数回に分ける開発の進め方を相談
mattpocock/skills28.8万2026年10月12日 更新

chief-of-staff

無料日本語概要

長期的な目標に向けて複数のサブエージェントの作業を調整し、利用者との対話を続けながら、次の仕事にも役立つ作業環境や規約の改善を進めるスキル。

  • 長期目標に向けて担当を調整したいとき
  • 裏で作業を進めながら対話を続けたいとき
  • 共通の規約や作業環境を改善したいとき
mattpocock/skills28.8万2026年10月12日 更新

claude-handoff

無料日本語概要

進行中の会話を引き継ぎ用に要約し、新しいバックグラウンドエージェントへ渡します。次の作業方針や参照資料を整理して、現在の作業場所で続きを始めます。

  • 新しいエージェントに続きを任せたいとき
  • 次の作業範囲を絞って引き継ぎたいとき
  • 次のセッション用に参照資料を整理
mattpocock/skills28.8万2026年10月12日 更新

code-review

無料日本語概要

指定したコミットやブランチなどを基準にコードの変更を確認し、開発規約への適合と仕様の実現を別々にレビューします。二つの観点の指摘を分けて報告するスキルです。

  • ブランチやPRの変更レビュー
  • 指定コミットやタグ以降の確認
  • 文書化された開発規約との照合
mattpocock/skills28.8万2026年10月12日 更新

codebase-design

無料日本語概要

呼び出し側が覚える使い方を小さく保ち、複雑な処理を内部にまとめる設計を支援します。共通の用語と判断基準で、モジュールの使いやすさやテストのしやすさを検討するスキルです。

  • モジュールの使い方を簡単にしたいとき
  • 散らばった複雑な処理をまとめたいとき
  • 実装を差し替える場所の検討
mattpocock/skills28.8万2026年10月12日 更新

diagnosing-bugs

無料日本語概要

再現しにくい不具合や処理速度の悪化を、症状を判定するテストやスクリプトで調べます。原因候補の検証から修正、再発防止の確認まで進めるスキル。

  • 再現しにくいエラーを調べたいとき
  • 処理が遅くなった原因の調査
  • 断続的な不具合を繰り返し検証
mattpocock/skills28.8万2026年10月12日 更新

mattpocock のスキルをすべて見る

このスキルの問題を報告する