AGENT SKILL

skill-creator

Create/edit/audit/eval golem skills. Triggers: create skill, skill eval, live eval, JSONL mining.

License 许可
Apache-2.0
所属仓库
EtanHey/golems
最近更新
2026-11-15
Stars
★ 0
Forks
0

01 前言 Front Matter

name
skill-creator
description
Create/edit/audit/eval golem skills. Triggers: create skill, skill eval, live eval, JSONL mining.

02 资源文件 64

03 SKILL.md 正文

Skill Creator

Take skills from "drafted" to "proven" through rigorous multi-layer evaluation.

Installation

bash $HOME/.golems/skills/golem-powers/skill-creator/scripts/install.sh

The installer is idempotent — safe to re-run. It:

  1. Symlinks the skill into ~/.claude/skills/skill-creator (golem-powers convention)
  2. Ensures $SKILL_CREATOR_REPO/.claude/agents/, $SKILL_CREATOR_REPO/.codex/agents/, and $SKILL_CREATOR_REPO/scripts/ exist as the project-scope home
  3. Symlinks the session-miner agent definition into the project-scope agents dir (gates the sub-agent so only skillCreator-family sessions can spawn it)
  4. Symlinks the parser into the project-scope scripts dir
  5. Symlinks the skill-creator agent (agents/skill-creator.md) into ~/.claude/agents/skill-creator.md — global scope, so any repo's Claude can dispatch Agent(subagent_type="skill-creator"). A hand-placed regular file there is moved to ~/.claude/agents/.skill-creator.md.bak-<YYYYMMDD> first; skill-creator-backup.md is reported and never touched

Every target is under $HOME, so HOME=<dir> bash scripts/install.sh installs into a scratch home (the tests in tests/ do this). Project-scope steps run only when $HOME/Gits/skill-creator is itself a Git checkout. If it is absent or a plain directory, the installer skips those steps and still installs the global skill and agent.

Run bash scripts/install.sh --dry-run to preview without changes. bash scripts/install.sh --help for usage.

Core Loop: DRAFT → EVAL → RED → GREEN → SMOKE → SHIP

Every skill change goes through this pipeline. No exceptions.

1. DRAFT — Understand the Skill

  • Read the SKILL.md or MCP tool definition completely
  • brain_search for: prior evals, user complaints, known issues, related skills
  • Identify: what does this skill claim to do? What's the baseline without it?
  • Document intent, inputs, outputs, edge cases
  • Classify: capability uplift (may become obsolete) vs encoded preference (durable)
  • Load first, then follow (references/placement-vs-wording.md):
    • If the user never says the trigger words, the skill needs placement to load: a ROUTE row, or a hook for a deterministic input shape (a link, a file type). Description wording alone barely moved it in E2/E3 (cheaper-tier 0/30); results are model-specific (skill study 2026-11-02: on the Claude lead tier, /large-plan loaded 10/30 with the old ROUTE row and 30/30 with R3's precisely rewritten row).
    • Once the text is loaded, precise, case-specific wording is the lever. Measure it per case.

2. EVAL DESIGN — Create Structured Test Cases

Design eval cases as structured JSON in evals/evals.json:

{
  "id": 1,
  "name": "descriptive-kebab-name",
  "category": "compliance|structure|quality",
  "description": "What this eval tests",
  "prompt": "The input scenario given to the agent",
  "assertions": [
    {
      "type": "tool_usage|content|negative",
      "name": "assertion-name",
      "description": "What correct behavior looks like"
    }
  ]
}

Cover: happy path, edge cases, failure modes, interaction with other skills. See references/scoring-rubric.md for scoring methodology.

3. RED — Baseline Measurement (without skill)

  • Run each eval WITHOUT the skill loaded
  • Score baseline performance across all eval cases
  • Document baseline scores
  • Gate: If baseline >70%, the skill may not be adding value — flag it

4. GREEN — With-Skill Measurement

  • Run each eval WITH the skill loaded
  • Score delta between with_skill and without_skill
  • Gate: Delta <10% = marginal, consider retiring. Delta >30% = clearly valuable.
  • Maximum 3 iterations before flagging for human review

5. SMOKE — Live Agent Testing

Two tiers based on skill importance:

Tier A: Static Smoke (all skills)

  • Review evals.json assertions manually
  • Verify no contradictions between skill instructions and assertions
  • Check that strongest discriminators are tested

Tier B: Live Agent Smoke (flagship skills only)

  • Run live-eval-runner.sh for top 3 discriminator evals
  • Agent routing: bounded Claude in-process/headless tests → claude.subagent.cheap; visible or decision-grade Claude tests → claude.judgment; code tests → codex.implement; audits → Cursor
  • Compare captured output against assertions
  • Gate: Live delta must be within 15% of static delta
  • Results stored in evals/results/live-{date}.json and brain_store'd

See workflows/live-eval.md for the full live eval workflow.

6. SHIP — Package and Document

  • Ensure every skill ships with its evals (no eval = no ship)
  • brain_store eval results, delta scores, issues found
  • Update skill metadata (version, last-eval-date, compliance-score)
  • Follow workflows/create-skill.md and workflows/audit-skill.md for SKILL.md structure compliance before shipping structural changes.
  • REGISTER a NEW skill — committed ≠ installed. A new golem-powers skill is invisible to every agent until it's symlinked into ~/.claude/skills/<name> (never ~/.claude/commands/; run golem-install, which auto-discovers + links every golem-powers/*/ dir; or symlink the one new skill). Then VERIFY it appears in the available-skills list — committing/merging does NOT register it. (2026-05-30: /weave was committed + merged but unusable by any agent until the symlinks existed. See workflows/create-skill.md "Final Step: REGISTER".)

Declaring Required Environment Variables

Add optional requires: frontmatter only when a skill cannot do its job at all without an environment variable:

requires:
  - FILE_HOST_TOKEN

List variable names (^[A-Z][A-Z0-9_]*$), never secret values. The declaration and runtime behavior are two halves of one contract: lint proves the metadata is well-formed, but the skill body must fail loud when a requirement is missing. Carry this one-line instruction in the body:

If FILE_HOST_TOKEN is unset, tell the user and stop. Do not guess, improvise a fallback, or report partial success.

Eval Methodology

with_skill vs without_skill comparison is MANDATORY. No exceptions.

Eval Result Provenance — Validity Gate

No provenance = no eval. Every static or live eval result MUST record one provenance entry per agent or eval arm with:

Field Required value
model_requested Alias or model ID requested by the caller
model_effective Model ID observed at runtime
effort_effective Effort observed at runtime
model_observation_source CLI status line, session JSONL model field, or API response metadata
effort_observation_source CLI status line, session JSONL effort field, or API response metadata

model_effective must be the concrete runtime ID, not a floating alias or friendly display label, and uses an ID token with no whitespace. Observation sources begin with the exact case-sensitive labels shown above; append details after :, -, —, or ( when useful.

JSON records use eval-result-provenance.schema.json. Markdown records use an ## Eval Provenance table with these fields plus an agent_or_arm column. Examples inside fenced code blocks are not evidence.

When runtime observation was impossible, the corresponding value and source MUST say NOT DETERMINED; omission, inference, and silent fallback are invalid. This is valid honesty but the checker marks the result NON_COMPARABLE; it cannot support a cross-arm/model delta claim. A NON_COMPARABLE record that contains any score, delta, or positive comparability claim is mechanically INVALID, not merely discouraged by prose. Pre-contract historical results may use provenance: alias-only and are also non-comparable; an alias-only record that carries a score, delta, or positive comparability claim is likewise INVALID. New results may not use that historical escape.

Before publishing or citing a score/delta, run the checker with --require-comparable. Exit 0 means comparable evidence, exit 3 means honest retained history that cannot carry the claim, and exit 1 means invalid input. Run the mechanical provenance check in workflows/audit-skill.md before scoring. An invalid result is not evidence and receives no score, delta, or verdict.

The requested alias is insufficient: cmuxlayer spawn_agent.model has a confirmed defect that silently drops non-alias models while reporting them honored. A requested model records intent, not runtime outcome—the same false surface class as delivered:true or exit 0 without live verification.

Behavioral Compliance Scoring

Weight Dimension What it measures
70% Compliance Does the agent follow the skill's instructions?
20% Structure Does the output match expected format?
10% Quality Is the output actually good/useful?

Model floor: judge at the lowest passing tier

"if a model cannot get past like what is it like 60% of completion rate then the model is probably too low and we should try a smarter model" (Etan, 2026-11-13, dashboard card 8, dictated, on golems #1226's "10 to 18 out of 28").

A model that passes under about 60% of a skill's eval with the skill loaded is below that role's tier. Rerun the same cases one tier up (T1 → T2 → T3, as mapped by skill-creator npm run eval -- run --tier) before judging the skill text. Read every threshold below at the lowest tier where the with-skill arm passes at least 60%, and report that tier with the eval, beside the per-case lowest passing tier (LPT) from skill-creator npm run eval:summarize -- --ladder. The floor says only to try a smarter model. If no tier up to T3 clears about 60%, report "no passing tier" and investigate the cases, the scorer, the run and the skill text before concluding; never assert the cause from the floor alone.

Scoring Thresholds

Condition Action
With-skill pass rate <60% below T3 Model below the role's tier — rerun one tier up before judging the text
No tier up to T3 clears ~60% Report "no passing tier" — investigate cases, scorer, run and skill text before concluding
Baseline >70% Skill may not add value — flag and explain
Delta <10% Marginal — consider if complexity is worth it
Delta >30% Clearly valuable — ship with confidence
Compliance <50% with skill, at a tier that clears the floor Instructions unclear — rewrite before shipping

Agent Routing for Live Evals

Skill type Test with Why
Bounded Claude behavior skills claude.subagent.cheap In-process or permitted headless tests only
Visible or decision-grade Claude behavior claude.judgment Full panes retain the bare launcher pin
Code implementation skills See /agent-routing § Routing rules (SSOT) Tests code quality
Audit/review skills See routing pointer above Tests review thoroughness

Resolve model/alias with node scripts/model-roles.mjs <role> --field model|alias (one field) from the golems checkout. Keep substitutions in commands; choose effort per /large-plan phase with a why and pass explicitly at dispatch. Never use the mechanical candidate before its bench.

Workflows

Workflow When to use
create-skill.md Creating a new skill from scratch
audit-skill.md Auditing existing skill structure, scripts, workflows, and registration before deploy
live-eval.md Running live A/B tests with real agents
ab-compare.md Comparing skill versions or platforms
mine-session.md Mining a Claude Code session JSONL into a 10-section markdown digest (handoff docs, EOD waves, claim verification)

References

Reference Content
scoring-rubric.md Full scoring methodology and rubric
placement-vs-wording.md Which lever moves a skill: placement (ROUTE row, hook) to get it LOADED; precise wording once loaded. E2/E3 numbers and T3 Code PR #27368 (closed; eval table in its body). READ BEFORE any trigger or description change.
subagent-vs-skill.md Classification reference — READ BEFORE SCAFFOLDING any new capability. Distinguishes skill (slash-triggered, parent-context) from sub-agent (name-spawned, isolated-context). Documents the misroute pattern (GitHub openai/codex#18823) that even Codex itself routinely makes.

Integration with Other Skills

  • /cmux-agents — spawning live eval agents in cmux panes
  • /never-fabricate — Read() every file before reporting results
  • /pr-loop — shipping skill changes through the full PR lifecycle

Packaged Sub-Agents (skill-creator family only)

These sub-agents ship in BOTH Claude and Codex formats. They are invokable only from sessions with cwd inside $SKILL_CREATOR_REPO/ (i.e., skillcreatorClaude, skillcreatorCodex, or a repoGolem session rooted there). Sessions in other repos cannot spawn them directly — they must dispatch a skillCreator first.

Canonical source-of-truth lives in this skill's agents/ dir. scripts/install.sh symlinks them into the project repo's project-scope dirs (.claude/agents/ for Claude, .codex/agents/ for Codex). The dual-format packaging means the same sub-agent is available regardless of whether the parent is Claude Code or Codex CLI.

Sub-agent Claude format Codex format Workflow
session-miner agents/session-miner.md (model: inherit) agents/session-miner.toml (model: gpt-5.3-codex-spark) mine-session.md

The skill-creator agent itself (agents/skill-creator.md, Claude format only) is the exception to this scope: scripts/install.sh links it into the global ~/.claude/agents/, because it is the agent dispatched from any repo.

Both formats invoke the same deterministic parser at scripts/session-miner.py. The Claude format uses subagent_type="session-miner" via the Agent tool; the Codex format is referenced by name in natural-language prompts (session_miner, mine X to Y).

For when to choose sub-agent vs skill: see references/subagent-vs-skill.md.

Critical Rules

  1. Never claim "tests pass" without running them. Read actual output.
  2. Every skill ships with evals. No eval = no ship.
  3. brain_search BEFORE starting work — someone may have already evaluated it.
  4. brain_store AFTER completing work — results, delta scores, decisions.
  5. Max 3 iterations per skill before flagging for human review.
  6. Read() every file you cite. No citing from compacted summaries.
  7. Sequential skill compounding — build skills one at a time, each learning from the last.

04 同仓库更多 Skills