writing-skills
できること
このスキルは、AIエージェントのためのスキルを、ゼロから作成または編集し、頼る前に動くことを確認する方法を説明します。エージェントのスキルを作ったり改善したりする人のためのものです。
使う場面
- ✓エージェントのための新しいスキルを、ゼロから作りたいとき。
- ✓既存のスキルを編集し、それがまだ動くことを確認したいとき。
- ✓デプロイする前に、スキルが動くことを確認したいとき。
スキルのリンク
https://github.com/obra/superpowers/blob/main/skills/writing-skills/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“AIアシスタントのための新しいスキルを書きたいのですが、それが本当に動くかを確認したいです。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、各スキルをテストのように扱います。まずスキルなしでタスクが失敗するのを見て、次にスキルを書き、それからエージェントがそれに従うことを確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Writing Skills
Overview
Writing skills IS Test-Driven Development applied to process documentation.
Personal skills live in your runtime's skills directory (~/.claude/skills/ on Claude Code) — see codex-tools.md or gemini-tools.md for the path on those runtimes. Codex, Copilot CLI, and Gemini CLI all also recognize ~/.agents/skills/ as a cross-runtime alias.
You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
REQUIRED BACKGROUND: You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
Official guidance: For Anthropic's official skill authoring best practices, see references/anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.
What is a Skill?
A skill is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches.
Skills are: Reusable techniques, patterns, tools, reference guides
Skills are NOT: Narratives about how you solved a problem once
TDD Mapping for Skills
| TDD Concept | Skill Creation |
|---|---|
| Test case | Pressure scenario with subagent |
| Production code | Skill document (SKILL.md) |
| Test fails (RED) | Agent violates rule without skill (baseline) |
| Test passes (GREEN) | Agent complies with skill present |
| Refactor | Close loopholes while maintaining compliance |
| Write test first | Run baseline scenario BEFORE writing skill |
| Watch it fail | Document exact rationalizations agent uses |
| Minimal code | Write skill addressing those specific violations |
| Watch it pass | Verify agent now complies |
| Refactor cycle | Find new rationalizations → plug → re-verify |
The entire skill creation process follows RED-GREEN-REFACTOR.
When to Create a Skill
Create when:
- Technique wasn't intuitively obvious to you
- You'd reference this again across projects
- Pattern applies broadly (not project-specific)
- Others would benefit
Don't create for:
- One-off solutions
- Standard practices well-documented elsewhere
- Project-specific conventions (put in your instructions file)
- Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)
Skill Types
Technique
Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
Pattern
Way of thinking about problems (flatten-with-flags, test-invariants)
Reference
API docs, syntax guides, tool documentation (office docs)
Directory Structure
skills/
skill-name/
SKILL.md # Main reference (required)
supporting-file.* # Only if needed
Flat namespace - all skills in one searchable namespace
Separate files for:
- Heavy reference (100+ lines) - API docs, comprehensive syntax
- Reusable tools - Scripts, utilities, templates
Keep inline:
- Principles and concepts
- Code patterns (< 50 lines)
- Everything else
Writing SKILL.md
A skill's description says only when to use it: triggering conditions and
symptoms, starting with "Use when...". It never summarizes the skill's
workflow, because an agent that reads a workflow summary follows it instead
of reading the skill.
When you write or change a skill's frontmatter, name or description, or need to cut its size, read references/discovery.md: the SKILL.md template, description and keyword guidance, naming, token budgets, and cross-referencing other skills.
Flowcharts
When you add or change a flowchart in a skill, read references/flowcharts.md first: when a flowchart earns its place, the graphviz conventions, and how to render one.
Code Examples
One excellent example beats many mediocre ones
Choose most relevant language:
- Testing techniques → TypeScript/JavaScript
- System debugging → Shell/Python
- Data processing → Python
よくある質問
このスキルを使うのにプログラミングの知識が必要ですか?
必ずしも必要ではありません。スキルは平易な文章による指示なので、明確な手順を書ける人向けに書かれています。
スキルのテスト方法も説明していますか?
はい。完了前に、スキルありとなしでエージェントを実行し、結果を比べるよう求めています。
個人用のスキルはどこに保存すべきですか?
個人用のスキルは、Claude Codeの設定の下にあるskillsフォルダなど、ランタイムのスキルフォルダに置くべきだとされています。
詳細
作者による元の説明
Use when creating new skills, editing existing skills, or verifying skills work before deployment
repo: obra/superpowers
人気
- GitHubのスター
- 311k
- ランキング
- #99
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
brainstorming
311k新しいものを作る前に、焦点を絞った質問をし、明確な選択肢を示して、本当に求めているものを見つけるようエージェントを支援します。
executing-plans
311k書かれた実装計画を、現在のセッションの中で段階的に実行し、次に進む前に各ステップをテストするようエージェントを支援します。
finishing-a-development-branch
311k完成したコードを、テストを実行してから、マージ、プルリクエストの作成、またはブランチの保持という明確な選択肢を示すことで仕上げるようエージェントを支援します。
receiving-code-review
311kコードレビューのフィードバックを慎重に検討し、変更を加える前に、各指摘がコードに照らして正しいかを確認するようエージェントを支援します。
似ているスキル
writing-for-agents
310kスキル、AGENTS.md、CLAUDE.mdを含め、AIエージェントのための明確な指示の書き方を説明し、エージェントが予測可能に動くようにします。
bengali-nlp
280kエージェントがベンガル語のテキストを処理できるようにします。テキストの正規化など、ベンガル語特有の性質に対応しながら、言語を理解して扱えるようにします。
prompt-caching-strategy
280kエージェントが言語モデル向けのプロンプトを最適化するのに役立ちます。プロンプトの構成を分析し、情報を再利用することでコストを抑え、応答を速くします。