/godmode:writing-skillsfrom GodMode
Guides writing, editing, reviewing, and debugging skills for Claude Code. Use when a skill fails to trigger, is ignored, or needs creation or revision.
Ships in GodMode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A skill is code that runs on a model. Like code, it is written against a failing test: you first watch an agent get the task wrong without the skill, then write the smallest skill that fixes what you saw, then attack it until the agent stops finding ways around it. If you never watched an agent fail without the skill, you do not know what the skill has to prevent.
NO SKILL SHIPS WITHOUT A BASELINE FAILURE AND A VERIFIED PASS
No exceptions. No workarounds. No shortcuts.
This applies to edits too. A "small wording fix" to a discipline skill can open a loophole; re-run its scenarios.
Required:
Skip:
Write a skill when the technique is not obvious to a capable model, applies across projects, and agents get it wrong without help. Three kinds:
| Kind | Example | How to test it |
|---|---|---|
| Discipline (a rule agents are tempted to break) | test-first, completion-gate | Pressure scenarios: does the agent comply when it wants not to? |
| Technique (a method with steps) | fault-diagnosis, performance-tuning | Application scenarios: does the agent apply it correctly to a new case? |
| Reference (facts to look up) | platform command tables | Retrieval scenarios: does the agent find and use the right entry? |
RED: capture the baseline failure. Write three or more realistic scenarios for the behaviour the skill should produce (method and templates in references/testing-skills.md). Dispatch a fresh subagent per scenario with no access to the skill, or run the harness's eval tooling with a no-skill baseline. Record what each agent did and its rationalisations word for word. If the agents already behave correctly, stop: the skill is not needed.
Write the description from the triggers you observed (rules below), not from what the skill does.
GREEN: write the smallest skill that fixes the observed failures, using the GodMode template below. Address each recorded rationalisation explicitly; do not add rules for failures you did not see.
Run the validator from the repository root and fix every error for your skill:
node scripts/validate.js
The validator is the acceptance test for form: frontmatter, quoting, section order, length, cross-references, links and tool coupling. A skill with validator errors is not finished, whatever the scenarios say.
Verify GREEN. Run the same scenarios with the skill available. The agent must choose the right action and cite the skill's sections as its reason. Save the transcripts or the eval report.
REFACTOR: close loopholes. Run harder scenarios (three or more combined pressures). For every new rationalisation, add an explicit counter: a sentence in the protocol, a row in Cognitive Traps, an item in Guardrails, and, if it reveals a new trigger, a phrase in the description. Re-run until no new rationalisation appears.
Check triggering separately. Give a fresh agent a task that should trigger the skill without naming it, and one that should not. The skill must load for the first and stay out of the second.
Record the evidence in the pull request: the baseline failures, the passing runs, the rationalisations you countered, and the validator line.
Every SKILL.md follows this shape. The description is wrapped in double quotes so YAML never misreads a colon in it.
---
name: <directory-name>
description: "Use when <triggering situations only; no workflow summary; third person; under 400 characters>"
---
# <Title>
<Overview: 2-4 sentences. What this skill is for and the **core principle** in bold.>
## The Prime Directive
```
<ONE LINE, CAPITALS, THE RULE THAT CANNOT BE BROKEN>
```
No exceptions. No workarounds. No shortcuts.
## When to Use
**Required:** <bullets>
**Skip:** <bullets>
## The Protocol
<Numbered steps the agent follows. Add a dot digraph only where the flow genuinely branches. Each step says what to do and what evidence it leaves behind.>
<Optional H2 sections specific to the skill: templates, checklists, decision tables.>
## Cognitive Traps
| Rationalisation | Truth |
|---|---|
| <at least five rows> | |
## Guardrails
**Never:** <bullets>
**Always:** <bullets>
## Connections
- `godmode:<skill>`: <when this skill hands off to it or depends on it>
Form rules the validator enforces:
name equals the directory name: lowercase letters, digits and single hyphens.references/*.md in the skill directory, linked with a relative link; every linked file must exist. Reference files over about 100 lines start with a short contents line, and references stay one level deep.references/.name and description is harness-specific and must be harmless where it is ignored. hooks (a stop check armed when the skill is invoked, as in godmode:completion-gate) is honoured by Claude Code and ignored elsewhere; any other field needs a validator allowlist entry and a line in the harness reference. A rule the agent keeps skipping belongs in a hook, not in stronger wording.godmode:<name> and must name an existing skill.Voice: second person to the agent, "the user" for the human, plain words, no emoji, no marketing.
The description is the only part of a skill every harness reads before deciding to load it. It is a trigger, not a summary.
GodMode runs the same skill files on several harnesses, and each harness names its tools differently. A skill body therefore names actions: "dispatch a subagent", "create a task", "invoke godmode:test-first", "read the file", "search the web", "ask the user one question". It never names a harness's tool, a harness environment variable, a phrase of the form "the tool", or harness-specific JSON.
The mapping from each action to each harness's real tool lives only in skills/using-godmode/references/<harness>-tools.md. If your skill needs a harness detail that is not there, add it to that reference (or ask its owner) instead of putting it in your skill. The validator's tool-coupling check fails the build on violations; the list of names it checks is in scripts/validate.js.
Shell commands (git, npm test, pytest) are fine: they are the same on every harness. OS environment variables such as PATH are fine where the skill is about the OS.
Any tool name, flag, version, URL, limit, price or "X supports Y" claim in a skill comes from a source you checked while writing it, not from memory. Put the URL and the date in an HTML comment beside the fact or in the reference file's sources section (godmode:grounding has the method). Prefer wording that stays true ("set strict explicitly") over wording that depends on a version default.
Scenarios run by hand are the minimum. Where the harness has eval tooling, use it so results are repeatable and include a no-skill baseline.
claude plugin eval <plugin-path>. Cases live in the plugin's evals/ directory, one folder per case with a prompt.md (frontmatter such as max_turns, then the task) and graders/*.md (each with a type, for example llm, and the criteria), or a case.yaml. claude plugin eval init --bare <name> scaffolds a blank case. It runs each case several times (default 3, --runs to change), adds a no-plugin baseline arm and reports the score difference, writes an HTML report (published to claude.ai by default when the account supports it; --no-publish keeps it local), and exits non-zero below --threshold. Useful flags: --case <glob>, --model, --judge-model, --max-cost-usd. Each run is a full agent session on the user's own account, so it costs real usage; ask before running a large suite.godmode:model-routing puts cheaper models.skills-ref validate ./<skill>) checks the standard's own frontmatter rules; GodMode's validator is stricter and remains the gate.| Rationalisation | Truth |
|---|---|
| "The skill is obviously clear." | Clear to the author. Only an agent that did not write it can show you what it misreads. |
| "It's just a reference skill, no need to test." | Reference skills fail by not being found or by the wrong entry being used. Test retrieval. |
| "Testing is overkill for a small edit." | Small edits to discipline skills open loopholes. Re-run the scenarios. |
| "I'll describe the workflow in the description so it's easy to find." | Agents follow the summary and skip the body. Describe triggers only. |
| "The agent will know which tool I mean." | On another harness that tool does not exist. Name the action. |
| "I remember the flag." | Flags and limits change. Check the source and cite it. |
| "The scenarios passed once, it's done." | One pass under mild pressure proves little. Combine pressures and re-run after every refactor. |
| "Validator warnings don't matter." | Errors block; warnings usually point at a real trigger or tone problem. Read them. |
Never:
Always:
node scripts/validate.js and the scenarios again after every change.godmode:test-first: the RED, GREEN, REFACTOR cycle this skill applies to documentation.godmode:grounding: how to verify and cite every changeable fact in a skill.godmode:using-godmode: owns the per-harness tool references that skill bodies must not duplicate.godmode:agent-briefing: brief the subagents that run baseline and pressure scenarios.godmode:model-routing: choose which models the scenarios run on.godmode:completion-gate: a skill is done only with validator output and passing scenario evidence in hand.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub noobygains/godmode --plugin godmode33 skills in this plugin
/agent-briefingUse when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff report between agents, or sending a message to another agent mid-task./codebase-conventionsUse when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration, error path or dependency, especially in a project the agent did not write or has not yet surveyed in this session./code-reviewUse when a task, feature or bug fix is implemented and before it is committed, merged or handed back to the user, and when the user asks for a review of a change, a branch or a pull request./completion-gateUse when about to say that work is done, fixed, passing, working, deployed or ready, before committing, opening or merging a pull request, closing a task, moving to the next task, or reporting a subagent's result as finished./cross-model-reviewUse when a reviewed change is about to land on a shared branch, be released or be deployed, and when the user asks for a second opinion on a change from a different model or a different AI vendor./delegated-executionUse when a written implementation plan is ready to execute in the current session and its tasks are mostly independent, so each one can go to a fresh implementer subagent with its own review.Other plugins' skills for the same job