Skip to content
Skill

writing-skills

by obra

AI Summary

A TDD-based framework for creating and validating AI agent skills through test-driven documentation and pressure testing. Developers building Claude Code agents or multi-agent systems benefit from this systematic approach to skill development and deployment.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to install the "writing-skills" skill in my project.

Please run this command in my terminal:
# Install skill into your project (7 files)
mkdir -p .claude/skills/writing-skills && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/writing-skills/SKILL.md "https://raw.githubusercontent.com/obra/superpowers/main/skills/writing-skills/SKILL.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/writing-skills/anthropic-best-practices.md "https://raw.githubusercontent.com/obra/superpowers/main/skills/writing-skills/anthropic-best-practices.md" && mkdir -p .claude/skills/writing-skills/examples && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/writing-skills/examples/CLAUDE_MD_TESTING.md "https://raw.githubusercontent.com/obra/superpowers/main/skills/writing-skills/examples/CLAUDE_MD_TESTING.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/writing-skills/graphviz-conventions.dot "https://raw.githubusercontent.com/obra/superpowers/main/skills/writing-skills/graphviz-conventions.dot" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/writing-skills/persuasion-principles.md "https://raw.githubusercontent.com/obra/superpowers/main/skills/writing-skills/persuasion-principles.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/writing-skills/render-graphs.js "https://raw.githubusercontent.com/obra/superpowers/main/skills/writing-skills/render-graphs.js" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/writing-skills/testing-skills-with-subagents.md "https://raw.githubusercontent.com/obra/superpowers/main/skills/writing-skills/testing-skills-with-subagents.md"

Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.

Description

Use when creating new skills, editing existing skills, or verifying skills work before deployment

Overview

Writing skills IS Test-Driven Development applied to process documentation. Personal skills live in agent-specific directories (~/.claude/skills for Claude Code, ~/.agents/skills/ for Codex) 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 anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.

Overview

What is this? Core principle in 1-2 sentences.

What is a Skill?

A skill is a reference guide for proven techniques, patterns, or tools. Skills help future Claude instances 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.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 13d ago
Active
Adoption1K+ stars on GitHub
162.8k ★ · Popular
DocsREADME + description
Well-documented

GitHub Signals

Stars162.8k
Forks14.2k
Issues306
Updated13d ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code