Skip to content

toolboxmd/building-agentskills

Repository files navigation

building-agentskills

Layered authoring patterns for AI agent skills.

Authoring a skill well requires answering three questions:

  1. Who invokes? Agent (auto-trigger by description), user (/skill-name), or both?
  2. What fires on rules? Is each invariant in your SKILL.md decoration (the agent reads and decides) or mechanism (a script, validator exit code, hook, or captured artifact fires on it)?
  3. What is the token budget? Does your skill fit the auto-compaction floor (under ~5,000 tokens / ~500 lines) and the description listing budget?

Read docs/03-three-questions.md end-to-end on first contact. Every other doc here is a destination from one of the three questions.

What this is

A public, layered, cross-platform repository of patterns for authoring AI agent skills. Three layers:

  • Layer 1, agent-skills foundation. The format, frontmatter, progressive disclosure rules. Defined at https://agentskills.io/specification.
  • Layer 2, superpowers conventions. TDD-for-prose, iron laws, rationalization tables, the brainstorming-spec-plan-execute pipeline. Defined in https://github.com/obra/superpowers.
  • Layer 3, this repo. Patterns one stateful skill (karpathy-wiki) discovered in shipping v2.2 that the existing canon does not cover: decoration vs mechanism, prose-as-code, subagent reformatting, TDD inversions.

See docs/00-overview.md for the layered architecture explainer.

Who it is for

Skill authors at any layer. The repo assumes you can find and read Layer 1 and Layer 2 yourself; it contributes the Layer 3 deltas and structures them for cross-platform use.

The audience splits into three groups:

The three blocker docs

These three docs close the audience gap a layered repo would otherwise leave. Read them in order before reading anything else.

  1. docs/01-quickstart.md. Your first skill in 10 minutes.
  2. docs/02-mental-model.md. When is a skill the right primitive at all?
  3. docs/04-token-economics.md. The hard numbers: why the 500-line cap exists, what auto-compaction does, how SessionStart-hook injection cost compounds.

Documentation map

Hero docs

Authoring

Testing

Standalone deep dive and reference

Cross-platform

Case study and example

Loader skill

Contributing

How new lessons enter this repo: per-ship retrospectives, reader-submitted issues, quarterly landscape audits. See docs/12-update-mechanism.md for the case-study shape and the contribution model.

The repo expects every pattern to cite ship evidence (a commit, a verbatim source, a documented failure mode). Aspirational patterns are out of scope; see the case study for what evidence-driven additions look like.

License

Apache 2.0. See LICENSE.

The choice is deliberate. Apache 2.0's explicit patent grant matches the posture of agentskills/agentskills (the spec org's reference implementation, also Apache 2.0) and eases cross-pollination across the ecosystem. This repo's license is Apache 2.0, NOT MIT, even though related skills (like karpathy-wiki) ship under MIT. See docs/09-evolution.md for the license-of-skills nuance.

About

Layered authoring patterns for AI agent skills. Cross-platform spec docs, the three-question framework, mechanism-vs-decoration, anti-patterns, and ship-evidenced case studies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors