Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/iterate/sqlfu/llms.txt

Use this file to discover all available pages before exploring further.

sqlfu ships an agent skill at skills/using-sqlfu/SKILL.md. It gives coding agents the project-specific facts they need before editing a sqlfu project: where to find the config, why SQL files are the authored source, how to draft migrations instead of inventing them, and which commands regenerate TypeScript outputs.

What the skill provides

The skill is a compact SKILL.md file in the skills format — an agent-agnostic plain-text operating guide. When an agent loads it, the skill supplies:
  • Where to start — find sqlfu.config.ts and read it before touching anything. The config says where definitions.sql, migrations/, and the query directory live.
  • Which files are source — SQL files are authored source. Generated wrappers under .generated/ are output; do not hand-edit them.
  • How schema changes work — edit definitions.sql, run sqlfu draft, review the migration, run sqlfu migrate, then sqlfu generate and sqlfu check.
  • How query changes work — add or edit a .sql file, run sqlfu generate, import the new wrapper.
  • The command referencesqlfu init, draft, migrate, pending, applied, goto, baseline, sync, generate, check, and serve, with one-line descriptions.

Installing the skill

npx skills add mmkal/sqlfu/skills/using-sqlfu
This installs the skill into the project so supported agents (Claude Code, Cursor, Copilot, and others that read SKILL.md files) will pick it up automatically when working in the repo.
The skill is self-contained. It does not depend on the sqlfu package itself. The SKILL.md format is agent-agnostic, so the same file works across different coding assistants.

Using with URL-fetching agents

If your coding agent can fetch URLs but does not have the skill installed, point it at the agent documentation index before starting a sqlfu task. sqlfu publishes an llms.txt file at https://sqlfu.dev/llms.txt that lists the agent-oriented documentation in a format agents can consume directly. Paste this prompt at the start of a sqlfu task:
You are a sqlfu assistant. Read https://sqlfu.dev/llms.txt to load the
agent-oriented documentation index, then act as my pair on this project.

Goal: help me edit a sqlfu project while keeping SQL as the authored source.
Inspect sqlfu.config.ts, definitions.sql, migrations/, sql/*.sql, and generated
wrappers before making changes. Use npx sqlfu check, draft, migrate, generate,
and format according to the docs. Do not hand-edit generated wrappers unless I
explicitly ask for that.

When to use the skill

Editing application code

Any time an agent will edit code that imports from generated wrappers, the skill prevents it from hand-modifying the generated files instead of regenerating them.

Schema changes

The skill teaches agents the correct migration workflow: edit definitions.sql, draft, review, migrate — not invent SQL by hand.

Query changes

The skill ensures agents edit .sql files and run sqlfu generate, rather than writing TypeScript wrappers directly.

Repos with checked-in generated files

Especially useful when generated files are committed and reviewed through pull requests, where an agent editing output files would create misleading diffs.
The skill should not replace the docs. It is a compact operating guide for agents that already have a concrete code-editing task. For deeper context on any feature, the docs site is the right place to look.

Keeping the skill current

When sqlfu’s workflow changes, update the skill alongside the docs. The facts most likely to drift are:
  • where config is loaded from
  • whether generated files are committed
  • which commands update migrations, wrappers, and formatting
  • which generated outputs are safe to edit by hand
That maintenance matters because the skill is often read before an agent opens the docs site.

Build docs developers (and LLMs) love