Skip to content
NewFrom Mongoose to SQL: migrating MongoDB to PostgreSQL7 min read

AI Coding Agents

Paste this into any coding agent, or open it in Cursor or in Claude Code for VS Code, which open it in the project you have open and send nothing until you do. It works in a new project and in one that already uses UQL.

Setup prompt
Set up UQL (uql-orm) in this project.
1. If uql-orm (npm package) isn't installed, install it and the driver for this project's database. If you can't tell which database, ask me.
2. Add this line to AGENTS.md: To know how UQL ORM works, read `node_modules/uql-orm/skills/uql-orm/SKILL.md`: it matches the installed uql-orm.
3. Add https://uql-orm.dev/mcp as an MCP server named uql for this agent: HTTP transport, no key.
4. If there's no uql.config.ts yet, read the skill and follow it to:
- create uql.config.ts, reading the database credentials from environment variables
- add one entity that fits this project
- write one typed query that uses it
5. Ask me before you change the database.
6. Run the type checker, then tell me what you changed.

It installs UQL if the project lacks it, and gives the agent two things: the UQL skill, which teaches it to write UQL, and the docs, which it looks up as it goes. It asks before it changes the database.

uql-orm ships an agent skill. It covers how a query is shaped, how entities are declared, the mistakes agents make most, and where each detail lives in these docs. The skill is inside the package, so each uql-orm upgrade brings the skill for that version.

Add this line to your project’s AGENTS.md, which Claude Code, Codex, Cursor, GitHub Copilot and most other agents read on their own:

AGENTS.md
To know how UQL ORM works, read `node_modules/uql-orm/skills/uql-orm/SKILL.md`: it matches the installed uql-orm.

The docs MCP server at https://uql-orm.dev/mcp adds search, so the agent finds the right page without knowing its URL. It needs no key, and its three tools are read-only:

Tool What it answers
search_docs The pages for a topic, most relevant first, with the passage that matched
get_doc One page as Markdown, by the path search_docs gives or by its URL
read_skill The skill above, for a client that cannot install one

Add it to your agent:

Terminal window
claude mcp add --transport http uql https://uql-orm.dev/mcp

Every page here answers with Markdown when an agent asks for it, as Claude Code and Cursor do. Each page is also Markdown at its URL plus .md, such as /querying/relations.md, and /llms.txt indexes them all. An agent that can fetch URLs needs only that index:

To know how UQL ORM works, read https://uql-orm.dev/llms.txt and fetch the pages for the task.

To load the whole site at once, /llms-full.txt is every page in one file.