agents/skills/creating-skills/SKILL.md
Guide for creating new Agent Skills when patterns emerge or improvements are needed. Use when encountering repeated patterns, making the same mistakes, discovering better approaches, or receiving user corrections. Covers keeping each skill small (one topic), when to split SKILL.md or add references/, and line-count heuristics.
npx skillsauth add firtoz/cf-multiworker-boilerplate creating-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.
This skill helps recognize when new skills would be valuable and guides the creation process. It follows the official Agent Skills specification.
Create a new skill when you notice:
A skill should cover one coherent “kind of work” — small enough that an agent can skim it in one pass and know if it applies. If SKILL.md grows into a multi-manual, split rather than stack unrelated topics.
Rough size (body lines, excluding YAML frontmatter) — not a hard gate, a smell test:
| Size | Guidance |
| --- | --- |
| ~80–200 lines | Healthy default for a focused playbook (when/references + checklists). |
| ~200–350 lines | Still OK if one topic; tighten prose, use bullets, or move long tables to references/. |
| > ~350–400 lines | Pause: likely doing too much in one file—see split signals below. |
| > ~500 lines | Should split or offload depth to references/; keep SKILL.md as the thin entry point. |
(Aligns with progressive disclosure: full SKILL.md is often loaded when the skill activates—see below.)
Signals you should split or carve out references/:
## sections that could stand alone (e.g. “deploy” + “component style” + “DB migrations” in one skill).description reads like fire-and-forget keywords for three or more different user intents—pick one primary trigger; spin off another skill.references/<topic>.md and link “read when …”.Ways to split:
agents/skills/<narrow-name>/SKILL.md; cross-link from the old one. Prefer narrow names (cf-durable-object-package vs everything-about-workers).references/ — Deep dives, long examples, version-specific notes; SKILL.md stays “when + essential steps + links”.AGENTS.md).Anti-pattern: One mega-skill that tries to be the whole monorepo. Prefer many small skills + AGENTS.md index.
A skill is a directory under agents/skills/<skill-name>/ containing at minimum a SKILL.md file:
agents/skills/
└── skill-name/
├── SKILL.md # Required
├── scripts/ # Optional - executable code
├── references/ # Optional - additional documentation
└── assets/ # Optional - templates, images, data files
The SKILL.md file must contain YAML frontmatter followed by Markdown content.
---
name: skill-name
description: What the skill does and when to use it. Use when [triggers].
---
---
name: skill-name
description: What the skill does and when to use it. Use when [triggers].
license: Apache-2.0
compatibility: Requires git, docker, and access to the internet
metadata:
author: your-org
version: "1.0"
allowed-tools: Bash(git:*) Read Write
---
# Skill Title
## When to Use
[Trigger scenarios]
## Instructions
[Concise, actionable steps]
## Examples
[Concrete input/output examples]
name Field (Required)The name field must:
a-z and -)--)Valid examples:
pdf-processingdata-analysiscode-reviewInvalid examples:
PDF-Processing (uppercase not allowed)-pdf (cannot start with hyphen)pdf--processing (consecutive hyphens not allowed)description Field (Required)The description field must:
Good example:
description: Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents or when the user mentions PDFs, forms, or document extraction.
Poor example:
description: Helps with PDFs.
license Field (Optional)The license field:
Example:
license: Apache-2.0
license: Proprietary. LICENSE.txt has complete terms
compatibility Field (Optional)The compatibility field:
Examples:
compatibility: Designed for Claude Code (or similar products)
compatibility: Requires git, docker, jq, and access to the internet
Note: Most skills do not need the compatibility field.
metadata Field (Optional)The metadata field:
Example:
metadata:
author: example-org
version: "1.0"
category: data-processing
allowed-tools Field (Optional, Experimental)The allowed-tools field:
Example:
allowed-tools: Bash(git:*) Bash(jq:*) Read Write
Write descriptions in third person (they're injected into the system prompt):
# ✅ Good
description: Processes Excel files and generates reports. Use when analyzing spreadsheets or .xlsx files.
# ❌ Bad
description: I can help you process Excel files.
description: You can use this to process Excel files.
Include both WHAT and WHEN:
Skills should be structured for efficient use of context:
name and description fields are loaded at startup for all skillsSKILL.md body is loaded when the skill is activatedscripts/, references/, or assets/ are loaded only when requiredSKILL.md leanPrefer a short main file so agents don’t burn context when the skill activates. See One topic per skill (size heuristic) for line-count heuristics and when to split.
Target: main SKILL.md holds when to use, essential steps, and pointers; move long reference material to references/ (or a sibling skill).
When referencing other files in your skill, use relative paths from the skill root:
See [the reference guide](references/REFERENCE.md) for details.
Run the extraction script:
scripts/extract.py
Keep file references one level deep from SKILL.md. Avoid deeply nested reference chains.
Be concise - only add context the agent doesn't already have.
Challenge each piece of information:
# ✅ Good - Concise (50 tokens)
## Extract PDF text
Use pdfplumber for text extraction:
\`\`\`python
import pdfplumber
with pdfplumber.open("file.pdf") as pdf:
text = pdf.pages[0].extract_text()
\`\`\`
# ❌ Bad - Too verbose (150 tokens)
## Extract PDF text
PDF (Portable Document Format) files are a common file format that contains
text, images, and other content. To extract text from a PDF, you'll need to
use a library. There are many libraries available...
Contains executable code that agents can run. Scripts should:
Supported languages depend on the agent implementation. Common options include Python, Bash, and JavaScript.
Contains additional documentation that agents can read when needed:
REFERENCE.md - Detailed technical referenceFORMS.md - Form templates or structured data formatsfinance.md, legal.md, etc.)Keep individual reference files focused. Agents load these on demand, so smaller files mean less use of context.
Contains static resources:
api-integration)agents/skills/skill-name/SKILL.md (canonical; also visible as .cursor/skills/… in Cursor via symlink)Suppose you notice you're repeatedly asked to write commit messages and have a preferred format:
---
name: git-commits
description: Generate descriptive commit messages by analyzing git diffs. Use when writing commit messages or reviewing staged changes.
---
# Git Commit Messages
## Format
Follow conventional commits format:
\`\`\`
type(scope): brief description
Detailed explanation of what changed and why.
\`\`\`
## Types
- `feat` - New feature
- `fix` - Bug fix
- `chore` - Maintenance
- `docs` - Documentation
- `refactor` - Code restructuring
## Examples
**Example 1:**
Input: Added user authentication with JWT tokens
Output:
\`\`\`
feat(auth): implement JWT-based authentication
Add login endpoint and token validation middleware
\`\`\`
**Example 2:**
Input: Fixed date formatting bug
Output:
\`\`\`
fix(reports): correct date formatting in timezone conversion
Use UTC timestamps consistently across report generation
\`\`\`
When creating skills, ensure they follow the Agent Skills specification:
Frontmatter validation:
name and descriptionname matches directory name and follows naming rulesdescription is specific and includes trigger termsStructure validation:
Testing:
description fielddevelopment
Repo-root commands, typegen and typecheck cadence, lint, deploy, adding packages with bun, and Alchemy app layout. Use at the start of a task, before PR, or when choosing turbo/typegen commands.
development
Fork and template gotchas (env import, routes, typegen, forms, D1, Turbo, HMR, new DO packages). Use when working on apps/web or durable-objects, or when behavior diverges from this stack’s conventions.
testing
Turborepo task configuration patterns for monorepo management. Use when configuring turbo.json tasks, setting up task dependencies, managing cache inputs/outputs, or working with cross-package dependencies in the monorepo.
development
React Router v7 routing patterns and environment variable configuration. Use whenever you touch React Router–related code (routes, links, params, loaders, actions, route config, or env in route context).