/moskills:writing-skills runs instead · from moskills
Creates or edits SKILL.md files using test-driven development: records baseline failures, drafts minimal skill specs, then adds trigger tests and evals to verify correct firing behavior.
This skill never runs in Claude Code
It ships in moskills at templates/, but /moskills:writing-skills (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Primary goal: Every new or changed skill ships with a baseline failure it fixes. It also ships with proof that it fires on the right requests and stays quiet on its neighbours.
Writing skills IS Test-Driven Development applied to process documentation.
A skill is not the story of how someone solved a problem once. It is a reusable reference that future agents can find, with proven techniques, boundaries, and checklists.
Baseline Test Case (RED) -> Minimal Skill Spec (GREEN) -> Close Loopholes & Rationalizations (REFACTOR)
| TDD Concept | Skill Creation Mapping |
|---|---|
| Test Case | Concrete pressure scenario or task brief given to an agent. |
| Test Fails (RED) | Run baseline without the skill: watch the agent violate rules or rationalize shortcuts. |
| Production Code | The SKILL.md document (rules, degrees of freedom, format contracts). |
| Test Passes (GREEN) | Agent runs the scenario with the skill loaded and strictly complies. |
| Refactor Cycle | Identify new loopholes or rationalizations, tighten constraints, and re-verify. |
SKILL.md)Every skill file consists of clear, bounded sections designed for minimal token overhead and maximum behavioral compliance:
Loaded at agent startup. Write one double-quoted line under 1024 characters, in the third person. Lead with what the skill does, then say when to use it. Use the natural phrases that a user types:
---
name: skill-name
description: "[What it does, third person]. Use when [specific triggers, natural phrases, user intent], even if the user does not say skill-name."
---
Never start the description with Use when: the capability comes first. tests/skill-trigger.test.cjs (assertTrigger) enforces this shape.
Optional when_to_use: a second line of trigger phrases, the requests users actually type. Claude Code appends it to the description in the skill listing (both together are cut at 1,536 characters). Add it when another installed plugin ships an overlapping skill: measured with superpowers installed, superpowers:writing-skills took "Write a new skill..." 3 of 3 times (0 of 6 for this skill) until this skill had a when_to_use line; with it, this skill fired 5 of 6. A sharper description alone and a rename did not help.
States the single, unambiguous outcome of the skill:
# Skill Title
Primary goal: [One clear, testable, single sentence defining done].
A visual or sequential overview of the execution path:
Step 1 (Input & Baseline) -> Step 2 (Execution) -> Step 3 (Verification & Handoff)
Calibrate the degree of freedom to task fragility:
State what to do, not just what to avoid:
Define the exact shape, headers, or schemas expected so calling agents and human users can parse outputs predictably.
tasks/lessons.md reaching Seen: 3+.SKILL.md:
templates/claude/skills/<name>/ in the moskills repo, .claude/skills/<name>/ in any other project, or the plugin's skills/ folder.templates/claude/commands/<name>.md in moskills, .claude/commands/<name>.md elsewhere)./<name> routes into the skill's sections), create no command file. A same-named command shadows the skill in Claude Code; add a test that asserts the file does not exist instead..claude-plugin/plugin.json).tests/skill-trigger.test.cjs (via assertTrigger) and the primary goal line in tests/run-tests.sh.evals/triggers/<name>-*/case.yaml tagged with the skill name (neighbour: min: 0, max: 0; see docs/evals.md in moskills).claude plugin eval . --tag <name> --ablation none --runs 3. Elsewhere, send each trigger case to a fresh session and note which skill fired.Report in this shape, so the user sees proof rather than a claim:
Skill: <name> (<path to SKILL.md>)
Baseline: <what the agent did wrong without it>
Trigger cases: direct <passed>/<runs>, indirect <passed>/<runs>, neighbour quiet <passed>/<runs>
Tests: <command> -> <pass/fail>
Not verified: <what was not run, and why>
I, you or your.What SKILL.md sets; muted values are Claude Code's defaults
Write a new skill, create a skill that makes the agent do something every time, edit or tighten an existing skill, prove a skill fires.
18 skills in this plugin
/align-intentMakes a request checkable before coding: restates the outcome, asks at most five questions, and writes the inputs, outputs, success criteria and non-goals. Use when requirements, scope or success criteria are unclear, or when the user wants to agree on what to build before a new feature starts, even if the user does not say align./checkpointUse when: recording progress, Git deltas, evidence, blockers, and next actions after meaningful work or before a context change./compress-inputUse when: user asks for compressed communication, lite/full/ultra/wenyan brevity, short answers, low-noise updates, terse commits, terse PR review comments, or direct technical communication./council-loopIterative multi-model review loop across different AI providers that convenes a council of delegate models, collects structured findings, fixes issues minimally, and loops until all reviewers agree on correctness. Use when the user says "council", "council loop", "council-loop", "multi-model review", "review loop", "loop until agree", or asks for consensus code review from multiple providers, even if they do not say council-loop./design-systemUse when: a product with a UI needs consistent look and feel: choosing colors, type, spacing, the app shell (navigation, layout), a component list, or the layout and states of a screen; or when UI code drifts from agreed design values./diagnoseFinds the root cause of a failure before any fix: reproduces it, reads the full error, traces where it starts, tests one hypothesis at a time, then fixes the cause and records the reproduction passing. Use when a test fails or tests that passed before are now red, an error or stack trace appears, something that worked before now throws an error, a build breaks, users report wrong results or a regression after a change or deploy, something got slow, or the user asks why something fails or behaves unexpectedly, even if they do not say diagnose or debug. Not for building a new feature; use tdd.npx claudepluginhub mouad1/moskills --plugin moskillsOther plugins' skills for the same job