Index of every page on this site: llms.txt
All skills
joellewis avatar

/writing-skills

@fcb67f8
Run it yourself

Enforces a test-driven approach to skill authoring — defining what a skill must achieve before writing content to prevent hallucinated utility or ungrounded advice. Use when creating new skills, editing existing ones, or verifying skill quality before deployment.

Use this Skill: https://skilld.dev/gh/joellewis/skill-library/writing-skills

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈70 tokens for metadata: the name and description. ≈1.1k when used: this file.

Description uses 3.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈280 characters, or 3.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Overview

This skill enforces a Test-Driven Development (TDD) approach to documentation and skill authoring. By defining what a skill must achieve before writing its content, we ensure functional clarity and prevent "hallucinated utility" or generic, ungrounded advice.

Iron Law

NO SKILL WITHOUT A FAILING TEST FIRST Skills written without a prior test case often drift into generic filler that doesn't solve a specific user problem. The test case grounds the skill in reality.

State Machine

digraph writing_skills_flow {
    "Start" [shape=doublecircle];
    "Step 1: Define User Problem" [shape=box];
    "Step 2: Write Failing Test Case" [shape=box];
    "Step 3: Define Acceptance Criteria" [shape=box];
    "Step 4: Author Skill Content" [shape=box];
    "Step 5: Run Test Case" [shape=box];
    "Gate: Pass Test?" [shape=diamond];
    "Done" [shape=doublecircle];

    "Start" -> "Step 1: Define User Problem";
    "Step 1: Define User Problem" -> "Step 2: Write Failing Test Case";
    "Step 2: Write Failing Test Case" -> "Step 3: Define Acceptance Criteria";
    "Step 3: Define Acceptance Criteria" -> "Step 4: Author Skill Content";
    "Step 4: Author Skill Content" -> "Step 5: Run Test Case";
    "Step 5: Run Test Case" -> "Gate: Pass Test?";
    "Gate: Pass Test?" -> "Done" [label="pass"];
    "Gate: Pass Test?" -> "Step 4: Author Skill Content" [label="fail"];
}

When to Use This Skill

  • Creating a new agent skill from scratch.
  • Refactoring an existing skill to add new capabilities.
  • Upgrading a rough draft to a production-ready skill.
  • Debugging a skill that is producing poor-quality output.

When NOT to Use This Skill

  • Simple task execution that does not require a persistent skill instruction.
  • General conversational responses.

Core Process

Step 1: Define User Problem

Identify the specific failure mode or knowledge gap the user is facing. What happens when the user doesn't have this skill? (Source: system design)

Step 2: Write Failing Test Case

Draft a sample prompt or scenario where a generic LLM (or the current skill) would fail. This is the "Red" phase of TDD. (Source: system design)

Step 3: Define Acceptance Criteria

List 3-5 specific, testable behaviors the skill MUST exhibit to be considered successful. (Source: system design)

Step 4: Author Skill Content

Write the skill following the appropriate rigor template (full rigor or standard rigor). Every principle must directly address the failure mode identified in Step 1. (Source: system design)

Step 5: Run Test Case

Execute the failing test case from Step 2 against the newly authored skill. If the output meets the acceptance criteria, the skill passes. (Source: system design)

Cross-Skill Invocations

REQUIRED SUB-SKILL: None RECOMMENDED SUB-SKILL: prompt-optimizer — to refine the test case and skill instructions.

Rationalization Table

Thought Reality
"I know what I want to say, I don't need a test case." Without a test, you won't know if the skill actually changes the LLM's behavior.
"Writing the test takes too much time." Fixing a broken skill after deployment takes 10x more time.
"This skill is too simple for TDD." Simple skills are where generic filler is most likely to hide.
"I'll write the test after I finish the skill." This defeats the purpose; you will subconsciously write a test the skill can already pass.

Red Flags

These thoughts mean STOP — you are about to shortcut:

  • "Let me just start writing and see where it goes" → You are skipping Step 1 and Step 2.
  • "The test case passed even without the skill" → Your test case is too weak; it doesn't represent a true failure mode.
  • "I'll just assume this works because it looks comprehensive" → You are skipping Step 5.

Diagnostic Checklist

  • Is there a documented failing test case (prompt/scenario)?
  • Do the acceptance criteria explicitly reference the failing test case?
  • Does every principle in the skill map to a required behavior?
  • Has the skill been tested against the scenario and passed?
  • Is the skill free of generic, non-actionable advice?

Sources

  • System design — Pattern Lineage and writing-skills definition.
  • System design — Full Rigor format requirements.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides a high-level methodology for writing and testing other agent skills. It contains no executable code, remote dependencies, or dangerous instructions.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at fcb67f8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 9 months ago
compatibility
Claude Code and compatible agent products
Other metadata
metadata
{
  "type": "meta",
  "family": "meta",
  "rigor": "full",
  "keywords": "documentation, TDD, testing, skill-authoring, reference-guide, process",
  "requires": "",
  "enhances": "learning-accelerator",
  "sources_pdf": "",
  "sources_web": ""
}

README badge

README badge for joellewis/skill-library/writing-skills