← All Skills

snappy-review-pages

v1.0.0
4 files, 30.8 KB ~1,750 words · 7 min read Updated 2026-09-09

snappy-review-pages skill

32 of 34 checks pass
What it can do
kit page-key titledraft
provenancewrite-reversible
What does not pass yet
$ npx snappy-skills install snappy-review-pages
zip ↓
Documents
AGENTS.md

snappy-review-pages — Agent Loader#

When Robert asks for an HTML page to review anything, build a machine, not a

document. Three mandatory defaults:

  1. Pipeline order — deciding artifact first (video work: thumbnail on top,

then spine, then storyboard). Label stages STAGE 1/2/….

  1. Provenance card on every AI-generated artifact — service, model,

settings, ref images (as thumbnails), output path, full verbatim prompt,

"Copy recreate command" + "Copy prompt only" buttons. Recover real commands

from the transcript (~/.claude/projects/<dir>/*.jsonl); never reconstruct

from memory.

  1. Feedback machine — every reviewable item gets

<div class="fb" data-id="…" data-label="…"></div> (✓ Good / ✎ Change +

notes, localStorage-persisted); exclusive picks via [data-pick] buttons

inside <figure id="fig-<pickId>">, independent groups via data-group

(one pick per group); sticky bottom bar with **Copy all

feedback** exporting markdown to paste back into chat.

Approval gates on visual work: show the page FIRST, then ask via picker.

API#

typescriptimport { feedbackKit, provenanceCard, type Provenance } from "~/.claude/skills/snappy-review-pages/api.ts";
Function Purpose
feedbackKit(pageKey, exportTitle) full embeddable block (styles + sticky bar + JS) — append once before </body>
provenanceCard(p: Provenance) HTML for one provenance card; needs the kit on the page for [data-copy] + styles

CLI#

bashnpx tsx ~/.claude/skills/snappy-review-pages/api.ts kit <pageKey> "<export title>"
npx tsx ~/.claude/skills/snappy-review-pages/api.ts provenance '<Provenance json>'

Rules#

  • Credentials via env("KEY") from ../snappy-settings/load.ts
  • Direct API calls only — no Xano proxying unless this IS a Xano DB skill
  • No hardcoded tokens, no bash fallbacks
  • Every exported function returns a real value or throws; no silent "TODO"s
  • file:// gotchas: no remote iframes (YouTube = Error 153; use linked poster

jpg); clipboard via execCommand fallback (the kit does this); assets in a

sibling dir with relative paths

  • Splicing sections into an existing page programmatically: anchor on unique

HTML comment markers (<!-- ===== STAGE N ===== -->), never on the next

</div>/</figure> — figcaptions contain nested closing tags and the

section you insert contains them too (2026-07-07: both failure modes hit)

  • Verify with agent-browser (screenshots + simulated feedback click) before

opening for Robert, then clear the test key

(localStorage.removeItem('fb:<pageKey>:v1'))

  • Reference implementation:

~/Projects/whiteboard-beat-bakeoff/videos/dollar-video-sample/storyboard-preview.html

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
kit page-key, title draft npx tsx ~/.claude/skills/snappy-review-pages/api.ts kit <page-key> "<title>"
provenance write-reversible npx tsx ~/.claude/skills/snappy-review-pages/api.ts provenance

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-review-pages Index]|root: ~/.claude/skills/snappy-review-pages|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}

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

---
name: snappy-review-pages
description: Local HTML review pages with provenance cards and a copy-back feedback loop. Applies whenever Robert asks for an HTML doc/page to review or approve work.
---

# snappy-review-pages — Agent Loader

When Robert asks for an HTML page to review anything, build a machine, not a
document. Three mandatory defaults:

1. **Pipeline order** — deciding artifact first (video work: thumbnail on top,
   then spine, then storyboard). Label stages STAGE 1/2/….
2. **Provenance card on every AI-generated artifact** — service, model,
   settings, ref images (as thumbnails), output path, full verbatim prompt,
   "Copy recreate command" + "Copy prompt only" buttons. Recover real commands
   from the transcript (`~/.claude/projects/<dir>/*.jsonl`); never reconstruct
   from memory.
3. **Feedback machine** — every reviewable item gets
   `<div class="fb" data-id="…" data-label="…"></div>` (✓ Good / ✎ Change +
   notes, localStorage-persisted); exclusive picks via `[data-pick]` buttons
   inside `<figure id="fig-<pickId>">`, independent groups via `data-group`
   (one pick per group); sticky bottom bar with **Copy all
   feedback** exporting markdown to paste back into chat.

Approval gates on visual work: show the page FIRST, then ask via picker.

## API

```typescript
import { feedbackKit, provenanceCard, type Provenance } from "~/.claude/skills/snappy-review-pages/api.ts";
```

| Function | Purpose |
|---|---|
| `feedbackKit(pageKey, exportTitle)` | full embeddable block (styles + sticky bar + JS) — append once before `</body>` |
| `provenanceCard(p: Provenance)` | HTML for one provenance card; needs the kit on the page for `[data-copy]` + styles |

## CLI

```bash
npx tsx ~/.claude/skills/snappy-review-pages/api.ts kit <pageKey> "<export title>"
npx tsx ~/.claude/skills/snappy-review-pages/api.ts provenance '<Provenance json>'
```

## Rules

- Credentials via `env("KEY")` from `../snappy-settings/load.ts`
- Direct API calls only — no Xano proxying unless this IS a Xano DB skill
- No hardcoded tokens, no bash fallbacks
- Every exported function returns a real value or throws; no silent "TODO"s
- file:// gotchas: no remote iframes (YouTube = Error 153; use linked poster
  jpg); clipboard via execCommand fallback (the kit does this); assets in a
  sibling dir with relative paths
- Splicing sections into an existing page programmatically: anchor on unique
  HTML comment markers (`<!-- ===== STAGE N ===== -->`), never on the next
  `</div>`/`</figure>` — figcaptions contain nested closing tags and the
  section you insert contains them too (2026-07-07: both failure modes hit)
- Verify with agent-browser (screenshots + simulated feedback click) before
  opening for Robert, then clear the test key
  (`localStorage.removeItem('fb:<pageKey>:v1')`)
- Reference implementation:
  `~/Projects/whiteboard-beat-bakeoff/videos/dollar-video-sample/storyboard-preview.html`

## 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 |
|---|---|---|---|
| `kit` | `page-key`, `title` | `draft` | `npx tsx ~/.claude/skills/snappy-review-pages/api.ts kit <page-key> "<title>"` |
| `provenance` | — | `write-reversible` | `npx tsx ~/.claude/skills/snappy-review-pages/api.ts provenance` |

## 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-review-pages Index]|root: ~/.claude/skills/snappy-review-pages|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}
<!-- SKILL-INDEX-END -->

Keyboard Shortcuts

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