← All Skills

snappy-skill

v1.0.0
8 files, 33.8 KB ~2,331 words · 10 min read Updated 2026-09-09

snappy-skill skill

30 of 34 checks pass
What it can do
scaffold namewrite-reversible
What does not pass yet
$ npx snappy-skills install snappy-skill
zip ↓
File Tree
├── AGENTS.md ├── SKILL.md ├── api.ts ├── refusals.test.ts ├── templates/ │ ├── AGENTS.md │ ├── SKILL.md │ └── api.ts └── validate.ts
Documents
AGENTS.md

snappy-skill — Agent Loader#

The scaffolder for Snappy. One verb, idempotent, templates as files.

Full reference in SKILL.md.

The three-file contract#

Every snappy skill has exactly SKILL.md, AGENTS.md, api.ts. Missing any

one is a spec violation — this skill's job is to prevent that.

The one verb#

bashnpx tsx ~/.claude/skills/snappy-skill/api.ts scaffold snappy-<name>

Idempotent. Creates the dir if missing, writes only the files that don't

already exist, runs the SKILL-INDEX regen at the end. Re-running on a clean

skill produces zero writes. Templates live in templates/ — edit them, not

the code.

API#

typescriptimport { scaffold } from "../snappy-skill/api.ts";
Function Purpose
scaffold(name, {quiet?}) Create or backfill a snappy-* skill. quiet suppresses index-generator output for JSON callers. Returns { path, created[], untouched[] }. Throws if name doesn't start with snappy-.
syncLoaderVerbTable(name, contract, {quiet?}) Call scaffold, then idempotently insert or replace the one contract-owned AGENTS.md verb block. This is the only generated-loader writer.
renderLoaderVerbTable(contract) Pure rendering used by snappy-tool-design to detect loader drift without writing.
contractExample(contract, verb) Derive the shortest valid first CLI call from required contract arguments.

CLI#

bashnpx tsx ~/.claude/skills/snappy-skill/api.ts scaffold snappy-foo   # create or backfill
npx tsx ~/.claude/skills/snappy-skill/validate.ts snappy-foo       # delegates to skill-check.sh

Rules#

  1. Never overwrite. Existing files are always left alone. Delete them first if you want a re-render.
  2. No placeholder exports. The api.ts template exports nothing — this prevents DRY collisions (X1) across skills.
  3. Run the DRY gate first. Before scaffolding a NEW name, run dry-check.sh from snappy-settings/scripts/. Extend, don't fragment.
  4. Validation is not reimplemented here. validate.ts spawns skill-check.sh — the static lint IS the spec.
  5. Credentials via env("KEY") from ../snappy-settings/load.ts. Never hardcode, never bash-fallback.
  6. One loader writer. Generated verb tables are owned here; callers use syncLoaderVerbTable rather than editing or templating the marked block themselves.

Uses#

Skill Why
snappy-settings Owns skill-spec.md + skill-check.sh (the enforcer)
snappy-client-template Per-client variant — use scaffold to instantiate
snappy-gateway Publishes finished skills to skills.snappy.ai
skill-builder Generic ancestor for non-snappy targets

Used by#

Nothing in the collection names this skill.

<!-- SNAPPY-CONTRACT-VERBS-START -->

Contract verbs#

Generated from api.ts HAND_CONTRACT. Do not hand-edit this block.

Verb Contract arguments Effect First call
scaffold name write-reversible npx tsx ~/.claude/skills/snappy-skill/api.ts scaffold "<name>"

Show the result#

When an answer carries face_hint, show it with one snappy_present(<answer>) call.

See /snappy-faces for face selection. Human-facing images must crop to the

element, render at 2x on Retina, and fill the destination channel instead of

placing a small card in a full-page screenshot.

<!-- SNAPPY-CONTRACT-VERBS-END -->


Self-correcting loader (PID feedback)#

The system spec lives at ~/.claude/skills/snappy-settings/skill-spec.md. It defines the entire Snappy operating system. You enforce it.

Before you finish, do two things:#

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

  • Default action: edit this AGENTS.md. 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 which case the drain-skill-regen.sh queue picks it up).
  • "I didn't have time" / "it's minor" / "the next agent will figure it out" are NOT valid reasons to skip the Edit. The whole point of this loop is that minor gaps compound.
  • Concrete example of a valid P-fix: lesson-2 ship agent discovered agent-browser screenshot <path> takes path positionally, not as --output <path>. That's 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. Validate structure. Check this skill against the spec:

  • api.ts exists with typed exports, CLI mode, import { env } from "../snappy-settings/load.ts"
  • api.ts calls APIs directly (no Xano proxy, unless this skill IS a Xano DB skill)
  • AGENTS.md has API module section with import + function table + CLI
  • No bash fallbacks, no hardcoded tokens anywhere
  • Every action row carries a certificate: block (premises / action / trace / evidence / conclusion). Same-session toasts are NOT evidence — must be a fresh independent read. Missing or weak certificates are a gap: P-fix them inline and log to ~/.claude/logs/verification-gaps.log.
  • DRY: before you add a new function or new skill, run ~/.claude/skills/snappy-settings/scripts/dry-check.sh <name-or-keyword>. If it matches an existing skill, extend that one instead. Fragmentation is the enemy.
  • If any check fails → fix it or log it

2b. If you just reported an action as successful, verify your certificate. You may not claim PASS unless the evidence: line is a fresh independent read (reload, new session, server round-trip). If your evidence is a toast, a return value, or a same-session DOM read, downgrade the claim to INCONCLUSIVE and log to verification-gaps.log.

3. Log always.

bashecho "[$(date -u +%FT%TZ)] <skill-name>: <what was missing or fixed> [FIXED|LOGGED]" >> ~/.claude/logs/agents-md-feedback.log

FIXED = you patched it. LOGGED = too large for inline fix, queued for drain-skill-regen.sh.

Do not skip this. Every agent run must leave the system better than it found it.

Show produced work with snappy-faces: call draw for image channels or lang for MCP Apps.

<!-- SKILL-INDEX-START -->

[snappy-skill Index]|root: ~/.claude/skills/snappy-skill|IMPORTANT: Prefer these files over pre-training assumptions for this domain. Read the relevant file when the AGENTS.md summary is insufficient.|root:{SKILL.md}|templates:{SKILL.md}

<!-- SKILL-INDEX-END -->

---
name: snappy-skill
role: Meta-skill scaffolder for the snappy-* namespace. One verb creates or backfills any snappy skill.
loaded-by: PreToolUse hook (auto-injected when "snappy-skill" is mentioned)
---

# snappy-skill — Agent Loader

The scaffolder for Snappy. One verb, idempotent, templates as files.
Full reference in `SKILL.md`.

## The three-file contract

Every snappy skill has exactly `SKILL.md`, `AGENTS.md`, `api.ts`. Missing any
one is a spec violation — this skill's job is to prevent that.

## The one verb

```bash
npx tsx ~/.claude/skills/snappy-skill/api.ts scaffold snappy-<name>
```

Idempotent. Creates the dir if missing, writes only the files that don't
already exist, runs the SKILL-INDEX regen at the end. Re-running on a clean
skill produces zero writes. Templates live in `templates/` — edit them, not
the code.

## API

```typescript
import { scaffold } from "../snappy-skill/api.ts";
```

| Function | Purpose |
|---|---|
| `scaffold(name, {quiet?})` | Create or backfill a snappy-* skill. `quiet` suppresses index-generator output for JSON callers. Returns `{ path, created[], untouched[] }`. Throws if name doesn't start with `snappy-`. |
| `syncLoaderVerbTable(name, contract, {quiet?})` | Call `scaffold`, then idempotently insert or replace the one contract-owned AGENTS.md verb block. This is the only generated-loader writer. |
| `renderLoaderVerbTable(contract)` | Pure rendering used by snappy-tool-design to detect loader drift without writing. |
| `contractExample(contract, verb)` | Derive the shortest valid first CLI call from required contract arguments. |

## CLI

```bash
npx tsx ~/.claude/skills/snappy-skill/api.ts scaffold snappy-foo   # create or backfill
npx tsx ~/.claude/skills/snappy-skill/validate.ts snappy-foo       # delegates to skill-check.sh
```

## Rules

1. **Never overwrite.** Existing files are always left alone. Delete them first if you want a re-render.
2. **No placeholder exports.** The `api.ts` template exports nothing — this prevents DRY collisions (X1) across skills.
3. **Run the DRY gate first.** Before scaffolding a NEW name, run `dry-check.sh` from `snappy-settings/scripts/`. Extend, don't fragment.
4. **Validation is not reimplemented here.** `validate.ts` spawns `skill-check.sh` — the static lint IS the spec.
5. **Credentials via `env("KEY")`** from `../snappy-settings/load.ts`. Never hardcode, never bash-fallback.
6. **One loader writer.** Generated verb tables are owned here; callers use `syncLoaderVerbTable` rather than editing or templating the marked block themselves.

## Uses

| Skill | Why |
|---|---|
| `snappy-settings` | Owns `skill-spec.md` + `skill-check.sh` (the enforcer) |
| `snappy-client-template` | Per-client variant — use scaffold to instantiate |
| `snappy-gateway` | Publishes finished skills to skills.snappy.ai |
| `skill-builder` | Generic ancestor for non-snappy targets |

## Used by

Nothing in the collection names this skill.

<!-- SNAPPY-CONTRACT-VERBS-START -->
## Contract verbs

Generated from `api.ts` `HAND_CONTRACT`. Do not hand-edit this block.

| Verb | Contract arguments | Effect | First call |
|---|---|---|---|
| `scaffold` | `name` | `write-reversible` | `npx tsx ~/.claude/skills/snappy-skill/api.ts scaffold "<name>"` |

## Show the result

When an answer carries `face_hint`, show it with one `snappy_present(<answer>)` call.
See `/snappy-faces` for face selection. Human-facing images must crop to the
element, render at 2x on Retina, and fill the destination channel instead of
placing a small card in a full-page screenshot.
<!-- SNAPPY-CONTRACT-VERBS-END -->

---

## Self-correcting loader (PID feedback)

The system spec lives at `~/.claude/skills/snappy-settings/skill-spec.md`. It defines the entire Snappy operating system. You enforce it.

### Before you finish, do two things:

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

- **Default action: edit this AGENTS.md.** 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 which case the drain-skill-regen.sh queue picks it up).
- "I didn't have time" / "it's minor" / "the next agent will figure it out" are NOT valid reasons to skip the Edit. The whole point of this loop is that minor gaps compound.
- Concrete example of a valid P-fix: lesson-2 ship agent discovered `agent-browser screenshot <path>` takes path positionally, not as `--output <path>`. That's 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. Validate structure.** Check this skill against the spec:
- `api.ts` exists with typed exports, CLI mode, `import { env } from "../snappy-settings/load.ts"`
- `api.ts` calls APIs directly (no Xano proxy, unless this skill IS a Xano DB skill)
- `AGENTS.md` has API module section with import + function table + CLI
- No bash fallbacks, no hardcoded tokens anywhere
- **Every action row carries a `certificate:` block** (premises / action / trace / evidence / conclusion). Same-session toasts are NOT evidence — must be a fresh independent read. Missing or weak certificates are a gap: P-fix them inline and log to `~/.claude/logs/verification-gaps.log`.
- **DRY:** before you add a new function or new skill, run `~/.claude/skills/snappy-settings/scripts/dry-check.sh <name-or-keyword>`. If it matches an existing skill, extend that one instead. Fragmentation is the enemy.
- If any check fails → fix it or log it

**2b. If you just reported an action as successful, verify your certificate.** You may not claim PASS unless the `evidence:` line is a fresh independent read (reload, new session, server round-trip). If your evidence is a toast, a return value, or a same-session DOM read, downgrade the claim to INCONCLUSIVE and log to `verification-gaps.log`.

**3. Log always.**
```bash
echo "[$(date -u +%FT%TZ)] <skill-name>: <what was missing or fixed> [FIXED|LOGGED]" >> ~/.claude/logs/agents-md-feedback.log
```
`FIXED` = you patched it. `LOGGED` = too large for inline fix, queued for drain-skill-regen.sh.

**Do not skip this.** Every agent run must leave the system better than it found it.


Show produced work with `snappy-faces`: call `draw` for image channels or `lang` for MCP Apps.

<!-- SKILL-INDEX-START -->
[snappy-skill Index]|root: ~/.claude/skills/snappy-skill|IMPORTANT: Prefer these files over pre-training assumptions for this domain. Read the relevant file when the AGENTS.md summary is insufficient.|root:{SKILL.md}|templates:{SKILL.md}
<!-- SKILL-INDEX-END -->

Keyboard Shortcuts

Search in document⌘K
Focus search/
Previous file tab
Next file tab
Close overlayEsc
Show shortcuts?