← All Skills

snappy-box

v1.0.0
8 files, 81.6 KB ~5,577 words · 23 min read Updated 2026-09-09

snappy-box skill

41 of 47 checks pass
What it can do
call method path json-body?write
routesread
sql queryread
What does not pass yet
Architecture 31 endpoints
🔑 x-api-key auth
POSTDELETE
10.0.0.199:808031 endpoints
POST/_deploy
POST/_undeploy
POST/_rollback
POST/patch
POST/_daemon/start
POST/_daemon/stop
$ npx snappy-skills install snappy-box
zip ↓
Documents
AGENTS.md

snappy-box Loader#

Box is a self-editing Express server running on Robert's Mac Mini (Docker, Node 20,

180+ routes). It is the runtime execution layer for the Snappy stack -- other skills

produce intent and code, Box runs it. Covers route deployment, SQL, state/cache/secrets,

daemons, autonomous agents, capability registry, and pack organization.

API module#

typescriptimport { listRoutes, runSql, deploy, callRoute } from "../snappy-box/api.ts";
Function What it does
listRoutes() List all deployed routes
runSql(query) Run SQL against Box's internal database
deploy(routeConfig) Deploy a route (name, method, path, code, pack?, meta?)
callRoute(method, path, body?) Hit any Box endpoint

CLI:

bashnpx tsx ~/.claude/skills/snappy-box/api.ts routes
npx tsx ~/.claude/skills/snappy-box/api.ts sql "SELECT 1"
npx tsx ~/.claude/skills/snappy-box/api.ts call GET /pulse

Credentials loaded via snappy-settings/load.ts from .env.cache. BOX_API_KEY must be in .env.cache -- if missing, retrieve via ssh robertboulos@10.0.0.199 "/usr/local/bin/docker exec box-box-1 printenv BOX_API_KEY".

Key Files#

File Purpose
SKILL.md Full HTTP API reference, CRUD map, MCP mapping, gotchas
endpoints.md Complete curl examples for every endpoint
writing-routes.md Sandbox helpers (ai, db, redis, fetch, deploy, emit)
tables.md Internal database table schemas
operations.md Maintenance, agents, registry-before-build, daemon template

Connection#

bashBOX_URL="http://10.0.0.199:8080"
KEY=$(ssh robertboulos@10.0.0.199 "/usr/local/bin/docker exec box-box-1 printenv BOX_API_KEY")

Capabilities#

  • Deploy, patch, rollback, and undeploy routes (POST /_deploy)
  • Run SQL queries (POST /system/sql)
  • Manage state, cache, and secrets via HTTP
  • Start/stop/list daemons for background agents
  • Search existing capabilities before building new ones
  • Deploy multi-resource experiences (POST /deploy-experience)
  • Build autonomous daemon agents (observe/think/act/record pattern)

Critical Gotchas#

  • Daemons cannot use ai(), getSecret(), callFunction(), or emit() directly -- use raw fetch/SQL instead
  • Self-modifying routes must use BOX_SELF_API_KEY secret, not the user key
  • Self-calls use localhost:8080, not the external IP
  • Always include pack and meta.description on deployed routes
  • Write deploy payloads to /tmp/box-deploy.json, don't inline in curl

Uses#

  • snappy-infra -- Mac Mini SSH host, auth patterns
  • snappy-github -- source for routes/daemons

Downstream Skills#

  • snappy-website -- runtime routes serving snappy.ai data
  • snappy-ops -- triggers daemons during daily/weekly rhythm
  • snappy-maintenance -- reads /pulse, /logs for health reports

Key Rule#

Box self-deploys via POST /_deploy. Do NOT use snappy-deploy for Box routes.


If this loader doesn't cover your case:

bashecho "[$(date -u +%FT%TZ)] snappy-box: <what was missing>" >> ~/.claude/logs/agents-md-feedback.log

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

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

[snappy-box Index]|root: ~/.claude/skills/snappy-box|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,endpoints.md,operations.md,tables.md,writing-routes.md}

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

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
call method, path, json-body? write npx tsx ~/.claude/skills/snappy-box/api.ts call <method> <path>
routes read npx tsx ~/.claude/skills/snappy-box/api.ts routes
sql query read npx tsx ~/.claude/skills/snappy-box/api.ts sql "<query>"

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 -->

---
name: snappy-box
role: Box server -- self-editing Express server on Mac Mini (Docker, Node 20, 180+ routes). HTTP API for route deployment, state, cache, secrets, daemons, and autonomous agents.
loaded-by: PreToolUse hook (auto-injected when "snappy-box" is mentioned)
---

# snappy-box Loader

Box is a self-editing Express server running on Robert's Mac Mini (Docker, Node 20,
180+ routes). It is the runtime execution layer for the Snappy stack -- other skills
produce intent and code, Box runs it. Covers route deployment, SQL, state/cache/secrets,
daemons, autonomous agents, capability registry, and pack organization.

## API module

```typescript
import { listRoutes, runSql, deploy, callRoute } from "../snappy-box/api.ts";
```

| Function | What it does |
|----------|-------------|
| `listRoutes()` | List all deployed routes |
| `runSql(query)` | Run SQL against Box's internal database |
| `deploy(routeConfig)` | Deploy a route (name, method, path, code, pack?, meta?) |
| `callRoute(method, path, body?)` | Hit any Box endpoint |

CLI:
```bash
npx tsx ~/.claude/skills/snappy-box/api.ts routes
npx tsx ~/.claude/skills/snappy-box/api.ts sql "SELECT 1"
npx tsx ~/.claude/skills/snappy-box/api.ts call GET /pulse
```

Credentials loaded via `snappy-settings/load.ts` from `.env.cache`. `BOX_API_KEY` must be in `.env.cache` -- if missing, retrieve via `ssh robertboulos@10.0.0.199 "/usr/local/bin/docker exec box-box-1 printenv BOX_API_KEY"`.

## Key Files

| File | Purpose |
|------|---------|
| SKILL.md | Full HTTP API reference, CRUD map, MCP mapping, gotchas |
| endpoints.md | Complete curl examples for every endpoint |
| writing-routes.md | Sandbox helpers (ai, db, redis, fetch, deploy, emit) |
| tables.md | Internal database table schemas |
| operations.md | Maintenance, agents, registry-before-build, daemon template |

## Connection

```bash
BOX_URL="http://10.0.0.199:8080"
KEY=$(ssh robertboulos@10.0.0.199 "/usr/local/bin/docker exec box-box-1 printenv BOX_API_KEY")
```

## Capabilities

- Deploy, patch, rollback, and undeploy routes (`POST /_deploy`)
- Run SQL queries (`POST /system/sql`)
- Manage state, cache, and secrets via HTTP
- Start/stop/list daemons for background agents
- Search existing capabilities before building new ones
- Deploy multi-resource experiences (`POST /deploy-experience`)
- Build autonomous daemon agents (observe/think/act/record pattern)

## Critical Gotchas

- Daemons cannot use `ai()`, `getSecret()`, `callFunction()`, or `emit()` directly -- use raw fetch/SQL instead
- Self-modifying routes must use `BOX_SELF_API_KEY` secret, not the user key
- Self-calls use `localhost:8080`, not the external IP
- Always include `pack` and `meta.description` on deployed routes
- Write deploy payloads to `/tmp/box-deploy.json`, don't inline in curl

## Uses

- `snappy-infra` -- Mac Mini SSH host, auth patterns
- `snappy-github` -- source for routes/daemons

## Downstream Skills

- `snappy-website` -- runtime routes serving snappy.ai data
- `snappy-ops` -- triggers daemons during daily/weekly rhythm
- `snappy-maintenance` -- reads /pulse, /logs for health reports

## Key Rule

Box self-deploys via `POST /_deploy`. Do NOT use `snappy-deploy` for Box routes.

---

If this loader doesn't cover your case:
```bash
echo "[$(date -u +%FT%TZ)] snappy-box: <what was missing>" >> ~/.claude/logs/agents-md-feedback.log
```


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

<!-- SKILL-INDEX-START -->
[snappy-box Index]|root: ~/.claude/skills/snappy-box|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,endpoints.md,operations.md,tables.md,writing-routes.md}
<!-- SKILL-INDEX-END -->

## 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 |
|---|---|---|---|
| `call` | `method`, `path`, `json-body?` | `write` | `npx tsx ~/.claude/skills/snappy-box/api.ts call <method> <path>` |
| `routes` | — | `read` | `npx tsx ~/.claude/skills/snappy-box/api.ts routes` |
| `sql` | `query` | `read` | `npx tsx ~/.claude/skills/snappy-box/api.ts sql "<query>"` |

## 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 -->

Keyboard Shortcuts

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