← All Skills

snappy-os-operator

v1.0.0
6 files, 62.6 KB ~4,677 words · 19 min read Updated 2026-09-09

snappy-os-operator skill

39 of 49 checks pass
What it can do
approvals status?read
approvewrite
denywrite
deploy-truthread
grant-createwrite
grant-updatewrite
healthread
run run-idread
runs script-id?read
script-createwrite
script-runwrite
script-versionwrite
+3 more
What does not pass yet
$ npx snappy-skills install snappy-os-operator
zip ↓
Documents
AGENTS.md

snappy-os-operator — Agent Instructions#

You are operating SnappyOS (local-first governed AI gateway, port 3147) as an

external operator. Every action goes through a product door — the same HTTP

routes the app uses — and leaves a receipt. Never hand-edit manifests, never

read connector mirror sqlite files directly, never shell connector binaries.

A typed refusal (source_not_granted, action_not_granted, 409,

operator_identity_required) is the product working: mint the grant or switch

planes; never bypass. Read SKILL.md for the Laws; governance.md for grants/

approvals/refusals; genui.md for ComposeUI Live Apps and the review-console

pattern.

API module#

typescriptimport {
  mintOperatorSession, opFetch,
  listApprovals, denyApproval, approveApproval,
  stageConnectorAction, createGrant, updateGrantPolicy,
  createScript, addScriptVersion, runScript, listRuns, getRun,
  createInAppSkill, deployTruth, systemHealth,
} from "~/.claude/skills/snappy-os-operator/api.ts";

CLI (all support --json):

bashnpx tsx ~/.claude/skills/snappy-os-operator/api.ts session
npx tsx ~/.claude/skills/snappy-os-operator/api.ts approvals
npx tsx ~/.claude/skills/snappy-os-operator/api.ts deny <approval_id>
npx tsx ~/.claude/skills/snappy-os-operator/api.ts approve <approval_id>
npx tsx ~/.claude/skills/snappy-os-operator/api.ts stage '{"connector":"google-calendar","action":"events_insert","args":{...}}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-create '{"grantee_id":"...","actions":["..."],"purpose":"...","approval_policy":"approve_each"}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-update <grant_id> approve_each
npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-create '{"name":"...","prompt":"..."}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-version <script_id> '{"prompt":"...","note":"..."}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-run <script_id> '{"inputs":{...}}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts runs
npx tsx ~/.claude/skills/snappy-os-operator/api.ts run <run_id>
npx tsx ~/.claude/skills/snappy-os-operator/api.ts skill-create '{"slug":"...","name":"..."}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts deploy-truth
npx tsx ~/.claude/skills/snappy-os-operator/api.ts health

Functions#

Function Door Notes
mintOperatorSession() POST /operator/session Master-key bearer in, session token out; receipted
opFetch(path, init?) any Session-header fetch; caches token, re-mints once on 401/403
listApprovals() GET /approvals/lifecycle THE queue; rows carry payload_preview; 15-min expiry
denyApproval(id) / approveApproval(id) POST /provider-approvals/:id/{deny,approve} Session-only; approve executes exact staged args
stageConnectorAction({connector, action, args}) POST /hub/connector-action apply:false; approve_each grant mints a real approval
createGrant({grantee_id, sources?, actions?, purpose, approval_policy?}) POST /hub/grants/create Default stage_only mints NO approval — pass approve_each for decidable writes
updateGrantPolicy(grant_id, policy) POST /hub/grants/update Fix for stage_only terminal previews
createScript({name, prompt, inputs?, model?}) POST /scripts Prompt is the harness instruction (e.g. "Call ComposeUI once…")
addScriptVersion(script_id, prompt, note?) POST /scripts/:id/versions Full contract freeze; omitted facets inherit
runScript(script_id, inputs?) POST /scripts/:id/run Durable Run via /dispatch/chat
listRuns() / getRun(id) GET /runs, GET /runs/:id Poll status/outcome; records carry cost_usd
createInAppSkill({slug, name, ...}) POST /skill/create Scaffolds state/skills/<slug>/; operator identity required; 409 if exists
deployTruth() GET /deploy-truth Before claiming anything ships
systemHealth() GET /system-health Detectors/dispatch/runtime/heartbeat

Rules#

  • Never stage inferred facts. Uncertain recipient/amount/date → GenUI

review console (genui.md); the human's picks become staged args verbatim.

  • Never upload HTML to Artifacts when the deliverable is a surface —

compose a native Live App via the script road (createScript → runScript).

  • Approve/deny are human-plane. api.ts holds an operator session (dev-tool

override); a remote AI hub never does — do not design flows assuming it will.

  • Verify with fresh reads. A same-session return value is a toast, not

evidence. Re-read the queue/run/Live App out-of-process before claiming done.

  • stage_only trap: terminal preview with approval_id: null looks like

success but is a dead end — flip the grant to approve_each and re-stage.

  • An approval carries its own deadline — read expires_at off the row,

never assume a window. Xano connector queue: 24h, stamped once by

Action/stage (1687). Local provider-approvals: 30 days while it waits for

a human (APPROVAL_TTL_MS). The 15 minutes you may remember is

APPROVED_TOKEN_TTL_MS, the post-approval execution token — not the wait.

Re-stage identical args if one lapses.

  • No fallbacks, no mocks: if a door fails, surface the typed error verbatim.

Uses#

  • snappy-settingsenv("SNAPPY_MASTER_KEY") credential loader
  • snappy-dispatch — cheap-model dispatch for grunt work
  • In-app: state/skills/snappy-os-operator, state/skills/printing-press

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

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

[snappy-os-operator Index]|root: ~/.claude/skills/snappy-os-operator|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,genui.md,governance.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
approvals status? read npx tsx ~/.claude/skills/snappy-os-operator/api.ts approvals
approve write npx tsx ~/.claude/skills/snappy-os-operator/api.ts approve
deny write npx tsx ~/.claude/skills/snappy-os-operator/api.ts deny
deploy-truth read npx tsx ~/.claude/skills/snappy-os-operator/api.ts deploy-truth
grant-create write npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-create
grant-update write npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-update
health read npx tsx ~/.claude/skills/snappy-os-operator/api.ts health
run run-id read npx tsx ~/.claude/skills/snappy-os-operator/api.ts run <run-id>
runs script-id? read npx tsx ~/.claude/skills/snappy-os-operator/api.ts runs
script-create write npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-create
script-run write npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-run
script-version write npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-version
session write-reversible npx tsx ~/.claude/skills/snappy-os-operator/api.ts session
skill-create write npx tsx ~/.claude/skills/snappy-os-operator/api.ts skill-create
stage write npx tsx ~/.claude/skills/snappy-os-operator/api.ts stage

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-os-operator
description: Agent loader — operate SnappyOS through product doors only. Typed api.ts client for operator sessions, approvals, staged writes, grants, scripts/runs, in-app skills, deploy truth.
---

# snappy-os-operator — Agent Instructions

You are operating SnappyOS (local-first governed AI gateway, port 3147) as an
external operator. Every action goes through a product door — the same HTTP
routes the app uses — and leaves a receipt. Never hand-edit manifests, never
read connector mirror sqlite files directly, never shell connector binaries.
A typed refusal (`source_not_granted`, `action_not_granted`, 409,
`operator_identity_required`) is the product working: mint the grant or switch
planes; never bypass. Read SKILL.md for the Laws; governance.md for grants/
approvals/refusals; genui.md for ComposeUI Live Apps and the review-console
pattern.

## API module

```typescript
import {
  mintOperatorSession, opFetch,
  listApprovals, denyApproval, approveApproval,
  stageConnectorAction, createGrant, updateGrantPolicy,
  createScript, addScriptVersion, runScript, listRuns, getRun,
  createInAppSkill, deployTruth, systemHealth,
} from "~/.claude/skills/snappy-os-operator/api.ts";
```

CLI (all support `--json`):

```bash
npx tsx ~/.claude/skills/snappy-os-operator/api.ts session
npx tsx ~/.claude/skills/snappy-os-operator/api.ts approvals
npx tsx ~/.claude/skills/snappy-os-operator/api.ts deny <approval_id>
npx tsx ~/.claude/skills/snappy-os-operator/api.ts approve <approval_id>
npx tsx ~/.claude/skills/snappy-os-operator/api.ts stage '{"connector":"google-calendar","action":"events_insert","args":{...}}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-create '{"grantee_id":"...","actions":["..."],"purpose":"...","approval_policy":"approve_each"}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-update <grant_id> approve_each
npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-create '{"name":"...","prompt":"..."}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-version <script_id> '{"prompt":"...","note":"..."}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-run <script_id> '{"inputs":{...}}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts runs
npx tsx ~/.claude/skills/snappy-os-operator/api.ts run <run_id>
npx tsx ~/.claude/skills/snappy-os-operator/api.ts skill-create '{"slug":"...","name":"..."}'
npx tsx ~/.claude/skills/snappy-os-operator/api.ts deploy-truth
npx tsx ~/.claude/skills/snappy-os-operator/api.ts health
```

## Functions

| Function | Door | Notes |
|---|---|---|
| `mintOperatorSession()` | `POST /operator/session` | Master-key bearer in, session token out; receipted |
| `opFetch(path, init?)` | any | Session-header fetch; caches token, re-mints once on 401/403 |
| `listApprovals()` | `GET /approvals/lifecycle` | THE queue; rows carry payload_preview; 15-min expiry |
| `denyApproval(id)` / `approveApproval(id)` | `POST /provider-approvals/:id/{deny,approve}` | Session-only; approve executes exact staged args |
| `stageConnectorAction({connector, action, args})` | `POST /hub/connector-action` | apply:false; approve_each grant mints a real approval |
| `createGrant({grantee_id, sources?, actions?, purpose, approval_policy?})` | `POST /hub/grants/create` | Default stage_only mints NO approval — pass approve_each for decidable writes |
| `updateGrantPolicy(grant_id, policy)` | `POST /hub/grants/update` | Fix for stage_only terminal previews |
| `createScript({name, prompt, inputs?, model?})` | `POST /scripts` | Prompt is the harness instruction (e.g. "Call ComposeUI once…") |
| `addScriptVersion(script_id, prompt, note?)` | `POST /scripts/:id/versions` | Full contract freeze; omitted facets inherit |
| `runScript(script_id, inputs?)` | `POST /scripts/:id/run` | Durable Run via /dispatch/chat |
| `listRuns()` / `getRun(id)` | `GET /runs`, `GET /runs/:id` | Poll status/outcome; records carry cost_usd |
| `createInAppSkill({slug, name, ...})` | `POST /skill/create` | Scaffolds state/skills/<slug>/; operator identity required; 409 if exists |
| `deployTruth()` | `GET /deploy-truth` | Before claiming anything ships |
| `systemHealth()` | `GET /system-health` | Detectors/dispatch/runtime/heartbeat |

## Rules

- **Never stage inferred facts.** Uncertain recipient/amount/date → GenUI
  review console (genui.md); the human's picks become staged args verbatim.
- **Never upload HTML to Artifacts** when the deliverable is a surface —
  compose a native Live App via the script road (createScript → runScript).
- **Approve/deny are human-plane.** api.ts holds an operator session (dev-tool
  override); a remote AI hub never does — do not design flows assuming it will.
- **Verify with fresh reads.** A same-session return value is a toast, not
  evidence. Re-read the queue/run/Live App out-of-process before claiming done.
- **stage_only trap**: terminal preview with `approval_id: null` looks like
  success but is a dead end — flip the grant to approve_each and re-stage.
- **An approval carries its own deadline** — read `expires_at` off the row,
  never assume a window. Xano connector queue: 24h, stamped once by
  `Action/stage` (1687). Local provider-approvals: 30 days while it waits for
  a human (`APPROVAL_TTL_MS`). The 15 minutes you may remember is
  `APPROVED_TOKEN_TTL_MS`, the post-approval execution token — not the wait.
  Re-stage identical args if one lapses.
- No fallbacks, no mocks: if a door fails, surface the typed error verbatim.

## Uses

- `snappy-settings` — `env("SNAPPY_MASTER_KEY")` credential loader
- `snappy-dispatch` — cheap-model dispatch for grunt work
- In-app: `state/skills/snappy-os-operator`, `state/skills/printing-press`
Show produced work with `snappy-faces`: call `draw` for image channels or `lang` for MCP Apps.


<!-- SKILL-INDEX-START -->
[snappy-os-operator Index]|root: ~/.claude/skills/snappy-os-operator|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,genui.md,governance.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 |
|---|---|---|---|
| `approvals` | `status?` | `read` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts approvals` |
| `approve` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts approve` |
| `deny` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts deny` |
| `deploy-truth` | — | `read` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts deploy-truth` |
| `grant-create` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-create` |
| `grant-update` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts grant-update` |
| `health` | — | `read` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts health` |
| `run` | `run-id` | `read` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts run <run-id>` |
| `runs` | `script-id?` | `read` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts runs` |
| `script-create` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-create` |
| `script-run` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-run` |
| `script-version` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts script-version` |
| `session` | — | `write-reversible` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts session` |
| `skill-create` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts skill-create` |
| `stage` | — | `write` | `npx tsx ~/.claude/skills/snappy-os-operator/api.ts stage` |

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