.agents/skills/skill-authoring/SKILL.md
Guides the creation, evolution, and validation of skills within the Skill System Foundry ecosystem. Triggers when asked to create a new skill, scaffold a skill from a template, add capabilities to an existing skill, migrate a standalone skill to a router pattern, define a role, write or improve a skill description, set up a manifest, validate a skill against the Agent Skills specification, audit a skill system, bundle a skill for distribution, or decide between standalone and router architectures. Also triggers on questions about skill structure, progressive disclosure, token economy, or cross-platform deployment.
npx skillsauth add milanhorvatovic/skill-system-foundry skill-authoringInstall 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.
Guides the full lifecycle of skill creation and evolution within the Skill System Foundry ecosystem — from initial scaffolding through validation, bundling, and distribution.
This skill encodes the two-layer architecture (skills and roles), the Agent Skills specification compliance rules, and the cross-platform authoring principles that the foundry enforces.
The skill system has exactly two layers:
Dependencies flow strictly downward: roles → skills → capabilities. A capability must never know it is being orchestrated. A role must never reference other roles.
Path 1: orchestration skill → roles → skills (with optional capabilities)
Path 2: skill (standalone or router) → role(s) → skill's capabilities
Start with a standalone skill. Evolve to router + capabilities only when justified.
Use standalone when:
Use router + capabilities when:
Use the scaffolding tool to generate from a template:
cd skill-system-foundry
python scripts/scaffold.py skill <skill-name> --root /path/to/project/.agents
Optional directories are not created by default. Add them when needed:
--with-references — guidance documents--with-scripts — executable tools--with-assets — templates, icons, fontsFor roles:
python scripts/scaffold.py role <role-name> --root /path/to/project/.agents
Every registered skill directory contains a SKILL.md with YAML frontmatter.
Required frontmatter:
name — lowercase + hyphens, max 64 chars, matches directory namedescription — max 1024 chars, third person, states what AND whenOptional frontmatter:
allowed-tools — space-delimited tool namescompatibility — environment requirements (max 500 chars)license — SPDX identifiermetadata — key-value map (author, version, spec)Use folded block scalar (>) for multi-line descriptions to avoid YAML quoting issues.
The body is the Level 2 content — loaded when the skill triggers. Keep it under 500 lines.
Body structure for standalone skills:
references/, scripts/, assets/ with guidance on when to read eachBody structure for router skills:
The description is the primary trigger mechanism. It must be "pushy" — keyword-rich and specific.
Include:
Good: "Manages deployment workflows — runs pre-deploy checks, executes deployments to staging and production, and handles rollbacks. Activates when the user mentions deploying, releasing, or rolling back."
Bad: "Helps with deployments."
Capabilities are optional sub-skills within a parent router. Their entry point is capability.md (lowercase). Capability frontmatter is optional — use it when promotion to standalone is likely.
Only introduce capabilities when:
Place capabilities in <skill>/capabilities/<capability-name>/capability.md.
Each capability must be self-sufficient — an agent loading a capability has enough context to complete the task without reading the router or sibling capabilities. This means:
capability.mdreferences/, scripts/, assets/) by relative path from the capabilityScripts, references, and assets that serve multiple capabilities stay at the skill root — do not duplicate them into capability directories. This is especially important when:
lib/ dependency chain connects entry points (all scripts import from shared modules)architecture-patterns.md) serve multiple capabilitiesassets/ are used across different operationsCapabilities reference shared resources via relative paths (e.g., ../../references/authoring-principles.md). Only create capability-specific resources (under <capability>/references/) when the content is truly exclusive to that capability.
When migrating from standalone to router, large workflow reference files can be dissolved — each section absorbed into the relevant capability. The pattern:
capability.mdreferences/ if neededThis eliminates a layer of indirection: agents load the capability and immediately have the workflow, rather than loading the capability which points to a reference file.
A capability must never reference its parent router or sibling capabilities. The one exception: a capability may include a relative path to another capability when explaining a cross-cutting workflow (e.g., deployment referencing bundling for Claude.ai upload).
A role must:
When orchestration spans multiple roles, a coordination skill (Path 1) sequences them.
Place roles in roles/<group>/<n>.md using system-root-relative paths.
python scripts/validate_skill.py /path/to/skill [--verbose] [--json]
Checks: frontmatter presence, name format and directory match, description length and voice, body line count, reference depth, directory names.
python scripts/audit_skill_system.py /path/to/system-root
Checks: spec compliance across all skills, capability isolation, dependency direction, nesting depth, shared resource usage, manifest consistency.
python scripts/validate_skill.py /path/to/capability --capability
For meta-skills that intentionally use nested references:
python scripts/validate_skill.py /path/to/skill --allow-nested-references
Package a skill as a self-contained zip for Claude.ai upload, Gemini CLI, or offline sharing:
python scripts/bundle.py /path/to/skill \
--system-root /path/to/.agents --output my-skill.zip
Discovery tokens (Level 1 metadata) are always present and expensive. Execution tokens (Level 2-3) are only paid when activated.
Rules:
SKILL.md files leanThree levels of content loading:
Move deep dives into references/. Keep cross-references one level deep from SKILL.md.
Core content (SKILL.md, references/, assets/) stays platform-neutral. Platform-specific details go in extension docs.
Tools that scan .agents/skills/ natively (Codex, Gemini CLI, Warp, OpenCode, Windsurf) need no additional configuration. For others (Claude Code, Cursor, Kiro), create thin deployment pointers — wrappers or symlinks.
| Question | Answer |
|---|---|
| Standalone or router? | Standalone unless 3+ distinct operations with mutually exclusive triggers |
| Add a capability? | Only when decomposition genuinely reduces complexity |
| Add a role? | Only when orchestrating 2+ skills with clear handoff rules |
| Where to put detail? | Router for overview/principles, capabilities for workflows, references/ for deep dives |
| Shared or capability-specific resource? | Shared at skill root if 2+ capabilities use it, capability-level if exclusive |
| Dissolve a reference file? | Yes, when each section maps cleanly to one capability with no overlap |
| How to validate? | validate_skill.py for single skill, audit_skill_system.py for system |
| How to distribute? | bundle.py for zip, npx skills add for direct install |
tools
Greets a recipient through one of two registered tones — formal or casual — by dispatching to a dedicated capability. Activates when the conversation asks for a tone-specific welcome or a switch between formal and casual greetings; use when comparing the two styles. Demonstrates the router pattern in the Skill System Foundry — a thin SKILL.md entry point routing to capability files, with allowed-tools declared in frontmatter so capability shell fences pass validation.
testing
Greets a single recipient with a friendly welcome message rendered in a formal or casual tone. Activates when the conversation asks to say hello or welcome someone; use when a minimal standalone skill is needed. Demonstrates the smallest valid standalone skill in the Skill System Foundry — required name and description frontmatter plus an optional metadata block — and how its layout passes validation.
testing
Designs and evolves AI-agnostic skill systems. Triggers on skill/capability creation, role definition, or router migration; use when auditing consistency or improving token efficiency.
development
Governs the configuration.yaml file that serves as the single source of truth for all validation rules in the Skill System Foundry. Triggers when adding, modifying, or reviewing validation rules, limits, patterns, or reserved words. Also triggers when working with constants.py, yaml_parser.py, or any code that reads from configuration.yaml. Use this skill when asked to add a new validation check, change a limit or threshold, update reserved word lists, add SPDX license identifiers, modify regex patterns, or troubleshoot why a validation rule is not working as expected. Activates on mentions of configuration, validation rules, constants, thresholds, or pattern definitions.