SkillSpec is a DSL that adds types, contracts, composition, and tests around agent skills, then compiles back down to the same SKILL.md that existing runtimes already understand. Once a skill works and you want to make it production-ready, you codify it into a .agent file and get versioning, structural diffs, type checking, and a path to CI/CD.
README
There's a growing trend of encoding complex workflows into agent skills (SKILL.md, Cursor rules, etc). Works great until you try to merge them, version them, collaborate on them, or run any kind of CI. Markdown is a brilliant authoring format. As a production system format it's pretty brittle.
SkillSpec is a DSL that adds types, contracts, composition, and tests around agent skills, then compiles back down to the same SKILL.md that existing runtimes already understand. Once a skill works and you want to make it production-ready, you codify it into a .agent file and get versioning, structural diffs, type checking, and a path to CI/CD.
The minimal skill is three lines:
skill "hello" {
context { "Greet the user warmly." }
}
That compiles, type-checks, and works. Everything else is opt-in.
type Issue {
severity: enum("critical", "warning", "info")
message: string
line_hint: int
}
skill "linter" {
input {
file: string
focus?: enum("types", "context", "all") = "all"
}
output {
issues: Issue[]
}
}
Types compile to contract language in the SKILL.md. The contract is advisory today (the LLM reads it as instruction, not enforced signature) but it can't go stale without the compiler noticing.
Steps form a DAG. The compiler checks for cycles, finds topological order, flags unreachable steps.
step analyse {
context { "Read the file and understand its structure." }
}
step review {
requires analyse
when input.focus == "all" || input.focus == "types"
context { "Check for type correctness." }
}
step synthesise {
requires review
emit output
context { "Combine all findings." }
}
Rename a step and every broken requires is a compile error.
Every context block has a priority flag (critical, important, supplementary, optional). Higher priorities survive when the t