OR Key
drop another .md file to compare - side-by-side diff against audit14-eval-snapshotter

audit14-eval-snapshotter

description: "Triggers on prompt mention of 'audit14-eval-snapshotter'."
personal 2 files

What it does for you

This skill does one job for you, the same careful way every time.

What it produces

A recent result, so you can see the kind of work it returns.

loading…

How to get it

These run inside the Snappy workspace. Want this working in your business? I set skills like this up with you, in one focused week.

Work with me
For developers how this skill is built, graded, and how it runs

at a glance- the short version

eval modeauto-shape

what's inside - the parts that make up a skill 2/4 present

A skill is just a few plain-text files. Only the main one is required. The rest are optional, added as the work needs them. This is what the skill is made of; how it runs is just below.

The skill
state/skills/audit14-eval-snapshotter/SKILL.md present
the skill itself, in plain text
The main file. It says what the skill is and lays out the steps in plain English.
Code
state/lib/audit14-eval-snapshotter.ts not present
code the skill can run
Optional. Many skills are just words and need no code at all.
Scripts
state/bin/audit14-eval-snapshotter/ not present
helper scripts
Optional. Added when a skill has a few commands to run.
Loader
state/skills/audit14-eval-snapshotter/AGENTS.md present
what the AI loads on the fly
Loaded automatically the moment this skill is needed. Kept short on purpose.

how it runs - the shared frame every skill uses 3/5 present

Every skill runs the same way. One part does the work, a separate part checks it, and a short loader hands the AI exactly what it needs for the job. Anything this skill doesn't use shows a one-line note saying why, on purpose, not by accident.

makes the work The worker
not present

No work step here. This is probably a skill that reads or coordinates, not one that produces something.

checks the work The reviewer
inferred
shape gate an automatic check
The check is an automatic pass or fail on the shape of the result, run separately from the work itself.
frame
learns Self-correction
present
fixes itself learns from gaps
When a run hits a gap, the skill gets edited on the spot [FIXED] or queued for a bigger rewrite [LOGGED], so it keeps getting better.
tidies up Background fixes
present
queued for rewrite runs in the background
Bigger fixes that can't be made on the spot get queued and rewritten in the background later.
remembers Run history
present
state/log/evals.ndjson auto-shape runs
Every run is written down here, so the next time this skill is used it already knows how the last runs went.
Critical rules the things this skill must not get wrong
No must-not-break rules called out for this skill. Anything important lives in the writeup below.

what it has learned - fixes written back in over time sample

When a run hits something this skill didn't handle, the fix gets written back into the skill so it doesn't happen again. FIXED means it was corrected on the spot. LOGGED means it's queued for a bigger rewrite. Either way, the skill gets a little better and never makes the same mistake twice.

  1. Loading feedback rows…

SKILL.md- the skill, written out in plain English

audit14-eval-snapshotter

Every 30 minutes, count the distinct skills in evals from the last hour and log the metric.

Steps

  1. Read the last 1000 eval rows from state/log/evals.ndjson (most recent first)
  2. Filter to rows timestamped within the last 60 minutes (check the ts field)
  3. Extract the skill field from each matching row
  4. Count distinct skill values
  5. Append an eval row to state/log/evals.ndjson with:
  • ts: current ISO timestamp
  • skill: "audit14-eval-snapshotter"
  • verb: "snapshot"
  • score: the count (as a number between 0 and 1, normalized: count / 180)
  • run_id: a fresh UUID
  • primary_issue: null

Example eval row to append:

{"ts":"2026-05-02T11:30:00.000Z","skill":"audit14-eval-snapshotter","verb":"snapshot","score":0.45,"run_id":"uuid-here","primary_issue":null}

AGENTS.md- what the AI loads when this skill comes up

audit14-eval-snapshotter - loader

Per-turn rules for audit14-eval-snapshotter. Full reference: state/skills/audit14-eval-snapshotter/SKILL.md. Runs every 30 min (scheduled dispatch).

Critical Rules

  1. One eval row per run. Append to state/log/evals.ndjson. Score = distinct_skill_count / 180 (normalized 0-1). Never two rows for one invocation.
  2. Safe NDJSON tail. Use tail -1000 on the evals file then awk-filter by timestamp; do not use jq unless installed (not guaranteed).
  3. macOS date flag. date -u -v-1H (macOS) vs date -u --date="-1 hour" (Linux). Use the 2>/dev/null || ... fallback pattern to handle both.
  4. Score can exceed 1.0 if >180 skills ran. Clamp: SCORE=$(echo "scale=4; if ($DISTINCT_COUNT > 180) 1.0 else $DISTINCT_COUNT / 180" | bc).
  5. Concurrent-safe. Lock via /tmp/claude-cron-audit14-eval-snapshotter.lock if running from cron; fine to skip when invoked manually.

Commands

OperationCommand
run snapshot (inline bash)See implementation block below
verify last row`tail -1 ~/projects/snappy-os/state/log/evals.ndjson \grep audit14-eval-snapshotter`
eval log filtergrep '"skill":"audit14-eval-snapshotter"' ~/projects/snappy-os/state/log/evals.ndjson

Implementation

#!/bin/bash
EVALS_FILE="$HOME/projects/snappy-os/state/log/evals.ndjson"
HOUR_AGO=$(date -u -v-1H +%Y-%m-%dT%H:%M:%S 2>/dev/null || date -u --date="-1 hour" +%Y-%m-%dT%H:%M:%S)
NOW=$(date -u +%Y-%m-%dT%H:%M:%S.000Z)
RUN_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')

DISTINCT_COUNT=$(tail -1000 "$EVALS_FILE" | \
  awk -v hour_ago="$HOUR_AGO" -F'"' '
    BEGIN { count = 0 }
    {
      for (i = 1; i <= NF; i++) {
        if ($i ~ /^ts$/) { ts_val=$(i+2); in_window=(ts_val >= hour_ago) }
        if ($i ~ /^skill$/ && in_window && !($(i+2) in seen)) { seen[$(i+2)]=1; count++ }
      }
    }
    END { print count }
  ')

SCORE=$(echo "scale=4; if ($DISTINCT_COUNT > 180) 1.0000 else $DISTINCT_COUNT / 180" | bc)
printf '{"ts":"%s","skill":"audit14-eval-snapshotter","verb":"snapshot","score":%s,"run_id":"%s","primary_issue":null}\n' \
  "$NOW" "$SCORE" "$RUN_ID" >> "$EVALS_FILE"
echo "audit14-eval-snapshotter: $DISTINCT_COUNT distinct skills in last hour (score=$SCORE)"

Self-Test

  • [ ] Normalize score as distinct_count / 180 (clamped at 1.0)?
  • [ ] Use macOS/Linux portable date fallback?
  • [ ] Append exactly one eval row per invocation?
  • [ ] Verify with tail -1 evals.ndjson | grep audit14-eval-snapshotter after run?

<!-- kernel-ok: historical attribution for the PID-loader pattern. -->

Self-correcting loader (PID feedback)

This is the rule that makes loaders learn. Ported from snappy-kernel, where it demonstrably worked: the snappy-dom-cartographer skill mapped Skool admin UI once, every later ship-agent inherited the full map for free.

Before you finish, do two things:

1. Fix gaps (P - proportional). MANDATORY. If this loader didn't cover your case - if you had to read another file, run an undocumented command, work around a wrong selector, or discover a quirk - you MUST attempt an Edit to this AGENTS.md before you log.

  • Default action: edit this file. Surgical. Add the missing line, table

row, or code example where it belongs. No restructuring.

  • Only LOGGED is allowed when: the fix needs >10 lines, spans multiple

files, or requires a structural rewrite. In that case the state/regen/drain.sh queue picks it up asynchronously.

  • "I didn't have time" / "it's minor" / "the next agent will figure it out"

are NOT valid reasons. Minor gaps compound - that's the whole point of this loop.

  • Concrete example of a valid P-fix: discover agent-browser screenshot

takes path positionally not as --output <path>. One line in a table. Edit it in. Do not just log it.

  • The goal: the next agent never has to leave the loader.

2. Log the result.

echo "[$(date -u +%FT%TZ)] audit14-eval-snapshotter: <what was missing or fixed> [FIXED|LOGGED] action_kind=<kind>" >> state/log/loader-feedback.log
  • FIXED = you patched this loader inline (P-fix).
  • LOGGED = too large for inline; the PostToolUse enqueue + Stop-hook drain

will rewrite the loader from scratch on next session-end.

  • action_kind: shape-ok | skill-ran | loader-rewritten | pattern-elevated

Do not skip this. Every agent run must leave the system better than it found it. The loader is the setpoint; you are the sensor; the gap is the error signal; closing the gap is the correction.

api.ts- the code it can call

⚠ no api.ts - this skill has no typed action surface

scripts- helper scripts it can run

prose-only skill - 1 inline code block live in SKILL.md above (no state/bin/ sidecar yet).

how we check it- the checks, plus the last 10 runs

rubric auto-shape no rubric declared
recent no runs actor/auditor: unverifiable
deps none declared

no recent runs logged - the eval contract is declared but nothing has been graded yet