From skill-authoring
Use when creating or revising a reusable agent skill under skills/<name>/SKILL.md — deciding activation, layering, examples, or validation, or choosing between a skill vs. instructions vs. a specialized agent.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skill-authoring:skill-authoringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when creating or revising a reusable agent skill under `skills/<name>/SKILL.md`, especially when you need to decide activation, layering, examples, and validation.
Use this skill when creating or revising a reusable agent skill under skills/<name>/SKILL.md, especially when you need to decide activation, layering, examples, and validation.
Treat this as the benchmark shape other skills should copy: concise activation, shallow support files, and an obvious first validation step.
skills/<name>/SKILL.md.A skill is ready to hand off when it:
SKILL.md concise by pushing lookup-heavy detail into shallow support filesEvery skill requires a YAML frontmatter block at the start of SKILL.md. This block tells the skill authoring system and agents how to discover, validate, and invoke your skill.
name (string, required)
skills/reverse-prompt/SKILL.md → name: reverse-prompt)reverse-prompt, ✓ skill-authoring, ✓ test-driven-developmentdescription (string, required)
metadata (object, recommended)
authoring, ci, migrations, typescript, version-control, workflow, etc.general-coding-agent or a specialized audiencestable, draft, or other lifecycle stagetask for multi-step playbooks; reference for lookup-heavy guidance. Must be set before a skill can be promoted from draft to stable.required when reader-testing is a mandatory stage. See references/metadata-contract.md for the full list of allowed optional extensions.Do not add license, compatibility, author, inspired-by, argument-hint, or any other top-level keys beyond name, description, and metadata. Do not add upstream provenance keys (github-path, github-ref, github-repo, github-tree-sha, version, enhancements) inside the metadata block. See references/metadata-contract.md for the full contract, rationale, and exception policy.
---
name: reverse-prompt
description: Use when a request is under-specified, ambiguous, or needs sharpening before research, planning, or implementation begins — or when the user explicitly asks to improve, rewrite, or reverse-prompt their ask.
metadata:
category: workflow
audience: general-coding-agent
maturity: beta
---
The validator script (scripts/validate-skill-library.mjs) checks that:
name matches the directory name (e.g., skills/my-skill/SKILL.md → name: my-skill)name contains only alphanumeric, hyphens, underscores (no spaces or special characters)description exists and is at least 20 characters longdescription includes a trigger phrase ("when", "use this", or "use when")argument-hint, compatibility, license, author, inspired-by)metadata (github-path, github-ref, github-repo, github-tree-sha, author, inspired-by, version, enhancements)metadata.kind is set to task or reference for all draft skills--- markers| Issue | Cause | Fix |
|---|---|---|
| "frontmatter name does not match directory" | Name in --- block doesn't match folder | Rename the name: field to match the skill directory name |
| "name contains invalid characters" | Spaces, uppercase, or special characters in name | Use lowercase alphanumeric, hyphens, underscores only (e.g., my-skill-v2) |
| "description is too short" | Description under 20 characters | Expand description to at least 20 chars and include concrete trigger phrases |
| "missing frontmatter key name" or "description" | Frontmatter block incomplete | Add both name: and description: keys between --- delimiters |
| "missing frontmatter block" | No --- delimiters in SKILL.md | Add --- at the top of the file and close the frontmatter with another --- |
| "unterminated frontmatter block" | Only one --- marker or no closing --- | Ensure frontmatter is wrapped: --- on first line and --- after the last field |
| "forbidden top-level frontmatter key" | Extra keys like license, argument-hint at top level | Move content to metadata, ## Inputs to gather, or references/; see metadata-contract.md |
| "forbidden provenance key metadata.*" | Upstream github-* or attribution fields inside metadata | Remove provenance fields; preserve attribution in a commit message or PROVENANCE.md |
| "metadata.kind is required for draft skills" | New skill missing kind field | Add kind: task or kind: reference under metadata |
To validate a skill's frontmatter and structure:
node skills/skill-authoring/scripts/validate-skill-library.mjs [SKILL.md paths...]
Validate all skills:
node skills/skill-authoring/scripts/validate-skill-library.mjs
The validator will report specific issues and how to fix them.
| Situation | Use this skill? | Route instead |
|---|---|---|
| Create or revise a reusable skill package | Yes | - |
| Create or update agent instruction files (copilot-instructions.md, AGENTS.md) | No | init |
| Author collaborative documentation such as READMEs or runbooks | No | doc-coauthoring |
reference skill or a task skill.assets/skill-template.md and keep the main SKILL.md focused on activation, first actions, and validation.reference skill or a task skill:
reference skill = lookup-heavy guidance, conventions, and examplestask skill = multi-step workflow with explicit inputs, outputs, and validationSKILL.md so the next action is obvious within a few seconds of reading it.SKILL.md so an agent can discover it without guessing.SKILL.md.references/ before scripts/ unless automation clearly reduces repeated work.SKILL.md when a shallow reference file would keep the package clearer.references/layering-guide.md.references/checklist.md.scripts/validate-skill-library.mjs after changing SKILL.md, assets/, or references/.SKILL.mdskills/reverse-prompt/SKILL.md so the decision logic stays obvious at the top level and the detailed branching moves into references."terraform-module-upgrade skill that stays generic, uses shallow references, and makes the first validation step obvious."assets/skill-template.md - starter template for a new SKILL.mdreferences/layering-guide.md - where guidance belongs across instructions, skills, and agentsreferences/checklist.md - final authoring and validation checklistreferences/metadata-contract.md - canonical frontmatter contract: required fields, allowed optional extensions, forbidden keys, and exception policyreferences/import-rewrite-contract.md - shared target shape for rewriting upstream skills into this local libraryreferences/quality-scenarios.md - skill quality review scenarios and maintenance loopscripts/validate-skill-library.mjs - local validator for skill library metadata, examples, and support-file referencesCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub matt-riley/lucky-hat --plugin skill-authoring