npx skills add ...
npx skills add prisma/prisma-next --skill record-gotchas
npx skills add prisma/prisma-next --skill record-gotchas
Capture surprises, workarounds, and rough edges hit while *consuming* the public surface of Prisma Next, Prisma Compute, or Prisma Postgres — anything a real user of these products would experience. Fires whenever an operator (or agent) writes a workaround, hits a surprising failure mode, or finds undocumented behaviour while using one of these three products from the outside (extension authoring, example apps, integration tests, customer reproductions, internal demos, manual repros). Does NOT fire on bugs in code the operator's own team maintains — those are normal product-backlog bugs. In product-team repos (e.g. `prisma-next-ws`), surfaces the gotcha and offers the operator three paths (capture-as-gotcha, file a normal bug, or note-and-move-on). Outside product-team repos (pet projects, hackathon entries, customer codebases), silent-captures into the project's gotchas log AND a Triage-state Linear ticket in the matching gotchas project — no operator escalation. Do not skip the recording step.
A gotcha is friction that a consumer of Prisma Next, Prisma Compute, or Prisma Postgres would feel — something an external user of those products would also experience: a surprising failure mode, an undocumented behaviour, a workaround you wrote, a mental model mismatch with the CLI / runtime / docs. The signal is the consumer's perspective, not the project context — you can hit a gotcha while writing an extension, working in an example app, reproducing a customer report, running an integration test against the public surface, or building anything that consumes the product from the outside.
A gotcha is not a bug in code your team maintains. If you own the surface and you can fix it, that's a normal product bug, filed in the regular product backlog — not a gotcha.
This skill is the canonical workflow for capturing gotchas. When the trigger fires:
gotchas.md or a per-product file).*-gotchas Linear project.When in doubt about whether something is gotcha-worthy, capture it. The cost of a near-duplicate entry is trivial; the cost of losing the learning is permanent.
This skill is not optional for qualifying gotchas. If you wrote a workaround, consulted source code, or hit a behaviour that didn't match the docs while consuming the product, run this skill before the conversation ends.
The trigger depends on the role the operator is wearing in the moment, not on the repo they're sitting in.
| You're doing… | Role | Trigger fires? |
|---|---|---|
| Writing a new extension that uses PN's authoring API | Consuming | Yes |
Working in an example app under examples/ and hitting a CLI / runtime rough edge | Consuming | Yes |
| Reproducing a customer's bug report against the public surface | Consuming | Yes |
| Running an integration test that exercises the public CLI / runtime | Consuming | Yes |
| Building an internal demo with PN / Compute / PPg | Consuming | Yes |
| Fixing a bug in PN core | Maintaining | No — file a normal bug |
| Adding a feature to PN's runtime | Maintaining | No |
| Refactoring an internal package | Maintaining | No |
Worked example. You change schema.prisma, run prisma-next migration plan, and the CLI reports "No changes detected" — because the contract was stale and you hadn't run contract emit. The CLI's mental model didn't match yours; a real user would hit this. That's a gotcha, even though you're sitting in prisma-next-ws and could fix it: you were consuming the migration workflow, not maintaining it.
Ambiguous cases default to capture. If you can't tell which role you were in, capture the gotcha. The team filters at triage.
This skill requires the Linear MCP plugin to be installed and authenticated. Without it, ticket filing is impossible and the workflow is incomplete.
If the Linear MCP plugin is not available or not authenticated, halt and tell the operator something like:
I just hit a gotcha I'd like to record, but the Linear MCP plugin isn't available. Please install and authenticate
plugin-linear-linear(the Linear plugin for Cursor), then re-run the request. The skill needs to file a Triage-state ticket in the matching Prisma gotchas project.
Do not proceed. Do not write the file entry without the ticket. The two halves are intentionally coupled — the file is the local record; the ticket is the team's signal. Both must exist for the pipeline to work.
Each product has a single Linear project for all tickets — both gotchas and normal bugs. Gotchas and normal bugs are distinguished by status / labels, not by which project they're filed in.
| Product | Linear project |
|---|---|
Prisma Next ORM (@prisma-next/*, schema, generated client, migration tooling) | pn-gotchas |
Prisma Compute (@prisma/compute-cli, deploy, runtime, env management) | compute-gotchas |
Prisma Postgres (PPg, @prisma/dev, dialect behaviour) | ppg-gotchas |
Filing convention.
Triage, no priority, no labels — the project itself is the dogfood filter.The project names retain the -gotchas suffix for historical reasons; treat them as the canonical Linear project for each product regardless.
If a gotcha straddles two products, pick the surface where you were when it bit, file there once, and mention the second product in the body.
If you find yourself wanting to file a gotcha for a fourth product (Eclipse, Slack, Bun, Next.js, etc.), stop. This skill is scoped to the three Prisma products. Other tools' bugs go in those tools' own issue trackers. Exception: if a third-party bug only surfaces because of how a Prisma product is structured, record it on the Prisma side and link the third-party tracker.
Where to record locally, in priority order:
docs/prisma-next-gotchas.md, docs/compute-gotchas.md, or docs/ppg-gotchas.md exist — append to the matching one.gotchas.md at the repo root. Create it (using the bootstrap template below) if missing.How the agent behaves when the trigger fires depends on which repo it's in:
prisma-next-ws, the Compute workspace, the PPg workspace) → surface the gotcha and offer three paths. The operator is likely on the affected product's team and is in a position to decide whether this is gotcha-worthy, a regular bug, or already known. Don't capture silently — ask.If you can't tell which kind of repo you're in, treat it as "other" — silent capture is the safer default for a dogfood pipeline.
Surface the gotcha to the operator in one short message — symptom, hypothesis on cause, the workaround you used or are about to use — then offer:
Triage status, no priority, no labels). The default when the operator wants the team to see this through a dogfood lens.The operator picks. Default to capture-as-gotcha if the operator doesn't choose.
Skip this skill for:
--service instead of positional"). File feature requests in Linear directly, not as gotchas.pg, Slack, etc.) — those go in the relevant tool's tracker. Exception: if the third-party bug only surfaces because of how a Prisma product is structured, record it on the Prisma side and link the third-party tracker.Numbered, in order. Don't skip steps; the value comes from doing all of them.
If the plugin-linear-linear MCP isn't installed or isn't authenticated, halt per § Hard prerequisite.
Use the table in § The three products. If the gotcha straddles two, pick the surface you were on when it bit and mention the second in the body.
Determine whether you're in a product-team repo (see § Escalation mode). If yes, surface the gotcha to the operator and offer the three paths; resume the workflow only if they pick "capture as gotcha." If they pick "file a normal bug," skip to § Filing a normal bug below; if they pick "note-and-move-on," exit the skill.
If you're not in a product-team repo, proceed with silent capture.
Before filing, search the matching *-gotchas project for an open ticket with similar symptoms. Use the symptom keyword(s) — error message text, API name, CLI flag, package version, etc.
Per § The three products. Use the existing per-product file if present; otherwise create gotchas.md at repo root with the bootstrap template below.
Use the file-entry template below verbatim. Keep entries 10–25 lines. If you need more, you're either explaining a generic concept (write a runbook instead) or describing two gotchas (split them).
In the matching *-gotchas project:
Triage. Do not set priority — let the team triage.Capture the Linear ticket id (e.g. TML-1234) and URL — you'll need both for the file entry's **Filed upstream:** line.
## Contents list at the top, with a working anchor link.**Filed upstream:** line with the real Linear ticket id and URL from step 7.One commit per gotcha (or per closely-related group). Conventional shape:
The commit lands alongside the workaround in the same PR. Don't gate the operator's primary work on this — record inline as you finish the workaround.
If you cited a working tree path in the Linear ticket because you hadn't committed yet, update the ticket description after the commit lands (replace with a permalink to the committed line range).
When the operator picks "file a normal bug" instead of capturing as a gotcha:
Source: line (there's no local gotcha file).Triage / no-labels gotcha convention. Ask the operator if you don't know the team's defaults.If the operator wants to file the ticket themselves rather than have the agent do it, draft the body and hand off — they paste.
Used in gotchas.md (or the matching per-product file).
Naming the heading. Lead with the symptom (OG image URLs fall back to localhost:8080) or the constraint (pg/timestamptz codec types output as string | Date), not the solution (Set metadataBase). Future-you searches by what they saw, not what they did about it.
Triage. No priority, no labels — the project itself is the dogfood filter.After the gotcha-recording commit lands, update the ticket's **Source:** line to point at the permalink for the committed line range (Linear MCP supports issue editing).
gotchas.md (bootstrap, for fresh repos)Use this when creating gotchas.md for the first time in a repo that has no per-product files:
migration planreports "No changes detected" when contract is staleFiled upstream: TML-XXXX Product: Prisma Next Version:
@prisma-next/cli@<version>First hit:examples/prisma-next-demo, changing the schema while iterating on a demo Cost: ~15 minutesSymptom. Edited
schema.prisma, ranpnpm prisma-next migration plan, got✔ No changes detectedwithfromandtohashes equal. No warning, no indication that the contract was out of date.Cause.
migration plancompares the emitted contract hash (src/prisma/contract.json) against the last applied migration's hash. Editingschema.prismadoesn't update the contract —contract emitdoes. The CLI doesn't detect the staleness or warn about it.Workaround. Run
pnpm prisma-next contract emitbeforemigration planwhenever the schema has changed. Or wireemitinto your dev script.Reproduction. Edit
schema.prismainexamples/prisma-next-demo, runpnpm prisma-next migration planwithout re-emitting. Observe the spurious "No changes detected".
Why it's good: symptom-led title, version captured, cost surfaced, cause cites the underlying mechanism, workaround is concrete, repro steps are minimal.
Migrations don't work
Symptom. I ran a migration and it failed.
Workaround. I figured it out after a while.
Why it's bad: title doesn't tell future-you what to search for; no version, no cause, no concrete workaround, no upstream link. The team can't act on this and the next operator won't recognise it as relevant when they hit the same issue.
When a Prisma release fixes a gotcha, do not delete the entry. Append a **Resolved** line at the bottom of the entry, citing the release that closed it. The history of what we knew when matters; deleting it loses signal about how long the issue lived.
If the entry was wrong (rather than fixed), mark it **Superseded — see <new-entry-link>** and add a corrected entry below. Don't edit the original body.
Triage / no-labels). The gotcha filing convention exists to surface the consumer perspective; tagging maintenance-side bugs as gotchas dilutes the signal.prisma-next-ws (and the Compute / PPg equivalents), surface the gotcha and let the operator pick the path. They may be about to file it as a normal bug or fix it directly.**Superseded** and add a new entry; don't rewrite the original.Version to know which release to test against when triaging. Without it, the ticket sits.If your repo has operational skills that prescribe how to use one of the three products (e.g. compute-deploy-nextjs, prisma-next-nextjs-app, or anything similar), and your gotcha changes how someone should do the underlying task, also fold the prescriptive lesson into the matching skill — the gotcha is the forensic record (what bit us); the skill is the prescriptive record (how to avoid it).
In product-team repos like prisma-next-ws, prescriptive skills for the team's own product often live elsewhere (developer docs, contributing guides, IDE rules). The principle is the same: where there's a durable prescriptive home for the lesson, cross-link from it back to the gotcha entry.
**Source:** <link to the gotchas.md commit (or working-tree path if uncommitted), including file path and line range>
**Product:** Prisma Next | Prisma Compute | Prisma Postgres
**Version:** <as in the file entry>
## Symptom
<as in the file entry>
## Cause
<as in the file entry>
## Workaround
<as in the file entry>
## Reproduction
1. <minimal steps>
2. ...
## Notes
<anything that didn't fit the file entry — environment specifics, near-misses, workarounds you tried that failed, etc.># Gotchas
A running log of surprises, workarounds, and undocumented behaviour hit while *consuming* **Prisma Next**, **Prisma Compute**, or **Prisma Postgres** in this project. Each entry captures friction a real user of these products would also experience.
Each entry is also filed as a Triage-state Linear ticket in the matching gotchas project so the team can pick them up:
- Prisma Next → [`pn-gotchas`](https://linear.app/prisma-company/project/pn-gotchas-a6f6f5157a5c/overview)
- Prisma Compute → [`compute-gotchas`](https://linear.app/prisma-company/project/compute-gotchas-dd3ac34b5ad4/overview)
- Prisma Postgres → [`ppg-gotchas`](https://linear.app/prisma-company/project/ppg-gotchas-afe77336f696/overview)
The capture workflow is documented in [`.agents/skills/record-gotcha/SKILL.md`](.agents/skills/record-gotcha/SKILL.md).
---
## Contents
<!-- entries get appended below; add a link here in the same commit -->
---
<!-- new entries appended below this line -->**Resolved in `@prisma-next/orm@0.5.1`** — see [release notes](...). Workaround removed in [commit abc123](...).