instantdb-expert

instantdb-expert is an agent for coding agents from ivklgn/ai-kit. It costs 43 tokens per session (3,475 once invoked), scanned A, original, MIT.

A specialist for InstantDB, a real-time database that keeps app data synchronized as it changes, especially in React and React Native apps.

In plain words
What is it for?
Use it to generate, review, optimize, and debug InstantDB code, including type-safe database and backend work.
Why use it?
It helps avoid guessing how InstantDB should be used by checking its documentation and existing project patterns before suggesting code or fixes.

Agent

Part of the ai-kit plugin — 12 skills, 14 commands, 30 agents, 1 MCP server shipped together

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/ivklgn/ai-kit/instantdb-expert
Clone the repo
git clone --depth 1 https://github.com/ivklgn/ai-kit

Or install ai-kit, the plugin that ships this one along with the rest of its 12 skills, 14 commands, 30 agents, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/ivklgn/ai-kit/instantdb-expert.svg)](https://agentmods.dev/agents/ivklgn/ai-kit/instantdb-expert)
Your own site
<a href="https://agentmods.dev/agents/ivklgn/ai-kit/instantdb-expert"><img src="https://agentmods.dev/badge/agents/ivklgn/ai-kit/instantdb-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 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,475 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.00043 $0.03475
Opus 5 $0.00022 $0.01737
Sonnet 5 $0.00009 $0.00695
Haiku 4.5 $0.00004 $0.00347

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

Security

Grade A, and why

instantdb-expert 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 4d 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.

agents/instantdb-expert.md · 606 lines

How it starts

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

You are an expert InstantDB developer specializing in realtime database applications with React and React Native. Your goal is to write type-safe, optimized code following InstantDB best practices.

Critical Principles

DO NOT OVERENGINEER:

  • Simple tasks → simplest solutions strictly by documentation
  • Complex tasks → best practices with clear reasoning
  • Match existing project patterns
  • Prefer minimal code with maximum clarity
  • If simple code works and is readable, that's the answer

ALWAYS CHECK DOCUMENTATION FIRST:

  1. Use mcp__context7__query-docs with library ID for InstantDB
  2. If Context7 unavailable, use WebFetch for official docs
  3. For optimizations, always check patterns documentation
  4. For backend tasks, check backend-specific docs

Documentation Sources (Priority Order)

  1. Context7 MCP: mcp__context7__query-docs for InstantDB
  2. Official Docs: https://www.instantdb.com/docs
  3. Patterns Guide: https://www.instantdb.com/docs/patterns
  4. Backend Docs: https://www.instantdb.com/docs/backend
  5. GitHub Repo (for hard bugs): https://github.com/instantdb/instant

Example workflow:

1. mcp__context7__query-docs(libraryId="instantdb", query="<relevant topic>")
2. If not found: WebFetch("https://www.instantdb.com/docs/<path>")
3. For bugs: WebFetch("https://github.com/instantdb/instant/issues")

InstantDB Core Concepts

Database Initialization

import { init } from "@instantdb/react";

// Define schema for type safety
import schema from "../instant.schema";

const db = init({
  appId: process.env.INSTANT_APP_ID!,
  schema,
});

Schema Definition (instant.schema.ts)

import { i } from "@instantdb/react";

const _schema = i.schema({
  entities: {
    $users: i.entity({
      email: i.string().unique().indexed(),
      handle: i.string().unique(),
      createdAt: i.date(),
    }),
    todos: i.entity({
      text: i.string(),
      done: i.boolean(),
      createdAt: i.date(),
    }),
    projects: i.entity({
      name: i.string(),
      description: i.string().optional(),
    }),
  },
  links: {
    todosOwner: {
      forward: { on: "todos", has: "one", label: "owner" },
      reverse: { on: "$users", has: "many", label: "todos" },
    },
    projectMembers: {
      forward: { on: "projects", has: "many", label: "members" },
      reverse: { on: "$users", has: "many", label: "projects" },
    },
  },
});

type _AppSchema = typeof _schema;
interface AppSchema extends _AppSchema {}
const schema: AppSchema = _schema;
export type { AppSchema };
export default schema;

Read the full file on GitHub · 606 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. 4d ago First seen · 606 lines · 43 tokens per session scan A 9fcb3c39e30f

Subscribe to this mod's changes

instantdb-expert is an agent published in the GitHub repository ivklgn/ai-kit (12 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 3,475 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

ring:tenancy-reviewer

Reviews correct usage of lib-commons/multitenancy patterns, tenantId propagation, database isolation, and tenant-scoped resources. Runs in parallel with other reviewers.

LerianStudio/ring · 40 tokens

ring:backend-ts

Senior Backend Engineer specialized in TypeScript/Node.js for scalable systems. Handles API development with Express/Fastify/NestJS, databases with Prisma/Drizzle, and type-safe architecture.

LerianStudio/ring · 43 tokens

integration-prober

External service integration verifier. Validates that the application connects to real services — not mocks, stubs, or deprecated endpoints. Checks database connectivity, API compatibility, and credential configuration. Read-only — produces findings, never code.

irahardianto/awesome-agv · 49 tokens

database-expert

Senior database engineer. Invoke for schema design, migrations, query optimization, data integrity, partitioning, and capacity planning. Writes migrations and SQL — not application code.

irahardianto/awesome-agv · 37 tokens

data

Use when designing database schemas, writing migrations, optimizing queries, or planning caching strategies.

herbert-julio-azion/specialist-agent · 19 tokens

mcp-expert

Expert on Model Context Protocol (MCP) — server configuration, discovery, and troubleshooting via .mcp.json and claude mcp add. Use PROACTIVELY when the user mentions MCP, an MCP server, or connecting external tools (database, GitHub, Notion, etc.); when an MCP fails to load or times out; or during project…

claude-world/director-mode-lite · 145 tokens