← All Skills

snappy-report-publish

v1.0.0
10 files, 60.1 KB ~3,071 words · 13 min read Updated 2026-09-09

snappy-report-publish skill

38 of 45 checks pass
What it can do
gen-batch prompts-file out-dirdraft
publish hub-dir projectpost
styleread
update-index hub-dir slug title description datewrite-reversible
verify url out?read
What does not pass yet
$ npx snappy-skills install snappy-report-publish
zip ↓
File Tree
├── AGENTS.md ├── SKILL.md ├── api.ts ├── refusals.test.ts └── templates/ ├── fragments/ │ ├── correction-banner.html │ ├── hub-link.html │ ├── query-card.html │ └── two-up-grid.html ├── gen_batch.py └── prompt-patterns.md
Documents
AGENTS.md

snappy-report-publish — Agent Loader#

Turns raw engineering material (meeting transcripts, agent traces, commit logs) into a shareable status-report URL on a Cloudflare Pages hub. Designed around the "dozens of passes" quality loop that produced /lsi-proof and /overnight-apr-20 on the orbiter-status-report hub.

API#

typescriptimport {
  generateDiagramBatch,
  publishReport,
  updateHubIndex,
  verifyDeployment,
  STYLE,
} from "../snappy-report-publish/api.ts";
Function Purpose
generateDiagramBatch(prompts, outDir) Generate N images via Gemini 3.1 flash-image-preview. Returns {ok: string[], failed: string[]}.
publishReport(hubDir, projectName) env -u CLOUDFLARE_API_TOKEN wrangler pages deploy. Returns deployed URL.
updateHubIndex(hubDir, entry) Insert a new <a class="report-link"> at top of the Live section in index.html.
verifyDeployment(url, outPngPath) Agent-browser screenshot with isolated session. Returns path to saved screenshot.
STYLE The canonical flat-blueprint style string. Prepend/append to every image prompt.

CLI#

bash# Generate a batch of images from a prompts JSON file
npx tsx ~/.claude/skills/snappy-report-publish/api.ts gen-batch <prompts.json> <out-dir>

# Publish hub directory to Cloudflare Pages
npx tsx ~/.claude/skills/snappy-report-publish/api.ts publish <hub-dir> <project-name>

# Verify a deployed URL
npx tsx ~/.claude/skills/snappy-report-publish/api.ts verify <url> <out.png>

# Print the canonical STYLE string
npx tsx ~/.claude/skills/snappy-report-publish/api.ts style

The 5 phases#

  1. Draft — write claims + pick one diagram per claim. Collect pull-quotes.
  2. Generate + iterate — batch via Gemini, inspect each, re-prompt hallucinations with the "5 named exemplars + N more" pattern.
  3. Compose — hero + correction banner + two-up grid + query cards + handoff. Fragments in templates/fragments/.
  4. Publishenv -u CLOUDFLARE_API_TOKEN CLOUDFLARE_ACCOUNT_ID=… wrangler pages deploy … then update hub index.html.
  5. Verify — agent-browser with unique session, screenshot hero-fold + full-page, share URL.

Rules#

  • Credentials via env("KEY") from ../snappy-settings/load.ts
  • Image model: gemini-3.1-flash-image-preview via /v1beta/…/:generateContent with responseModalities: ["IMAGE"]
  • Wrangler gotcha: .env.cache CLOUDFLARE_API_TOKEN lacks Pages permissions → always deploy with env -u CLOUDFLARE_API_TOKEN so wrangler uses its OAuth login
  • Agent-browser: set AGENT_BROWSER_SESSION to a unique value per run (avoids session collisions)
  • Hub repo auth: gh auth switch --user roboulos before pushing to roboulos/orbiter-status-report
  • No hardcoded API keys, no bash fallbacks

Key constants (Orbiter hub)#

Thing Value
Account ID 7eb97d8aafdc135db8eb1c18613dc170
Hub project orbiter-status-report
Hub URL https://orbiter-status-report.pages.dev/
Report URL pattern https://orbiter-status-report.pages.dev/<slug> (no .html)

Top mistakes to avoid#

  • ❌ Keeping CLOUDFLARE_API_TOKEN in env when running wrangler → auth error
  • ❌ Asking Gemini to render 20 uniquely-named cards → gets duplicates, garbled names, placeholder words
  • ❌ Skipping the hub-index update → new report is orphaned
  • ❌ Using Charlotte MCP browser tools for verify → must use agent-browser (Robert's CLAUDE.md bans the MCP browser tools)
  • ❌ Running a second verify in the same browser session without AGENT_BROWSER_SESSION → first agent's tab gets clobbered

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
gen-batch prompts-file, out-dir draft npx tsx ~/.claude/skills/snappy-report-publish/api.ts gen-batch <prompts-file> <out-dir>
publish hub-dir, project post npx tsx ~/.claude/skills/snappy-report-publish/api.ts publish <hub-dir> <project>
style read npx tsx ~/.claude/skills/snappy-report-publish/api.ts style
update-index hub-dir, slug, title, description, date write-reversible npx tsx ~/.claude/skills/snappy-report-publish/api.ts update-index <hub-dir> <slug> "<title>" <description> <date>
verify url, out? read npx tsx ~/.claude/skills/snappy-report-publish/api.ts verify <url>

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.
  • 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)] snappy-report-publish: <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-report-publish Index]|root: ~/.claude/skills/snappy-report-publish|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:{prompt-patterns.md}

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

---
name: snappy-report-publish
description: Publish cognitively-clear HTML status reports to a Cloudflare Pages hub. Orchestrates Gemini diagram generation with an iterative hallucination-fix loop, HTML composition (hero + correction banner + two-up grid + pull-quotes), wrangler publish, hub-index update, and agent-browser verification.
---

# snappy-report-publish — Agent Loader

Turns raw engineering material (meeting transcripts, agent traces, commit logs) into a shareable status-report URL on a Cloudflare Pages hub. Designed around the **"dozens of passes"** quality loop that produced `/lsi-proof` and `/overnight-apr-20` on the orbiter-status-report hub.

## API

```typescript
import {
  generateDiagramBatch,
  publishReport,
  updateHubIndex,
  verifyDeployment,
  STYLE,
} from "../snappy-report-publish/api.ts";
```

| Function | Purpose |
|---|---|
| `generateDiagramBatch(prompts, outDir)` | Generate N images via Gemini 3.1 flash-image-preview. Returns `{ok: string[], failed: string[]}`. |
| `publishReport(hubDir, projectName)` | `env -u CLOUDFLARE_API_TOKEN wrangler pages deploy`. Returns deployed URL. |
| `updateHubIndex(hubDir, entry)` | Insert a new `<a class="report-link">` at top of the Live section in `index.html`. |
| `verifyDeployment(url, outPngPath)` | Agent-browser screenshot with isolated session. Returns path to saved screenshot. |
| `STYLE` | The canonical flat-blueprint style string. Prepend/append to every image prompt. |

## CLI

```bash
# Generate a batch of images from a prompts JSON file
npx tsx ~/.claude/skills/snappy-report-publish/api.ts gen-batch <prompts.json> <out-dir>

# Publish hub directory to Cloudflare Pages
npx tsx ~/.claude/skills/snappy-report-publish/api.ts publish <hub-dir> <project-name>

# Verify a deployed URL
npx tsx ~/.claude/skills/snappy-report-publish/api.ts verify <url> <out.png>

# Print the canonical STYLE string
npx tsx ~/.claude/skills/snappy-report-publish/api.ts style
```

## The 5 phases

1. **Draft** — write claims + pick one diagram per claim. Collect pull-quotes.
2. **Generate + iterate** — batch via Gemini, inspect each, re-prompt hallucinations with the **"5 named exemplars + N more"** pattern.
3. **Compose** — hero + correction banner + two-up grid + query cards + handoff. Fragments in `templates/fragments/`.
4. **Publish** — `env -u CLOUDFLARE_API_TOKEN CLOUDFLARE_ACCOUNT_ID=… wrangler pages deploy …` then update hub `index.html`.
5. **Verify** — agent-browser with unique session, screenshot hero-fold + full-page, share URL.

## Rules

- Credentials via `env("KEY")` from `../snappy-settings/load.ts`
- Image model: `gemini-3.1-flash-image-preview` via `/v1beta/…/:generateContent` with `responseModalities: ["IMAGE"]`
- **Wrangler gotcha**: `.env.cache` CLOUDFLARE_API_TOKEN lacks Pages permissions → always deploy with `env -u CLOUDFLARE_API_TOKEN` so wrangler uses its OAuth login
- **Agent-browser**: set `AGENT_BROWSER_SESSION` to a unique value per run (avoids session collisions)
- **Hub repo auth**: `gh auth switch --user roboulos` before pushing to `roboulos/orbiter-status-report`
- No hardcoded API keys, no bash fallbacks

## Key constants (Orbiter hub)

| Thing | Value |
|---|---|
| Account ID | `7eb97d8aafdc135db8eb1c18613dc170` |
| Hub project | `orbiter-status-report` |
| Hub URL | `https://orbiter-status-report.pages.dev/` |
| Report URL pattern | `https://orbiter-status-report.pages.dev/<slug>` (no .html) |

## Top mistakes to avoid

- ❌ Keeping `CLOUDFLARE_API_TOKEN` in env when running wrangler → auth error
- ❌ Asking Gemini to render 20 uniquely-named cards → gets duplicates, garbled names, placeholder words
- ❌ Skipping the hub-index update → new report is orphaned
- ❌ Using Charlotte MCP browser tools for verify → must use `agent-browser` (Robert's CLAUDE.md bans the MCP browser tools)
- ❌ Running a second verify in the same browser session without `AGENT_BROWSER_SESSION` → first agent's tab gets clobbered

## 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 |
|---|---|---|---|
| `gen-batch` | `prompts-file`, `out-dir` | `draft` | `npx tsx ~/.claude/skills/snappy-report-publish/api.ts gen-batch <prompts-file> <out-dir>` |
| `publish` | `hub-dir`, `project` | `post` | `npx tsx ~/.claude/skills/snappy-report-publish/api.ts publish <hub-dir> <project>` |
| `style` | — | `read` | `npx tsx ~/.claude/skills/snappy-report-publish/api.ts style` |
| `update-index` | `hub-dir`, `slug`, `title`, `description`, `date` | `write-reversible` | `npx tsx ~/.claude/skills/snappy-report-publish/api.ts update-index <hub-dir> <slug> "<title>" <description> <date>` |
| `verify` | `url`, `out?` | `read` | `npx tsx ~/.claude/skills/snappy-report-publish/api.ts verify <url>` |

## 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.
- 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)] snappy-report-publish: <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-report-publish Index]|root: ~/.claude/skills/snappy-report-publish|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:{prompt-patterns.md}
<!-- SKILL-INDEX-END -->

Keyboard Shortcuts

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