← All Skills

snappy-database

v1.0.0
7 files, 98.9 KB ~10,238 words · 41 min read Updated 2026-09-09

snappy-database skill

39 of 47 checks pass
What it can do
describe tableread
query sqlread
tablesread
What does not pass yet
Architecture 3 endpoints
🔑 Bearer token auth
GETPOST
api.telegram.org2 endpoints
POST/bot${BOT_TOKEN}/sendMessage
GET/bot${BOT_TOKEN}/sendMessage
rb-content-engine.fly.dev1 endpoint
POST/sql
$ npx snappy-skills install snappy-database
zip ↓
Documents
AGENTS.md

snappy-database -- loader#

You need to find or query a Xano table. This loader tells you where to look.

API module#

typescriptimport { listTables, describeTable, query } from "../snappy-database/api.ts";
Function Purpose
listTables() List all tables in the Xano workspace
describeTable(name) Get schema (columns) for a specific table
query(sql) Run raw SQL against the content engine Neon Postgres

CLI:

bashnpx tsx ~/.claude/skills/snappy-database/api.ts tables
npx tsx ~/.claude/skills/snappy-database/api.ts describe <table>
npx tsx ~/.claude/skills/snappy-database/api.ts query "SELECT ..."

Two Xano instances -- know which one#

Instance Base URL Purpose
MAIN https://xnwv-v1z6-dvnr.n7c.xano.io Snappy primary (contacts, invoices, calendar, content, comms)
ORBITER https://xh2o-yths-38lt.n7c.xano.io Enrichment pipeline (read-only from Snappy -- Mark's processes write)

Auth#

Credentials load from snappy-settings/.env.cache via env("KEY") -- see snappy-settings/SKILL.md. To export into shell: source ~/.claude/skills/snappy-settings/scripts/load-env.sh. Every curl needs -H "Authorization: Bearer $XANO_METADATA_TOKEN".

Finding the right table#

  1. Check the master mapping in SKILL.md § "Master Skill -> Table Mapping"
  2. Field-by-field schemas: tables.md
  3. Copy-paste query recipes: query-patterns.md
  4. Naming rules + vocabularies: xano-conventions.md

Key API groups (MAIN)#

Group Purpose
api:PB9UH7b9 Main -- contacts, calendar, email, FreshBooks, LinkedIn, knowledge
api:OehldiTW Email ops -- smart-inbox, triage
api:hZB4Dj0c Integrations -- Slack, WhatsApp, YouTube
api:8wuQ86By Queue/async
api:ACdo1OLG FreshBooks client ops
api:XOwEm4wm Slack V2
api:e6emygx3 Auth

content_atoms (NOT Xano)#

The content_atoms table lives on rb-content-engine.fly.dev (Neon Postgres), not Xano. Persist nuggets via:

bashnpx tsx ~/.claude/skills/snappy-mine/persist-nuggets.ts <file>.json

Rules#

  • Do NOT write to a table another skill owns -- check the owner column in the master mapping
  • Do NOT query Orbiter (xh2o-yths-38lt) with writes -- it's read-only from Snappy
  • Do NOT hard-delete rows -- use deleted_at soft delete
  • Do NOT rename fields in place -- add new, backfill, drop old
  • Do NOT hardcode table IDs -- use API paths (api:GROUP/endpoint)
  • Do NOT confuse the two Xano instances

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
describe table read npx tsx ~/.claude/skills/snappy-database/api.ts describe <table>
query sql read npx tsx ~/.claude/skills/snappy-database/api.ts query <sql>
tables read npx tsx ~/.claude/skills/snappy-database/api.ts tables

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

If this AGENTS.md does not cover the case you are working on and you had to read other files to find the answer, you have two jobs before you finish:

1. Fix it now (P -- proportional correction). If the missing information fits in 1-5 lines, edit this AGENTS.md directly -- add the line, the table row, the one-liner, whatever you had to go find. Keep edits surgical. Do not restructure sections or rewrite paragraphs. The goal is: the next agent that hits this case won't have to leave the loader.

2. Log it always. Whether or not you fixed it, append one line to the feedback log:

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

Tag FIXED if you patched the loader in step 1. Tag LOGGED if the gap was too large to patch inline (needs a section rewrite, new workflow, etc.) -- those get picked up by drain-skill-regen.sh for a full regen pass (I -- integral correction).

Examples:

  • [2026-04-08T14:12:00Z] snappy-linkedin: loader had no image alt text guidance [FIXED]
  • [2026-04-08T14:15:33Z] snappy-ops: loader missing entire Slack-down recovery workflow [LOGGED]

Do not skip this. A missing report means the same gap will happen next time. A missing fix means you chose to let the next agent stumble on the same thing you just solved.

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

[snappy-database Index]|root: ~/.claude/skills/snappy-database|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,query-patterns.md,tables.md,xano-conventions.md}

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

---
name: snappy-database
role: Loader for data layer agents. Tells you which Xano workspace, table, and API group backs any feature.
loaded-by: PreToolUse hook (auto-injected when "snappy-database" is mentioned)
---

# snappy-database -- loader

You need to find or query a Xano table. This loader tells you where to look.

## API module

```typescript
import { listTables, describeTable, query } from "../snappy-database/api.ts";
```

| Function | Purpose |
|----------|---------|
| `listTables()` | List all tables in the Xano workspace |
| `describeTable(name)` | Get schema (columns) for a specific table |
| `query(sql)` | Run raw SQL against the content engine Neon Postgres |

CLI:
```bash
npx tsx ~/.claude/skills/snappy-database/api.ts tables
npx tsx ~/.claude/skills/snappy-database/api.ts describe <table>
npx tsx ~/.claude/skills/snappy-database/api.ts query "SELECT ..."
```

## Two Xano instances -- know which one

| Instance | Base URL | Purpose |
|----------|----------|---------|
| **MAIN** | `https://xnwv-v1z6-dvnr.n7c.xano.io` | Snappy primary (contacts, invoices, calendar, content, comms) |
| **ORBITER** | `https://xh2o-yths-38lt.n7c.xano.io` | Enrichment pipeline (read-only from Snappy -- Mark's processes write) |

## Auth

Credentials load from `snappy-settings/.env.cache` via `env("KEY")` -- see `snappy-settings/SKILL.md`. To export into shell: `source ~/.claude/skills/snappy-settings/scripts/load-env.sh`. Every curl needs `-H "Authorization: Bearer $XANO_METADATA_TOKEN"`.

## Finding the right table

1. Check the master mapping in [SKILL.md](SKILL.md) § "Master Skill -> Table Mapping"
2. Field-by-field schemas: [tables.md](tables.md)
3. Copy-paste query recipes: [query-patterns.md](query-patterns.md)
4. Naming rules + vocabularies: [xano-conventions.md](xano-conventions.md)

## Key API groups (MAIN)

| Group | Purpose |
|-------|---------|
| `api:PB9UH7b9` | Main -- contacts, calendar, email, FreshBooks, LinkedIn, knowledge |
| `api:OehldiTW` | Email ops -- smart-inbox, triage |
| `api:hZB4Dj0c` | Integrations -- Slack, WhatsApp, YouTube |
| `api:8wuQ86By` | Queue/async |
| `api:ACdo1OLG` | FreshBooks client ops |
| `api:XOwEm4wm` | Slack V2 |
| `api:e6emygx3` | Auth |

## content_atoms (NOT Xano)

The `content_atoms` table lives on **rb-content-engine.fly.dev** (Neon Postgres), not Xano. Persist nuggets via:
```bash
npx tsx ~/.claude/skills/snappy-mine/persist-nuggets.ts <file>.json
```

## Rules

- Do NOT write to a table another skill owns -- check the owner column in the master mapping
- Do NOT query Orbiter (`xh2o-yths-38lt`) with writes -- it's read-only from Snappy
- Do NOT hard-delete rows -- use `deleted_at` soft delete
- Do NOT rename fields in place -- add new, backfill, drop old
- Do NOT hardcode table IDs -- use API paths (`api:GROUP/endpoint`)
- Do NOT confuse the two Xano instances

## 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 |
|---|---|---|---|
| `describe` | `table` | `read` | `npx tsx ~/.claude/skills/snappy-database/api.ts describe <table>` |
| `query` | `sql` | `read` | `npx tsx ~/.claude/skills/snappy-database/api.ts query <sql>` |
| `tables` | — | `read` | `npx tsx ~/.claude/skills/snappy-database/api.ts tables` |

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

If this AGENTS.md does not cover the case you are working on and you had to read other files to find the answer, you have two jobs before you finish:

**1. Fix it now (P -- proportional correction).** If the missing information fits in 1-5 lines, edit this AGENTS.md directly -- add the line, the table row, the one-liner, whatever you had to go find. Keep edits surgical. Do not restructure sections or rewrite paragraphs. The goal is: the next agent that hits this case won't have to leave the loader.

**2. Log it always.** Whether or not you fixed it, append one line to the feedback log:

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

Tag `FIXED` if you patched the loader in step 1. Tag `LOGGED` if the gap was too large to patch inline (needs a section rewrite, new workflow, etc.) -- those get picked up by `drain-skill-regen.sh` for a full regen pass (I -- integral correction).

Examples:

- `[2026-04-08T14:12:00Z] snappy-linkedin: loader had no image alt text guidance [FIXED]`
- `[2026-04-08T14:15:33Z] snappy-ops: loader missing entire Slack-down recovery workflow [LOGGED]`

**Do not skip this.** A missing report means the same gap will happen next time. A missing fix means you chose to let the next agent stumble on the same thing you just solved.

<!-- SKILL-INDEX-START -->
[snappy-database Index]|root: ~/.claude/skills/snappy-database|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,query-patterns.md,tables.md,xano-conventions.md}
<!-- SKILL-INDEX-END -->

Keyboard Shortcuts

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