> ## Documentation Index
> Fetch the complete documentation index at: https://supaschema.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Coding agents

> How AI coding agents should install, configure, and use supaschema without cloning the source repository.

supaschema ships active agent context for consuming projects so an AI agent can make schema changes without reading the entire source repository or guessing the migration workflow. Package installation downloads the audited bundle; `supaschema init` installs or merges its Claude, Codex, and AGENTS-compatible surfaces into the consuming project.

For a new project setup, copy the agent prompt from [Installation](/docs/installation#agent-install-prompt). The important instruction is simple: install the package with the consuming project's package manager, run `supaschema init`, inspect the generated config and install manifest, then run schema commands through that same manager's local runner.

## Agent workflow

<Steps>
  <Step title="Install the package">
    Install `supaschema` in the package or workspace that owns the schema
    workflow. Do not clone the supaschema repository into the project unless you
    are intentionally developing supaschema itself.
  </Step>

  <Step title="Review installed context">
    `supaschema init` installs or merges the active agent files and records the
    result in `.supaschema/install.json`. The raw package copies remain under
    `node_modules/supaschema/agent-bundle/` for audit and repair. When hosted
    docs are unavailable, start with `agent-bundle/docs/index.md`; the offline
    MDX corpus remains inside `node_modules` and is not copied by init.
  </Step>

  <Step title="Edit schema intent">
    Change the configured declarative SQL tree, such as `database/schemas/**`,
    `neon/schemas/**`, `aws-postgresql/schemas/**`, or `supabase/schemas/**`.
  </Step>

  <Step title="Run the workflow commands">
    Run `diff`, `check`, and `types` through the local runner from the install
    prompt. `diff` renders the migration, `check` gates replay safety, and
    `types` regenerates TypeScript and Zod outputs.
  </Step>

  <Step title="Report the result">
    Summarize the generated migration, generated outputs, target runner
    expectations, and any `SUPA_*` diagnostic. Apply only through an explicit
    user request or a config-gated `supaschema apply` workflow with resolved
    targets and required remote approval.
  </Step>
</Steps>

## Installed agent context

The public npm package includes the consumer-safe raw surfaces needed for that workflow:

### Workflow and policy

<CardGroup cols={2}>
  <Card title="Install prompt" icon="clipboard-list" href="/docs/installation#agent-install-prompt">
    Copyable setup instructions for another coding agent.
  </Card>

  <Card title="Rule" icon="scale-balanced" href="/docs/coding-agents/agent-bundle">
    Durable migration policy: generated files are not hand-edited, destructive
    intent must be explicit, and apply is config-gated.
  </Card>

  <Card title="Skills" icon="bot" href="/docs/coding-agents/agent-bundle">
    Three curated workflows cover core policy, migration execution, and ongoing
    maintenance.
  </Card>
</CardGroup>

### Runtime and reference

<CardGroup cols={2}>
  <Card title="Hooks" icon="webhook" href="/docs/coding-agents/agent-bundle">
    Write-time guardrails that block generated migration edits, run diff or
    config-gated apply after schema edits, and sync installed LLM surfaces.
  </Card>

  <Card title="Offline docs" icon="book-open" href="/docs/coding-agents/agent-bundle">
    A byte-exact MDX corpus with a sorted canonical-URL index, available inside
    the installed package without adding documentation files to the project.
  </Card>
</CardGroup>

## Optional discovery surfaces

Use these only when the agent or documentation client supports them.

<CardGroup cols={2}>
  <Card title="Hosted skill" icon="sparkles">
    Public agent skill metadata for clients that can read
    `https://supaschema.com/docs/skill.md`.
  </Card>

  <Card title="llms.txt" icon="file-text">
    Compressed docs context for agents that load
    `https://supaschema.com/docs/llms.txt`.
  </Card>

  <Card title="MCP docs" icon="plug">
    Mintlify MCP endpoint for documentation-aware clients at
    `https://supaschema.com/docs/mcp`.
  </Card>

  <Card title="npx skills" icon="download" href="https://github.com/vercel-labs/skills">
    Installs reusable skill context only; project setup still comes from the
    package manager plus `supaschema init`.
  </Card>
</CardGroup>

<Note>
  The npm package is the project integration path. `npx skills` is useful for
  reusable agent context, but it cannot replace project config,
  path-confirmation state, or the active agent surfaces installed by `supaschema
      init`.
</Note>
