skillet

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT

README

Skillet

A Go toolkit for turning prose expertise into verifiable, runtime-neutral Agent Skills.

skillet is the shared kernel behind a family of skill tools (exegesis, skillsaw, modelith). When two of them parse the same SKILL.md or hash the same artifact, they must reach byte-identical answers. skillet provides that logic once, so the tools never drift apart.

Why Use It

  • One identity everywhere. identity.Hash gives a byte-identical content hash across every tool, so hash-pinned manifests cross-check cleanly instead of trusting each tool's word.
  • Deterministic by default. Parsing, scoring, and scanning are pure functions that run entirely in memory. A model handles only what a deterministic check cannot decide, so results stay reproducible and cheap.
  • Auditable verification. A Finding is a static diagnostic tied to a re-runnable Check. A Manifest counts as verified only when every skill passes its gates. A Proof blocks closing until every declared artifact re-hashes to its recorded digest (no-proof-no-close).
  • Enforced runtime neutrality. neutrality.Scan flags the wording or paths that bind a skill to a single agent runtime, the kind that makes other runtimes refuse to install it.
  • Proper Markdown parsing. goldmark parses SKILL.md bodies, so a # inside a code fence never reads as a heading.
  • Small, focused packages. Each one does a single job and depends on little. Take only what you need.

Install

go get github.com/StevenACoffman/skillet

Example

package main

import (
	"fmt"

	"github.com/StevenACoffman/skillet/identity"
	"github.com/StevenACoffman/skillet/judge"
	"github.com/StevenACoffman/skillet/skill"
)

func main() {
	// Load and identify a skill.
	s, err := skill.Load("skills/my-skill")
	if err != nil {
		panic(err)
	}
	fmt.Printf("%s  %s\n", identity.Hash(s.Raw), s.Name)

	// Score model output against deterministic checks.
	res, err := judge.Score("Result: 42", []judge.Check{
		{Op: judge.OpSectionPresent, Arg: "Result"},
		{Op: judge.OpContains, Arg: "42"},
	})
	if err != nil {
		panic(err)
	}
	fmt.Printf("hard=%.0f soft=%.2f\n", res.Hard, res.Soft) // hard=1 soft=1.00
}

Packages

Package Purpose
identity Content-identity hashing shared across tools, so an artifact has one identity everywhere.
skill Load and parse Agent Skills (SKILL.md): frontmatter plus Markdown body.
markdown Structured view of a skill body via goldmark (headings, fences, lists, tables).
ruleset Typed model of a distilled ruleset. Each Rule carries a severity, level, rationale, and ✗/✓ example pair. Render and Parse round-trip.
neutrality Red-light scan that flags runtime-binding wording so a skill installs in any runtime.
finding The one shared diagnostic type (severity, category, path, message) every linter and gate emits.
judge Deterministic rule-judge: hard = all checks pass, soft = fraction passed.
manifest Builds the machine-readable record of a verified skill tree.
proof No-proof-no-close gate: every declared artifact must exist and match its digest.
provenance Reads/writes the header that marks a file as a vendored copy of an upstream artifact.
naming Derives filenames and human titles for the distillation pipeline.
testprompts Conservatively derives judge checks from expected-output prose.
stats Small deterministic statistics (e.g. Wilson score intervals).
ratchet Keep/revert gate and activation confusion matrix for optimization loops.
auditlog Reads/writes the optimization log (results.tsv).
errs Shared error type with machine-readable codes (leaf/wrapper convention).
atomicfile, fsutil Atomic writes and fs.FS-shaped filesystem helpers.

See skillet.modelith.md for the full domain model.

License

See LICENSE.

Directories

Path Synopsis
Package atomicfile contains code related to writing to filesystems atomically.
Package atomicfile contains code related to writing to filesystems atomically.
Package auditlog reads and writes the optimization log (results.tsv): one baseline/keep/revert/error row per experiment, nine tab-separated columns.
Package auditlog reads and writes the optimization log (results.tsv): one baseline/keep/revert/error row per experiment, nine tab-separated columns.
Package errs is skillet's shared error type: one Error with machine-readable codes, following Ben Johnson's leaf/wrapper convention.
Package errs is skillet's shared error type: one Error with machine-readable codes, following Ben Johnson's leaf/wrapper convention.
Package finding is skillet's shared diagnostic type: one Diagnostic that any linter or gate emits, carrying a Severity, an optional Category, an optional location Path, and a human Message.
Package finding is skillet's shared diagnostic type: one Diagnostic that any linter or gate emits, carrying a Severity, an optional Category, an optional location Path, and a human Message.
Package fsutil provides small, filesystem-shaped helpers shared by skillet tools.
Package fsutil provides small, filesystem-shaped helpers shared by skillet tools.
Package identity provides content-identity hashing shared across skillet tools.
Package identity provides content-identity hashing shared across skillet tools.
Package judge is the deterministic rule-judge for behavioral scoring.
Package judge is the deterministic rule-judge for behavioral scoring.
Package manifest builds the skills-manifest.json a verify pass emits: a machine-readable summary of a verified skill tree that downstream tools read instead of rediscovering it.
Package manifest builds the skills-manifest.json a verify pass emits: a machine-readable summary of a verified skill tree that downstream tools read instead of rediscovering it.
Package markdown parses a SKILL.md body into a small structured view, using goldmark (the established Go Markdown parser) instead of hand-rolled regexes.
Package markdown parses a SKILL.md body into a small structured view, using goldmark (the established Go Markdown parser) instead of hand-rolled regexes.
Package naming derives filenames and human titles for the distillation pipeline: a source markdown file's title, and the *_rules.md / *_prompt.md output names beside it.
Package naming derives filenames and human titles for the distillation pipeline: a source markdown file's title, and the *_rules.md / *_prompt.md output names beside it.
Package neutrality implements the runtime-neutrality red-light scan shared by skillet tools.
Package neutrality implements the runtime-neutrality red-light scan shared by skillet tools.
Package proof verifies a proof packet under NO-PROOF-NO-CLOSE: every declared artifact exists on disk and its bytes hash to the recorded digest.
Package proof verifies a proof packet under NO-PROOF-NO-CLOSE: every declared artifact exists on disk and its bytes hash to the recorded digest.
Package provenance reads and writes a comment header that marks a file as a vendored copy of an artifact whose home is another repository, and computes the content digest that header records.
Package provenance reads and writes a comment header that marks a file as a vendored copy of an artifact whose home is another repository, and computes the content digest that header records.
Package ratchet is the acceptance machinery of a darwin-style optimization loop: the keep/revert gate (gate.go) and the activation confusion matrix that feeds it a trigger-accuracy signal (activation.go).
Package ratchet is the acceptance machinery of a darwin-style optimization loop: the keep/revert gate (gate.go) and the activation confusion matrix that feeds it a trigger-accuracy signal (activation.go).
Package ruleset is the typed model of a distilled ruleset: a set of Rules, each an imperative with a severity, a level, a rationale, a ✗/✓ example pair, and an optional ↦ source anchor.
Package ruleset is the typed model of a distilled ruleset: a set of Rules, each an imperative with a severity, a level, a rationale, a ✗/✓ example pair, and an optional ↦ source anchor.
distill
Package distill generates the per-source distillation prompts: for each Markdown source under a tree it fills a template with links to the source and to the rules file it should produce, and writes a *_prompt.md beside the output directory.
Package distill generates the per-source distillation prompts: for each Markdown source under a tree it fills a template with links to the source and to the rules file it should produce, and writes a *_prompt.md beside the output directory.
synthesize
Package synthesize assembles distilled rulesets into a single synthesis prompt: it replaces a template's {{RULESETS}} marker with one <ruleset> block per input.
Package synthesize assembles distilled rulesets into a single synthesis prompt: it replaces a template's {{RULESETS}} marker with one <ruleset> block per input.
Package skill loads and parses Agent Skills ("SKILL.md") files — the unified loader shared by exegesis and skillsaw.
Package skill loads and parses Agent Skills ("SKILL.md") files — the unified loader shared by exegesis and skillsaw.
Package speclint validates an Agent Skill's frontmatter against the agentskills.io skill spec.
Package speclint validates an Agent Skill's frontmatter against the agentskills.io skill spec.
Package stats holds the small deterministic statistics skillet tools need.
Package stats holds the small deterministic statistics skillet tools need.
Package testprompts is skillet's reader and gate for the test-prompts.json contract shared by exegesis and skillsaw.
Package testprompts is skillet's reader and gate for the test-prompts.json contract shared by exegesis and skillsaw.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL