Skills Spec

Documents the Agent Skills SKILL.md format specification for authoring and validating skills.

1|1|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/PostHog/community-skills --skill skills-spec-posthog
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Skills Spec
Source: https://github.com/PostHog/community-skills/tree/main/skills/skills-spec
Command: npx skills add https://github.com/PostHog/community-skills --skill skills-spec-posthog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Authoring a SKILL.md that agents actually discover and trigger correctly is hard: frontmatter rules, naming constraints, token budgets, and description-writing pitfalls are scattered across the agentskills.io spec. This Skill condenses the full Agent Skills format specification into one reference so you can write, review, and debug skills without hunting through documentation. ## Core Features & Use Cases - Frontmatter reference: Complete rules for required fields (name, description) and optional fields (license, compatibility, metadata, allowed-tools), including naming constraints and character limits. - Progressive disclosure guidance: Explains the three-stage token budget (discovery, activation, on-demand resources) and when to move content into scripts/, references/, or assets/ directories. - Description optimization and testing: Covers trigger-rate evaluation loops, should-trigger vs near-miss prompt design, and a pre-publish checklist with the skills-ref validator. - Use Case: You are writing a new skill for Claude Code and your agent never activates it. Use this Skill to check your description against the optimizing-descriptions rules, verify your name matches the directory, and run the validation workflow. ## Quick Start Ask the agent to review your SKILL.md frontmatter and description against the Agent Skills specification and suggest fixes for triggering issues.

Frequently Asked Questions about Skills Spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a SKILL.md file for an agent skill?▼

Create a directory containing a SKILL.md with YAML frontmatter defining name and description, followed by a Markdown body with instructions. The name must be lowercase kebab-case matching the directory name, and the description must state what the skill does and when to use it.

What frontmatter fields are required in SKILL.md?▼

Only name and description are required. Optional fields include license, compatibility, metadata, and allowed-tools. Name must be 1-64 lowercase characters matching the parent directory, and description is limited to 1024 characters.

Why is my agent skill not triggering?▼

Triggering depends almost entirely on the description field, the only content loaded at startup. Rewrite it in imperative voice covering what the skill does and when to use it, then test with 16-20 prompts including near-miss cases that should not trigger.

When should content go in references instead of SKILL.md?▼

Move content to references/ when the SKILL.md body approaches 500 lines or 5000 tokens. Each reference file needs an explicit load trigger in the body, such as instructing the agent to read the file when a specific error or condition occurs.

How do I validate a SKILL.md before publishing?▼

Run the skills-ref validator from the agentskills repository against your skill directory to check frontmatter and naming rules. Also verify the pre-publish checklist: valid kebab-case name, description under 1024 characters, and tested trigger behavior with real prompts.