Building deterministic skills
Meta Agent Skill: author deterministic, weak-model-friendly Agent Skills validated against the Hermes runtime. agentskills.io-compliant, with validators and source grounding.
npx -y skills add srinitude/building-deterministic-skillsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Build deterministic Agent Skills that weak models can execute without guessing. Use when the user says "build a deterministic skill", "make an agentskills.io-compliant skill", "validate a skill with skills-ref", "make the skill easy for dumb models", "write a skill generator", "add skill evals", or "make a skill the dumbest model can follow", even if they do not say "Agent Skills" explicitly. Do NOT use for ordinary prose editing, pure trigger-phrase tuning, non-skill prompt engineering, or generic documentation tasks.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
18.7 KB, as published. Nobody here has run it
Building deterministic, dumb-model-friendly Agent Skills
CRITICAL RULES (read first)
- Preserve both targets: the skill you write must pass the agentskills.io validator (
skills-ref) and the skill it generates must be easy for weak models to follow. - Front-load and book-end every generated skill's critical rules. Put the rules near the top, then repeat the final self-check at the bottom.
- Use defaults-not-menus. Choose one default path for the workflow; put exceptions in Gotchas.
- Use procedures-over-declarations. Write numbered steps and exact commands, not broad advice.
- Offload math/counting/exact string checks to scripts. Do not rely on model arithmetic.
- Add an INSUFFICIENT CONTEXT escape hatch when missing facts would otherwise cause hallucination.
- Use conditional progressive disclosure: say exactly when to load each reference, asset, script, and eval.
- Validate every claim with a command before returning to the user.
Gotchas
- Dumb models lose rules buried in the middle. Keep load-bearing rules in
SKILL.md, not only in references. - Too many choices create failure. A single safe default beats a menu of options.
- Ambiguous terms drift. Use one-term-per-concept and repeat that term exactly.
- Free-form output varies. Provide output templates for fixed formats.
- Long skills rot context. Move details to
references/dumb-model-authoring.mdwith explicit load triggers. - A security/lint scanner may warn on documented commands or research artifacts. Keep documented shell snippets minimal and store raw research under
reports/so the shipped skill body stays clean. When a real-but-flagged literal trips the scanner to adangerousverdict, readreferences/security-scanner-false-positives.mdfor the faithful neutralization techniques (invisible<wbr>in prose, adjacent-string splits in code, quarantine of non-instructional noise) and the self-corruption pitfall. - A
dangerousscanner verdict on legitimate docs/tooling is usually a threat-pattern LITERAL (curl … | sh,~/.agent/config.yaml,os.getenv("…KEY"),setuid,/etc/passwd), not a real threat. Neutralize faithfully and NEVER run a guard-sanitizer over its own engine scripts. NEVER<wbr>a copy-pasteable shell command (it corrupts the copy) — restructure it instead (REQ="…$KEY"thencurl "$REQ"; download-then-run installers;$(printf '.env')for env-path literals). When bulk-conforming, mechanical boilerplate passes gates but produces low-quality skills a reviewer rejects — hand-author each skill from its pristine source with skill-specific content, and keep every original H2 (even host-named ones like## <Host> Integration Notes) + trigger phrase verbatim for coverage. Readreferences/scanner-false-positives-and-bulk-conformance.md.
When to use
Use this skill when the user wants a deterministic Agent Skill package that is:
- agentskills.io compliant (passes the canonical
skills-refvalidator); - portable across any agent runtime that loads Agent Skills (no dependency on one host);
- structured so small, quantized, distilled, low-reasoning, sycophantic, hallucination-prone, context-rot-prone models can still execute it;
- packaged with
references/,scripts/,assets/, andevals/when those resources are required.
Do not use this skill for ordinary prose editing, standalone documentation, pure description optimization, or skills that intentionally rely on model creativity.
Mandatory directory layout
skill-name/
├── SKILL.md
├── references/ # load only when a named condition says to load it
├── scripts/ # deterministic validators and helpers
├── assets/ # templates, schemas, fixtures, skeletons
└── evals/ # trigger, anti-trigger, and functional cases
Any file referenced from SKILL.md must live in one of those four directories. Keep file references one level deep when possible.
Frontmatter rules (agentskills.io specification)
- File starts at byte 0 with
---and closes frontmatter with\n---\n. nameis 1-64 characters, lowercase letters/digits/hyphens only, must not start or end with a hyphen, must not contain consecutive hyphens (--), and equals the parent directory name (compared after NFKC normalization).descriptionis 1-1024 characters, imperative, and includes what the skill does plus when to use it.descriptionincludes at least six quoted trigger phrases and one explicitDo NOT use forclause naming at least two neighboring task types or skills.licenseis present.compatibilityappears only when environment requirements exist and stays under 500 characters.- Only these top-level frontmatter fields are allowed by the agentskills.io spec:
name,description,license,allowed-tools,metadata,compatibility. Put EVERYTHING else (version,author,tags,related_skills,dependencies,platforms, etc.) insidemetadata:. A top-levelversion:orauthor:fails the canonicalskills-refvalidator. - Keep
SKILL.mdbody at or below 500 lines (the agentskills.io body-length guidance — under ~5000 tokens recommended); move detail intoreferences/. The spec sets no hard total-character cap, but individual runtimes may; keep the body lean regardless.
Dumb-model output contract for generated skills
Every skill produced with this skill must include all items below.
- A
## CRITICAL RULESsection within the first 80 body lines. - A
## Gotchassection inSKILL.mdwith concrete failure corrections. - A numbered workflow with exact commands and no branching menus.
- Front-loaded-AND-book-ended critical rules.
- Defaults-not-menus for every ambiguous choice.
- Procedures-over-declarations for every reusable task pattern.
- An INSUFFICIENT CONTEXT escape hatch that names the missing field and stops instead of guessing.
- Output templates for fixed-format deliverables.
- Offloading math/counting to scripts for all counts, hashes, line totals, schema checks, and exact string validation.
- Conditional progressive disclosure instructions that name the exact in-skill reference file only after that file exists.
- One-term-per-concept naming across the description, workflow, scripts, and reports.
- A final verification checklist that repeats the critical safety and validation checks.
Read references/dumb-model-authoring.md before changing this output contract. Start new generated skills from assets/dumb-model-skill-skeleton.md when the user has not supplied a stronger template. The research spine behind this contract is bundled in references/: read references/dumb-vs-smart-factor-research.md for the factor→countermeasure synthesis, and references/llm-smart-vs-dumb-factors.md plus references/writing-agent-skills-for-dumb-models.md for the full evidence and citations.
Ordered workflow
- Read the user's artifact and identify the one skill root to create. If no artifact, skill name, or task is supplied, output
INSUFFICIENT CONTEXT: <missing field>and stop instead of inventing a skill. - Create
SKILL.md,references/,scripts/,assets/, andevals/in that skill root. - Write the description first, then verify it has six quoted trigger phrases and a
Do NOT use forclause. - Write
## CRITICAL RULES,## Gotchas, and the numbered workflow before adding long references. - Add conditional reference pointers only after the referenced file exists.
- Put mechanical checks into scripts and make every script support
--self-test. - Add
evals/evals.jsonwith trigger, anti-trigger, and functional cases. - Run every validation command in the Validation pipeline section.
- Fix each failing command, then rerun the same command.
- Return only after all checks pass and the final report includes command evidence.
Validation pipeline
- agentskills.io compliance: run the canonical reference validator —
skills-ref validate ./<skill>(fromgithub.com/agentskills/agentskills). Only the allowed top-level frontmatter fields may appear (name,description,license,allowed-tools,metadata,compatibility); fix every reported error. - Frontmatter (offline): run
scripts/check-skill-frontmatter.py— it mirrors the canonical rules (byte-0 frontmatter, name matches parent directory, name format, description ≤ 1024, compatibility ≤ 500, closed field set, non-empty body) with no external dependency. - Description quality: require
Use when, at least six quoted trigger phrases, oneDo NOT use forclause, and length at or below 1024 characters. - Dumb-model coverage: run
scripts/check-dumb-model-coverage.py(it reads the research bundled inreferences/llm-smart-vs-dumb-factors.mdandreferences/writing-agent-skills-for-dumb-models.mdby default — no external paths required). - Self-application readability: run
scripts/check-dumb-model-readability.py SKILL.md. - Preserved invariants: run
scripts/check-preserved-invariants.py(confirms the dumb-model contract terms and at least eight numbered pitfalls survive any edit). - Content preservation (when rewriting/conforming an existing skill): run
scripts/check-content-preserved.py --skill <new> --backup <original>so that no command line, list item, or inline-code token from the original was silently dropped. Add--strictfor mechanical/bulk conformance where no rewording is intended. A reportedMISSINGunit is either reworded (confirm the meaning survives) or must be restored — never lose context, content, meaning, or intent relative to the original. - Source grounding: run
scripts/check-source-grounding.pyafter the Firecrawl map and scrape artifacts exist. - Determinism: run
scripts/check-determinism.pyand require byte-identical--self-testoutput for every script. - No dead links: run
scripts/check-no-dead-links.py. - Report grounding: run
scripts/check-report-grounding.pyafter the change report exists.
Output template
When you finish, return the result in exactly this shape (fill every line; do not add prose around it):
Skill: <skill-name> at <absolute skill dir>
Shape: CRITICAL RULES + Gotchas + numbered workflow + Output template + book-end checklist present
Validation pipeline (each PASS/FAIL with evidence):
- skills-ref validate: <PASS/FAIL>
- check-skill-frontmatter: <PASS/FAIL>
- check-dumb-model-coverage: <PASS/FAIL>
- check-dumb-model-readability: <PASS/FAIL>
- check-preserved-invariants: <PASS/FAIL>
- check-source-grounding / check-determinism / check-no-dead-links / check-report-grounding: <PASS/FAIL>
Files created/changed: <comma-separated absolute paths>
Assumptions: <INSUFFICIENT CONTEXT items, or "none">
Description-quality checklist
The description is the activation surface. It must contain:
- Imperative
Use whenwording. - At least six quoted trigger phrases users actually say.
- One explicit
Do NOT use forclause naming at least two related task types or skills. - A hedge such as
even if they do not say "Agent Skills" explicitly. - What the skill produces and when to activate it.
- No XML angle brackets in field values.
- Length at or below 1024 characters.
- One-term-per-concept vocabulary aligned with the body.
Community skill adoption
When adopting a third-party skill repository into a local skill library, follow references/third-party-skill-adoption.md only after the official installer has been tried and scan findings have been classified.
Standalone productized skill repositories
When the user wants a deterministic agentskills.io skill built, tested, pushed, and versioned as a standalone repo, follow references/productized-agent-skill-release.md. Keep the dumb-model output contract above in force while following that release chronology.
Model × use-case skill evaluation matrices
When the user asks to generate skills across many models, compare determinism by model, or run a nested model/use-case skill benchmark, load references/model-skill-matrix-evals.md before starting the loop. First enumerate the matrix, compute model-call count and measured pilot timing, then run a small pilot and gate the exhaustive run on explicit budget/scope confirmation. Use JSON-only canonicalized invocation outputs for determinism; raw prose hashes are useful diagnostics but not sufficient.
Common pitfalls
-
Putting referenced files outside the four resource directories. Move them into
references/,scripts/,assets/, orevals/and update the pointer. -
Letting generated skills hide critical rules in a reference. Keep CRITICAL RULES and Gotchas in
SKILL.md. -
Offering menus in workflows. Pick the default path and put exceptions in Gotchas.
-
Asking the model to count, hash, diff, sort, or validate exact strings in its head. Write a script.
-
Using inconsistent names for the same concept. Pick one term and reuse it everywhere.
-
Writing a description with too few trigger phrases. Six realistic phrases is the minimum.
-
Writing a long SKILL.md without conditional progressive disclosure. Move details to a reference and say when to read it.
-
Putting disallowed fields at the top level of frontmatter. Keep only
name,description,license,allowed-tools,metadata,compatibilityat the top; nest everything else undermetadata. -
Deleting
references/third-party-skill-adoption.mdorreferences/productized-agent-skill-release.md. These are still wired to important workflows. -
Treating a caution verdict from a security scanner as automatic failure. Classify findings; documented commands and research artifacts are usually safe — neutralize or relocate noisy raw artifacts rather than deleting capability.
-
Using broad advice without examples. Replace it with a numbered procedure and an output template.
-
Forgetting to book-end critical rules. Repeat the final self-check in the verification checklist.
-
Panic-deleting capability when a scanner says
dangerous. Classify first: acautionverdict that the scanner's install policy still permits is fine. Critical findings on docs/tooling are threat-pattern LITERALS — neutralize faithfully (invisible<wbr>in prose, adjacent-string splits in code, reword path-literals in trigger phrases) or quarantine non-instructional noise (vendored deps, binaries, research caches). Seereferences/scanner-false-positives-and-bulk-conformance.md. -
Running a guard-sanitizer over its own engine scripts. It inserts
<wbr>into the very regex/replace literals it scans for (setuid→set<wbr>uid) and silently breaks detection with no error. Keep the conformance build engine OUTSIDE any scanned skill directory. When bulk-conforming many existing skills, also: back up first, derive targets from live discovery, keep the conform step content-preserving (never delete original body/triggers/H2s), and make the orchestrator idempotent + resumable via a ledger. -
Starting an exhaustive model × use-case skill benchmark before sizing the matrix. Model pickers can expose hundreds of models; a harmless-looking nested loop can become tens of thousands of paid calls. Load
references/model-skill-matrix-evals.md, compute combinations and call counts first, run one pilot, and ask for explicit scope/budget confirmation before the full run. -
Calling raw prose outputs deterministic because they agree semantically. Record semantic agreement, but for benchmark determinism require JSON-only fixed-key outputs and canonical hashes. Strip ANSI/session/worktree wrapper text from agent-CLI output before checking byte-0 frontmatter or raw hashes.
-
Losing original content/meaning/intent when rewriting or conforming an existing skill. Trigger-phrase + heading coverage is necessary but NOT sufficient — a rewrite can still silently drop a command, a hard-won gotcha bullet, or an exact flag. Run
scripts/check-content-preserved.py --skill <new> --backup <original>(add--strictfor mechanical conformance) and resolve everyMISSINGunit: confirm it was reworded with the meaning intact, or restore it.
Before you finish (book-end)
- Did the generated skill front-load critical rules and repeat them in the final checklist?
- Did the generated skill include Gotchas, defaults-not-menus, output templates, one-term-per-concept, and INSUFFICIENT CONTEXT?
- Did every count, hash, exact string check, and link check run through a script?
- Did every reference pointer name the condition that triggers loading it?
- Did every validation command run and pass?
Verification checklist
-
skills-ref validate ./<skill>reports no errors (agentskills.io compliant). -
scripts/check-skill-frontmatter.pypasses forSKILL.md. -
scripts/check-preserved-invariants.pyconfirms the preserved dumb-model contract and at least eight numbered pitfalls. -
references/dumb-model-authoring.mdexists and is linked fromSKILL.md. - The generated-skill output contract requires front-loaded-AND-book-ended critical rules, Gotchas section, defaults-not-menus, INSUFFICIENT CONTEXT, output templates, offloading math/counting to scripts, and conditional progressive disclosure.
-
scripts/check-dumb-model-coverage.pypasses against the bundledreferences/llm-smart-vs-dumb-factors.mdandreferences/writing-agent-skills-for-dumb-models.md. -
scripts/check-dumb-model-readability.py SKILL.mdpasses. - Only allowed top-level frontmatter fields are present (
name,description,license,allowed-tools,metadata,compatibility); everything else is nested undermetadata. -
scripts/check-source-grounding.pypasses for the Firecrawl map and scrape ledger. -
scripts/check-determinism.pypasses. -
scripts/check-no-dead-links.pypasses. -
scripts/check-content-preserved.pyreports no unresolvedMISSINGunits when an existing skill was rewritten or conformed (no content/meaning/intent lost). -
scripts/check-report-grounding.pypasses after the change report exists. - Final report records before and after sha256 values and rejected tradeoffs.
- Critical rules stayed front-loaded and book-ended in the generated skill contract.