writing-skills

Create and test agent skills using test-driven development with subagent pressure scenarios.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/fred-meng/harness --skill writing-skills-fred-meng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-skills
Source: https://github.com/fred-meng/harness/tree/main/.github/skills/writing-skills
Command: npx skills add https://github.com/fred-meng/harness --skill writing-skills-fred-meng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires graphviz.

What problem does it solve? Untested skill documentation often fails in practice because agents rationalize around rules under time, sunk-cost, or authority pressure, and authors cannot know whether a skill actually changes agent behavior without observing baseline failures first. ## Core Features & Use Cases - TDD-based skill authoring: Applies the RED-GREEN-REFACTOR cycle to documentation by running baseline pressure scenarios with subagents, writing minimal skills that address observed failures, and closing rationalization loopholes iteratively. - Discovery optimization (CSO): Provides rules for writing trigger-focused descriptions, keyword coverage, naming conventions, and token-efficient skill structure so agents can find and load the right skill. - Testing methodology references: Includes guidance on pressure scenario design, rationalization tables, persuasion principles, and Anthropic's official authoring best practices. - Use Case: Before deploying a new discipline-enforcing skill like a TDD requirement, run combined-pressure scenarios (time + sunk cost + exhaustion) against subagents without the skill, capture verbatim rationalizations, then write and refactor the skill until agents comply under maximum pressure. ## Quick Start Ask the agent to create a new skill for a recurring technique, first running baseline pressure scenarios with subagents and then writing the SKILL.md following the RED-GREEN-REFACTOR checklist.

Frequently Asked Questions about writing-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a SKILL.md file for an AI agent?

Start with YAML frontmatter containing a name and a third-person description beginning with "Use when..." plus specific triggers. Then add an overview, when-to-use symptoms, core patterns, quick reference, and common mistakes, keeping the body concise.

How do I test whether an agent skill actually works?

Run pressure scenarios with subagents before writing the skill to capture baseline failures verbatim, then re-run the same scenarios with the skill present. Combine three or more pressures like time, sunk cost, and authority, and refactor until no new rationalizations appear.

What should go in a skill description field?

The description should only describe triggering conditions and symptoms, never summarize the skill's workflow. Descriptions that summarize process cause agents to follow the description instead of reading the full skill body.

When should I not create a new skill?

Skip skill creation for one-off solutions, well-documented standard practices, project-specific conventions that belong in project config files, and mechanical constraints that can be enforced with validation or automation instead.

Why do agents ignore skill rules under pressure?

Agents rationalize around rules using excuses like sunk cost, pragmatism, or spirit-versus-letter arguments. Counter this with explicit negations of each loophole, rationalization tables, red flag lists, and foundational principles stated early.