agent-skills
How to build Agent Skills — the default format for all new skills. Covers Claude skills, the open AgentSkills spec, cross-platform gotchas, portability decisions, and graceful degradation. Use when creating or reviewing any skill.
What this skill does
# Universal Agent Skills
Guidance for building portable skills using the open AgentSkills spec. For the official spec and supported agents list:
- **<https://agentskills.io/specification>** — Full format specification (the open standard)
- **<https://code.claude.com/docs/en/skills>** — Claude Code skills docs (superset of the spec)
- **<https://agentskills.io/what-are-skills>** — Concepts and progressive disclosure
- **<https://github.com/anthropics/skills>** — Example skills from Anthropic (includes `skill-creator`)
For Claude-specific components beyond skills (agents, hooks, plugins, marketplaces), see the claude-components skill.
## Determining Universal vs Claude-Only Frontmatter
1. Fetch the AgentSkills spec at <https://agentskills.io/specification> for the current universal frontmatter fields
2. Fetch the Claude Code skills docs at <https://code.claude.com/docs/en/skills> for Claude's supported fields
3. The AgentSkills spec **Spec fields** are universal — safe to use in any skill
4. **Claude-only fields** (anything Claude supports but the spec doesn't define) will be ignored or rejected by other agents
5. Default to AgentSkills spec fields only. Claude-only fields are fine to add when needed — most agents silently ignore unknown frontmatter — but they won't function cross-platform
## The Portability Decision
Not every skill should be universal. Use this framework:
**Make it universal when:**
- The skill is pure knowledge/instructions (no tool-specific invocations)
- The skill wraps scripts that use standard CLI tools (git, python, jq, curl)
- The guidance applies regardless of which agent executes it
**Keep it Claude-specific when:**
- The skill orchestrates sub-agents (Agent tool is Claude-only)
- The skill relies on Claude Code hooks, plugins, or marketplace features
**Hybrid approach — universal core, Claude extras:**
- Write the main instructions using generic language ("read the file", "search for")
- Add a clearly marked section for Claude-specific optimizations
- This degrades gracefully: other agents follow the generic instructions, Claude gets the enhanced version
## Cross-Platform Gotchas
### Tool References
Claude has named tools (Read, Edit, Bash, Grep, Glob). Other agents have different tool names or capabilities. In universal skills:
- **Don't:** "Use the Read tool to examine the file"
- **Do:** "Read the file at `path/to/file`"
- **Don't:** "Use the Bash tool to run..."
- **Do:** "Run the following command: ..."
Agents map natural language to their own tool implementations. Let them.
## User Preferences
- **No license field** — skip unless explicitly requested
- **No metadata.author** — skip attribution unless explicitly requested
- **Knowledge delta** — see section below
- **Compatibility field** — use it when the skill needs specific tools (git, docker, language runtimes). Skip it for pure-knowledge skills
- **Fetch the spec, don't memorize it** — the spec may evolve. When in doubt, fetch https://agentskills.io/specification for current details
## The Knowledge Delta Principle
Two tests for a skill's content:
1. **Would an agent get this wrong without it?** If the agent would produce the wrong outcome, include it.
2. **Would an agent do this differently each time?** If there are multiple valid approaches and you want a specific one followed consistently, include it.
**Include:** user-specific preferences and workflows (the user's preferred approach when multiple valid ones exist), edge cases agents would miss, decision frameworks for ambiguous situations, post-training technology, integration patterns specific to this project.
**Exclude:** basic commands for well-known tools, standard workflows, general best practices, anything expressible as a single sentence (put in CLAUDE.md or equivalent instead), directory structures or file listings discoverable from the filesystem.
**Applying the test honestly:** Claude has a strong tendency to assume it knows whether something is a real problem rather than actually verifying. When evaluating whether guidance is needed, fetch the relevant official docs and check against real behavior before concluding "the agent already knows this." If you skip verification, you will cut guidance that is actually load-bearing.
## Skill Self-Containment
When a skill is loaded, it may be the only guidance the agent has. If the skill needs a piece of knowledge to do its job, that knowledge must be in the skill — not in a sibling skill the agent may not have loaded. Duplicate shared guidance across skills rather than cross-referencing it. Referencing another skill to *route* to it ("for skills, use agent-skills") is fine — that's a handoff, not a dependency.
## Cross-Client Skill Discovery
The AgentSkills spec establishes `.agents/skills/` as the cross-client skill discovery path. Skills placed there are discoverable by all supporting agents without client-specific directories:
| Scope | Path | Purpose |
| ------- | ------------------------------- | ----------------------------- |
| Project | `.agents/skills/<skill-name>` | Cross-client interoperability |
| Project | `.<client>/skills/<skill-name>` | Client-specific only |
When creating or updating a plugin that bundles skills, consider whether any skills are purely knowledge-based and could live in `.agents/skills/` for broader reach. Claude-specific skills (those using hooks, sub-agents, or plugin infrastructure) should stay in `.claude/skills/` or the plugin directory.
## User Preference: `name` and `description` Are Required
The AgentSkills spec requires `name` and `description`; Claude Code treats them as optional. Always include both. Treat them as required regardless of what any individual agent's docs say.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.