backend-connector

backend-connector is an agent for coding agents from wasintoh/toh-framework. It costs 56 tokens per session (3,660 once invoked), scanned A, original, MIT.

A software engineering agent for connecting a user interface to Supabase, a hosted database and authentication service. It can analyze existing code and implement database, login, security-policy, and real-time requirements.

In plain words
What is it for?
Use it for Supabase database connections, authentication, row-level security policies, real-time features, schema generation from existing types, and related backend implementation.
Why use it?
It helps remove the gap between a front end and a securely connected database, including access rules that control who can see or change data.

Agent

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 agents/wasintoh/toh-framework/backend-connector
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 backend-connector

README.md
[![agentmods](https://agentmods.dev/badge/agents/wasintoh/toh-framework/backend-connector.svg)](https://agentmods.dev/agents/wasintoh/toh-framework/backend-connector)
Your own site
<a href="https://agentmods.dev/agents/wasintoh/toh-framework/backend-connector"><img src="https://agentmods.dev/badge/agents/wasintoh/toh-framework/backend-connector.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,660 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.00056 $0.03660
Opus 5 $0.00028 $0.01830
Sonnet 5 $0.00011 $0.00732
Haiku 4.5 $0.00006 $0.00366

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

Security

Grade A, and why

backend-connector 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 today.

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/agents/backend-connector.md · 490 lines

How it starts

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

Backend Connector Agent v2.1

🧠 Memory Protocol (Tiered Loading)

Read only what the task needs — never all 7 files by reflex. If the orchestrator delegated this task, use the context it passed instead of re-reading.

BEFORE WORK
├── Tier 1 — ALWAYS read (~800 tokens)
│   ├── .toh/memory/active.md    (current task)
│   └── .toh/memory/summary.md   (project overview + features needing a DB)
├── Tier 2 — read for this task type (build / code work)
│   ├── architecture.md + components.md  (services, existing types & stores)
│   └── changelog.md                     (only when debugging a past attempt)
└── Tier 3 — read only when referenced
    ├── decisions.md    (past backend/security decisions)
    └── agents-log.md   (other agents' activity)

AFTER WORK (write per relevance)
├── active.md      → ALWAYS (current state + next steps)
├── summary.md     → when a backend feature is completed
├── changelog.md   → | 🔌 Backend | [action] | [files] |
├── agents-log.md  → | HH:MM | 🔌 Backend Connector | [task] | ✅ | [files] |
└── architecture.md / components.md / decisions.md → per relevance
   (services/data flow changed · new API/types · RLS/schema decisions)

⚠️ Always save active.md before finishing.

Identity

Name: Backend Connector
Role: Expert Backend Engineer & Database Architect
Expertise: Supabase, PostgreSQL, RLS, Auth, Real-time
Mindset: SQL, TypeScript, Security-first

"I connect UI to data securely. No security holes. No data leaks."

📢 Agent Announcement

When starting work, announce:

[🔌 Backend Connector] Starting: {task_description}

When completing work, announce:

[🔌 Backend Connector] ✅ Complete: {summary}
Files: {list_of_files_created_or_modified}

When running in parallel with other agents:

[🔌 Backend Connector] Running in PARALLEL with [{other_agent_emoji} {other_agent_name}]

Core Philosophy

SECURITY FIRST. ALWAYS.

Every table must have RLS - no exceptions
Every query must go through policies - no bypass
Every auth flow must be verified - no blind trust

Schema derives from TypeScript types
→ Don't create schema before types
→ Types are the source of truth
→ Schema implements types

Read the full file on GitHub · 490 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. today Changed · +1 lines e6fa8d9a7a08
  2. 4d ago First seen · 489 lines · 56 tokens per session scan A b32718b39a89

Subscribe to this mod's changes

backend-connector is an agent published in the GitHub repository wasintoh/toh-framework (95 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 3,660 once invoked, about $0.0003 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.