
writing-skills
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.
- Installs
- 41
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/joellewis/skill-library --skill writing-skills- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads writing-skills automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
FAQ
What does the writing-skills skill do?
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.
How do I install writing-skills?
Run npx skills add https://github.com/joellewis/skill-library --skill writing-skills in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/writing-skills/ (personal) or .claude/skills/writing-skills/ (project).
Which AI agents can use writing-skills?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is writing-skills safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains writing-skills?
It is published by joellewis in joellewis/skill-library. It has 41 recorded installs.
More from joellewis/skill-library
fiction-architect
joellewis/skill-library
Designs plot structure and story arcs using McKee's value turns, Campbell's monomyth, and Sanderson's Promise/Progress/Payoff model to ensure causal integrity and emotional resonance. Use when constructing narratives, outlining novels, or diagnosing why a story feels broken.
dialogue-craft
joellewis/skill-library
Writes and refines dialogue that serves plot and reveals character through subtext, intention, and behavioral exchange — applying McKee's subtext principle and Sorkin's intention-and-obstacle model. Use when dialogue feels flat, expository, or 'on the nose.'
world-building-logic
joellewis/skill-library
Engineers internally consistent fictional worlds using Brand's Pace Layers for social structure and Sanderson's Laws of Magic for system constraints. Use when building settings, designing magic or tech systems, or auditing a world for logical contradictions.
problem-framing
joellewis/skill-library
Use when beginning analytical or strategic tasks, facing undefined problems, or facing analysis paralysis—requires explicit problem definition before proceeding.
character-vulnerability
joellewis/skill-library
Use when a character feels flat, too competent, or unrelatable—identifies the Sacred Flaw (Storr's Theory of Control) and dials the Three Sliders (Sanderson) to create earned vulnerability.
one-pager
joellewis/skill-library
Use when compressing a complex strategy or analysis into a strictly one-page narrative—enforces Pyramid SCQ structure and Orwell word-budget discipline.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.