frontier/skills/writing-skills/SKILL.md
Use when creating a new skill, editing an existing skill, writing a SKILL.md, or verifying a skill works before deployment.
npx skillsauth add jon23d/skillz writing-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A skill is a directory containing a SKILL.md file plus optional reference files and scripts. Skills give agents reusable domain-specific context, workflows, and tools.
Core insight: Writing skills is tdd applied to process documentation. Establish baseline behavior first (RED), write the skill (GREEN), then close loopholes (REFACTOR).
Create when:
Don't create for:
---
name: skill-name-with-hyphens
description: Use when [specific triggering conditions and symptoms]
---
# Skill Name
## Overview
Core principle in 1-2 sentences.
## When to use
Symptoms, contexts, triggers. When NOT to use.
## Core pattern / Quick reference
Steps or code.
## Common mistakes
What goes wrong + fixes.
Frontmatter rules:
name and description fields are supportedname: letters, numbers, hyphens only (no parentheses or special chars)description: max 1024 chars; see below for critical rulesThe description is how the agent decides whether to load your skill. It must describe only when to use the skill — never summarize what the skill does or how it works.
Summarizing the workflow in the description causes agents to follow the description as a shortcut and skip reading the full skill body.
# Bad: summarizes workflow — agent may follow this instead of reading the skill
description: Use when executing plans — dispatches subagent per task with code review between tasks
# Bad: first person
description: I can help you process Excel files
# Good: triggering conditions only, third person
description: Use when executing implementation plans with independent tasks
# Good: specific symptoms, no workflow
description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently
Rules:
Use structured text, not diagrams or tables:
Use progressive disclosure: SKILL.md is the table of contents; details live in linked files loaded only when needed.
my-skill/
├── SKILL.md # Overview + links (required)
├── reference.md # Heavy reference: API docs, schemas (100+ lines)
├── examples.md # Input/output pairs
└── scripts/
└── validate.py # Reusable utility scripts
form_validation_rules.md not doc2.mdSkills load into every conversation. Every token counts.
Targets:
Techniques:
--help instead of documenting all flags inlineUse terms agents would search for when encountering a problem:
"Hook timed out", "ENOTEMPTY", "race condition""flaky", "hanging", "zombie", "pollution""timeout/hang/freeze", "cleanup/teardown/afterEach"For multi-step tasks, give the agent a copyable progress checklist:
Task Progress:
- [ ] Step 1: ...
- [ ] Step 2: ...
- [ ] Step 3: ...
Then describe each step. Include feedback loops: run validator → fix errors → repeat.
For output quality that depends on style, provide input/output pairs:
**Example 1:**
Input: <user request>
Output:
<desired output>
One excellent, complete, well-commented example is better than many thin ones.
Never deploy a skill you haven't tested. No exceptions.
RED — establish baseline: Run the target scenario with a fresh agent session without the skill. Document what choices the agent made, what rationalizations it used (verbatim), and which pressures triggered failures.
GREEN — write minimal skill: Write a skill that addresses those specific failures. Don't add content for hypothetical cases. Re-run with the skill and verify compliance.
REFACTOR — close loopholes: If the agent finds a new rationalization, add an explicit counter. Re-test until bulletproof.
Testing approaches by skill type:
If the agent needs to write code to test a skill, use test/<skill-name>/ within the current working directory. For example, when testing the pull-requests skill, write test code to test/pull-requests/. Clean up the directory after testing is complete.
Skills that enforce rules need to actively resist rationalization. Agents will find loopholes under pressure.
Close every loophole explicitly — state the rule, then forbid specific workarounds:
Write code before test? Delete it. Start over.
No exceptions:
- Don't keep it as "reference"
- Don't "adapt" it while writing tests
- Delete means delete
Add a rationalization list built from your baseline testing:
Add a red flags list so agents can self-check:
## Red flags — stop and reassess
- Thinking "this is too simple to need a test"
- Thinking "I'll test it after"
- Thinking "this situation is different because..."
RED — baseline first:
GREEN — write minimal skill:
name uses only letters, numbers, hyphensdescription starts with "Use when...", third person, triggers only (no workflow summary)REFACTOR — close loopholes:
Quality checks:
scripts\file.py) — breaks on Unix systemsdevelopment
Use when adding or modifying environment variable handling in TypeScript projects or monorepos — especially when using process.env directly, missing startup validation, sharing env schemas across packages, or encountering "undefined is not a string" errors at runtime from missing env vars.
testing
Use when creating a new skill, editing an existing skill, writing a SKILL.md, or verifying a skill works before deployment.
development
React UI design principles and conventions. Load when building or modifying any user interface or React components. Covers application type detection, visual standards, component design and structure, Mantine (business apps) and Tailwind (consumer apps), accessibility, responsiveness, state management, data fetching, testing, and in-app help patterns.
development
Use when setting up ESLint and/or Prettier in a TypeScript project, adding linting to an existing TypeScript codebase, or configuring typescript-eslint, eslint-config-prettier, or related packages.