toh-connect

toh-connect is a command for coding agents from wasintoh/toh-framework. It costs 12 tokens per session (1,007 once invoked), scanned A, original, MIT.

A command that connects a web app to Supabase, a hosted service for databases and user access rules. It can set up the database structure and security policies, then connect the app to it.

In plain words
What is it for?
Use it to install the Supabase client, create database SQL and row-level security policies, and replace mock functions with Supabase queries while keeping existing function interfaces.
Why use it?
It removes the manual work of designing database tables, writing security rules, and replacing temporary mock data with a real backend.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/wasintoh/toh-framework/toh-connect
Clone the repo
git clone --depth 1 https://github.com/wasintoh/toh-framework

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for toh-connect

README.md
[![agentmods](https://agentmods.dev/badge/commands/wasintoh/toh-framework/toh-connect.svg)](https://agentmods.dev/commands/wasintoh/toh-framework/toh-connect)
Your own site
<a href="https://agentmods.dev/commands/wasintoh/toh-framework/toh-connect"><img src="https://agentmods.dev/badge/commands/wasintoh/toh-framework/toh-connect.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,007 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.01007
Opus 5 $0.00006 $0.00504
Sonnet 5 $0.00002 $0.00201
Haiku 4.5 $0.00001 $0.00101

Measured 5d ago against content hash fd924538ae27, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

toh-connect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/commands/toh-connect.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/toh-connect - Connect Backend

Signature Command 🔌

/toh-connect [service]
/toh-c [service]

What Happens

0. 🚨 READ MEMORY (Tiered Loading — don't blind-read all 7)
   ├── Tier 1 · ALWAYS at start (~800 tokens)
   │   ├── .toh/memory/active.md   (current task)
   │   └── .toh/memory/summary.md  (project overview)
   ├── Tier 2 · read per task type
   │   ├── .toh/memory/architecture.md (structure — build/code work)
   │   ├── .toh/memory/components.md   (existing components — build/code work)
   │   └── .toh/memory/changelog.md    (recent changes — debug work)
   └── Tier 3 · read ONLY when referenced
       ├── .toh/memory/decisions.md    (past decisions)
       └── .toh/memory/agents-log.md   (agent activity)

1. READ Skills
   └── ~/.claude/skills/backend-engineer/SKILL.md

2. SETUP Supabase
   ├── npm install @supabase/supabase-js
   ├── Create lib/supabase.ts
   └── Add env variables template

3. GENERATE Schema
   ├── Analyze existing TypeScript types
   ├── Create SQL for tables
   ├── Create RLS policies
   └── Create triggers (updated_at, etc.)

4. MIGRATE API
   ├── Replace mock functions with Supabase queries
   ├── Keep same function signatures
   └── Add error handling

5. OUTPUT
   ├── SQL file for Supabase dashboard
   ├── Updated API functions
   └── .env.example with required vars

6. 🚨 SAVE MEMORY
   ├── Update active.md (ALWAYS — current state)
   ├── Update summary.md (if project shape changed)
   ├── Update architecture.md (new services)
   ├── Update changelog.md (backend changes)
   ├── Update decisions.md (backend decisions)
   └── Update agents-log.md (if agents delegated)

Example Prompts

# Basic connection
/toh-connect supabase

# Specific tables
/toh-c connect products and orders

# With auth
/toh-connect supabase with auth

# With storage
/toh-c add image upload to Supabase Storage

Output Format

## ✅ Supabase connected successfully!

### Files created:
- `lib/supabase.ts` - Client configuration
- `lib/api/products.ts` - Updated with real queries
- `supabase/schema.sql` - Copy to SQL Editor

### Next steps:

1. **Create Supabase Project**
   - Go to https://supabase.com/dashboard
   - Create new project

2. **Run Schema**
   - Go to SQL Editor
   - Paste content from `supabase/schema.sql`
   - Run

3. **Add Environment Variables**
   ```env
   NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
   NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
  1. Test
    • Refresh app
    • CRUD should work with real database now

Read the full file on GitHub · 138 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 138 lines · 12 tokens per session scan A fd924538ae27

Subscribe to this mod's changes

toh-connect is a command published in the GitHub repository wasintoh/toh-framework (95 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 1,007 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.