skills/skill-best-practices/SKILL.md
Guidance for writing SKILL.md files in this repository. Use when creating, updating, reviewing, or auditing a SKILL.md — including front matter, trigger design, sizing, output format, error handling, linking, safety, and composition. Do NOT use for general documentation questions unrelated to skill authoring.
npx skillsauth add bkinsey808/songshare-effect skill-best-practicesInstall 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.
Requires: file-read. No terminal or network access needed.
Preconditions:
SKILL.md before
proceeding.Clarifying questions:
Output format:
Error handling:
Only name and description are required and validated. Fields like
title, owner, and tags are not valid top-level frontmatter keys —
they cause validation errors. Document them in the skill body instead.
Supported top-level frontmatter keys: name, description, argument-hint,
disable-model-invocation, license, user-invocable.
(compatibility and metadata are valid keys but this project does not use them.)
name: ≤64 chars, lowercase letters/numbers/hyphens — used for discovery.description: ≤1024 chars, third-person. Must state when to use and
when NOT to use the skill. This is the primary invocation signal.user-invocable: true: exposes the skill as a slash command (e.g.
/my-skill) so users can invoke it by name. Omit for skills that should
fire transparently from context only.--- in the body renders as a
horizontal rule, not a second frontmatter block.See also: Metadata & discovery
---
name: my-skill
description: >
Generate X for Y. Use when the user asks to create or scaffold X.
Do NOT use for Z or non-X tasks.
---
The description field determines when the skill is invoked. Write it to
match user intent — not just what the skill does.
Do NOT use for …) when the boundary is
non-obvious.See also: Invocation & trigger design
See also: Conciseness, scope & progressive disclosure
reference/patterns.md, examples/usage.md.See also: Structure, files & references
Use explicit HTML anchors for stable deep-links:
<a id="my-section"></a> ### My Section
Use root-relative links with fragments throughout all markdown files
(e.g. /docs/skill-best-practices.md#my-section). This format is consistent
regardless of where the linking file lives. VS Code's linter does not resolve
root-relative links — accept the warning; AI and human readers handle them
correctly.
See also: Linking & anchors
Without explicit instructions, output format is one of the most common sources of inconsistent skill behavior. Always specify:
## headings per section" or "no headers — flat prose".See also: Output format & response style
Specify the failure contract explicitly — agents will otherwise silently guess.
See also: Error handling & fallback patterns
Agents don't automatically read files or check environment state. Be explicit:
src/schema.ts."$DATABASE_URL is set before running migrations."git status — warn if uncommitted changes
exist before modifying files."See also: Precondition & context gathering
See also: Clarifying questions & default assumptions
$MY_API_KEY.See also: Safety, idempotency & secrets
Declare required tools near the top of the skill body (e.g. **Requires:** file-read).
See also: Tool & permission declarations
Declare companion skills at the top of the body with a **Depends on:** line.
See also: Skill composition & dependencies
## Changelog section in the skill body;
link the PR or commit. (version is not a supported frontmatter field.)> **Moved:** see [section X](#anchor). note when content relocates.skillId or identifiers used by automation, update the
automation config and document the change in the PR description.See also: Maintenance & change control
Informal test cases — run against the target model to verify behavior.
Input: "Create a new skill that generates Zod schemas from TypeScript types"
Expected: Agent asks for the skill name if not provided, then outputs a
fenced markdown SKILL.md block with valid frontmatter, **Requires:** declared,
output format defined, preconditions listed, and clarifying-question policy set.
Input: "Review my skill" (no path given) Expected: Agent asks for the file path before proceeding.
Input: "Review skills/my-skill/SKILL.md"
Expected: Agent reads the file, then outputs a structured Passes / Gaps
report. Does not modify the file without being asked.
Input: "What is the max length for the description field?" Expected: Agent answers from the Front matter section without triggering a full skill-review workflow.
Input: "Update the sizing section of skills/my-skill/SKILL.md"
Expected: Agent reads the file, outputs only the updated section as fenced
code, explains the change in one sentence.
name and description clear and conform to rules; trigger language testeduser-invocable set correctly for the intended invocation modeSKILL.md body size reasonable (<300 lines for skill, <500 for full doc); context budget consideredSee also: Quick checklist
--- block in the body is not parsed as frontmatter — it
renders as a horizontal rule and the YAML fields are ignored.title, summary, owner, tags are not valid top-level frontmatter
keys — putting them in frontmatter causes a validation error. Document them
in the body instead.description → over-triggering. Vague description → skill
never fires. Both are silent failures./docs/...) links
or fragment links (file.md#anchor) — both produce "unresolved" warnings.
These are false positives; accept them. AI and human readers handle these
correctly. Prefer root-relative links over traversal paths (../../../).name missing from frontmatter → skill may not be discoverable.See also: Anti-patterns, Debugging
tools
Zustand state management patterns for this project — store creation, selectors, Immer middleware, async actions with loading states, devtools, persist, and testing. Use when authoring or editing Zustand stores (use*Store files) or components that subscribe to stores. Do NOT use for React component structure or TypeScript-only utilities.
testing
How to write, update, or split skill files in this repo. Use when creating a new SKILL.md, updating an existing one, or deciding whether to put content in a skill vs. docs/.
development
Complete guide for testing React hooks — renderHook, Documentation by Harness, installStore, fixtures, subscription patterns, lint/compiler traps, and pre-completion checklist. Read docs/testing/unit-test-hook-best-practices.md for the full reference.
development
Vitest unit test authoring for this repo — setup, mocking, API handler testing, and common pitfalls for non-hook code. Use when the user asks to add, update, fix, or review unit tests for utilities, components, API handlers, or scripts. Do NOT use for React hook tests — load unit-test-hook-best-practices instead.