docs/plans/agent-native/000-agent-native-index.md
AI agents are now a primary operator of Prisma: they scaffold projects, edit schemas, run migrations, and debug production incidents. "Agent-native" means an agent operating Prisma succeeds by default:
.claude/skills/, .agents/skills/) so agents work from current, version-matched
documentation instead of stale training data.every, silently dropped undefined) are documented in skills
with exact, engine-verified semantics — and fixed in the product where feasible.prisma mcp, skills, the platform CLI) are
discoverable and mutually consistent.<skill>/SKILL.md + references/),
installable via npx skills add prisma/skills [--skill <name>]. Skills target ORM 7.6.x:
prisma-cli, prisma-upgrade-v7, prisma-client-api, prisma-driver-adapter-implementation,
prisma-database-setup, prisma-postgres, prisma-compute, plus an unlisted
prisma-postgres-setup.packages/1-framework/3-tooling/cli/src/commands/init/skill-install.ts): init
shells out to the upstream skills CLI once per skill source, non-interactively
(--agent cursor claude-code codex windsurf --skill '*' -y), pins the usage skills to the
CLI's own version (#v<cliVersion>), and supports --no-skill.prisma mcp exists (packages/cli/src/mcp/MCP.ts): a stdio MCP server exposing
migrate-status, migrate-dev, migrate-reset, and Prisma-Studio tools by shelling back
into the CLI.packages/migrate/src/utils/ai-safety.ts) blocks db drop,
db push --force-reset, and migrate reset when an agent is detected. Marker modernization
is in review (PR #29684).packages/cli/src/utils/nps/survey.ts) provides exactly the
machinery a one-time interactive offer needs: TTY detection, CI/container/git-hook gating,
a 30-second prompt timeout, and once-per-timeframe persistence in the OS config directory.prisma init (packages/cli/src/Init.ts) scaffolds schema, prisma.config.ts, .env,
and .gitignore; it has an AI path (--prompt/--vibe) and a --non-interactive flag, but
no skill installation.@prisma/cli, binary
prisma-cli) is the separate Prisma Platform / Compute CLI (auth, project, branch,
app deploy, ...). Agents routinely conflate it with the ORM CLI.prisma init project can start with Prisma skills installed for the major agent
runtimes, with a clean opt-out.prisma generate — never in CI, containers, hooks, or non-TTY contexts.typedSql) and documented with
engine-verified semantics where changing it would be breaking.skills CLI, as prisma-next does).prisma mcp functionality (only a safety-interaction audit is in scope here).OR: [] (breaking; we document instead).llms.txt (tracked outside this repo; listed under Future ideas).| ID | Task | Lands in | Priority | Status | Dependencies |
|---|---|---|---|---|---|
| 001 | Install skills during prisma init | prisma/prisma | High | Planned | None |
| 002 | One-time skill offer on prisma generate | prisma/prisma | High | Planned | 001 |
| 003 | AI safety checkpoint: land and follow up | prisma/prisma | High | In review (PR #29684) | None |
| 004 | Skill: connection & configuration routing | prisma/skills | High | Planned | None |
| 005 | Skill + plugin: generate after schema changes | prisma/skills | High | Planned | None |
| 006 | Skill: troubleshooting suite | prisma/skills | Medium | Planned | None |
| 007 | Skill: API pitfalls & preview-feature guidance | prisma/skills | High | Planned | None |
| 008 | Move typedSql out of hidden preview | prisma-engines + prisma/prisma | Medium | Planned | None |
| 009 | Skill: performance investigation | prisma/skills | Medium | Planned | None |
| 010 | Skill: ORM CLI vs platform CLI routing | prisma/skills | Low | Planned | None |
| 011 | Skill: MongoDB upgrade path (v6 → Prisma Next) | prisma/skills | Medium | Planned | None |
npx skills add prisma/skills. They can be authored in parallel by different people.skills CLI version, agent-runtime list).--no-skills opt-out rate on init
(telemetry via the existing PostHog capture path, task 002).skills CLI / repo traffic).--no-skills, and never touches user-level (global) agent config.skills CLI is executed via npx; we pin an exact, vetted version
rather than @latest (deviating from prisma-next deliberately).prisma/skills#v<matching-tag> with fallback to default
branch) and the release-automation ask on the skills repo.generate usually has no
TTY, so the offer is naturally suppressed; the init path is flag-controlled, not prompted.--json mode for diagnostics-heavy commands
(migrate status, validate, version info) so agents stop scraping human-formatted text.prisma mcp tool descriptions with the skills catalog and
document the consent protocol (see task 003's interplay note).llms.txt and agent-readable error pages behind pris.ly short links.