Skip to content

feat: add a prompt and --skills flag so new projects can skip agent skill files - #96

Merged
wmadden-electric merged 1 commit into
mainfrom
claude/agent-skills-opt-out-52276a
Sep 10, 2026
Merged

feat: add a prompt and --skills flag so new projects can skip agent skill files#96
wmadden-electric merged 1 commit into
mainfrom
claude/agent-skills-opt-out-52276a

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

At a glance

npx create-prisma@latest my-app --yes --skills none

produces a project with no agent directories and no install-time sync:

my-app/
  prisma.config.ts      # skills: { agents: [] }
  package.json          # no "postinstall", no "skills:sync"
  prisma-next.md        # still here: it is the human quick reference
  src/prisma/...
  # no .claude/  .cursor/  .agents/  .devin/

Interactive runs get one new question, after the package-manager prompt:

◆  Install agent skills for coding assistants (Claude Code, Cursor, Codex, Devin)?
│  ● Yes / ○ No

Answering no gives the same result as --skills none. Answering yes, or passing nothing, gives exactly what create-prisma generated before this PR.

The decision

Users can say no to agent skill files when a project is scaffolded, and saying no means the project has none of the machinery: no skill directories, no postinstall hook, no skills:sync script, and a config that records the choice so later tooling respects it. The default stays yes.

Why now

Every project scaffolded by create-prisma gets skill files for four coding agents, a postinstall hook that re-copies them on every install, and a skills:sync script. There was no prompt and no flag to decline. One user counted over 200 files and left; five people raised it in one week. The workaround being shared in the community (skills sync --disable, or a PRISMA_DISABLE_AGENT variable) is wrong: the first only silences a notice, the second does not exist.

How the scaffold produces those files, and where this PR intervenes

create-prisma builds a project in four steps that touch skills:

  1. It renders prisma.config.ts from a template. The template hard-coded skills: { agents: ["claude", "cursor", "agents", "devin"] }.
  2. It writes package scripts, including skills:sync. The Nuxt template additionally hard-codes a postinstall that calls that script.
  3. It runs prisma orm init, which writes the ORM files and prisma-next.md.
  4. It runs prisma init --yes. That command adds the postinstall hook, leaves the existing config alone, and copies the skill files into the four directories.

This PR threads one value, the chosen agents list, through all four:

  • The chosen list comes from --skills, or from the new prompt, or defaults to all four agents under --yes / --json. Deno projects, which never got skills, always get an empty list.
  • Step 1 renders whatever the list holds, so agents: [] for "none" and agents: ["claude", "cursor"] for a subset.
  • Step 2 omits skills:sync when the list is empty, and the Nuxt postinstall collapses to nuxt prepare.
  • Step 3 is unchanged. prisma-next.md is the "open this to get started" document orm init writes, so it stays regardless of the answer.
  • Step 4 is skipped when the list is empty. That is what removes the postinstall hook and the directories, because nothing else creates them. With a subset, it becomes prisma init --yes --skills=claude,cursor so only those directories are written.

--skills accepts a comma-separated subset of claude, cursor, agents, devin, or none. A typo, none mixed with names, or an empty list fails before anything is written, with a message naming the valid values. The README and --help list the flag.

Changing your mind later

A project scaffolded with skills can drop them by setting agents: [] in prisma.config.ts and running prisma skills sync. Until now that sync wrote nothing and left the old copies on disk, so the opt-out looked broken. The companion PR prisma/prisma-cli#254 makes sync remove the copies for agents the config no longer names. A project scaffolded without skills can add them with npx prisma init, which reports the config snippet to add, then prisma skills sync.

Tests

  • Unit: --skills none yields no agents and never invokes prisma init; --skills cursor, claude,cursor keeps order and drops duplicates; three invalid values fail before any command runs; the scripts writer omits skills:sync on opt-out; templates render agents: [] and agents: ["claude", "cursor"] and the matching Nuxt postinstall; the default path passes --skills=claude,cursor,agents,devin to prisma init.
  • End to end: create-prisma no-skills-app ... --yes --skills none --json yields none of the four directories, no postinstall, no skills:sync, agents: [] in the config, and keeps prisma-next.md. The existing Next.js e2e confirms the default path still writes skill files through the real CLI.

bun run test:unit (65 pass), bun run typecheck, bun run lint, bun run format:check, and both e2e cases pass locally.

Docs follow-up (written separately)

  • create-prisma reference and both quickstarts: list the new prompt in the interactive sequence (name, template, database, authoring style, package manager, agent skills, deploy), document --skills <agents>|none and what "none" leaves out, and how to add skills later (npx prisma init, edit agents, prisma skills sync).
  • cli/init: note that create-prisma --skills forwards to prisma init --skills.
  • cli/orm-init: remove the --skip-skills row (see below).
  • cli/skills and cli/configuration: agents: [] is the opt-out; prisma skills sync makes disk match the list in both directions; skills sync --disable only silences the staleness notice; PRISMA_DISABLE_AGENT does not exist.

Alternatives considered

🤖 Generated with Claude Code

Every new project got skill files for Claude Code, Cursor, Codex-style
`.agents`, and Devin, a `postinstall` hook that re-syncs them on every
install, and a `skills:sync` script, with no way to decline.

Interactive runs now ask "Install agent skills for coding assistants?"
(default yes) after the package manager prompt. Non-interactive runs
take `--skills <agents>|none`, matching `prisma init --skills`.

With no agents chosen, `prisma.config.ts` records
`skills: { agents: [] }`, `prisma init` is not run (so no `postinstall`
hook and no skill directories), the `skills:sync` script is omitted, and
the Nuxt template's postinstall is `nuxt prepare` alone. With a list of
agents, the config names them and `prisma init --skills=<list>` installs
only those. `prisma-next.md` stays: it is the human quick reference
`prisma orm init` writes, not an agent file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 0c5fa5b3-bb0a-4e0e-8c96-8511c56dce0b


Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

PR preview published

  • Version: 0.11.7-pr.96.327.1
  • Tag: pr96
  • Run with Bun: bunx create-prisma@pr96
  • Run with npm: npx create-prisma@pr96
  • Run with Yarn: yarn dlx create-prisma@pr96
  • Run with pnpm: pnpm dlx create-prisma@pr96
  • Run with Deno: deno run -A --minimum-dependency-age=0 npm:create-prisma@pr96
  • Workflow run: https://github.com/prisma/create-prisma/actions/runs/34488010475

@wmadden-electric wmadden-electric changed the title feat: let users opt out of agent skill files at scaffold time feat: add a prompt and --skills flag so new projects can skip agent skill files Sep 10, 2026

@AmanVarshney01 AmanVarshney01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm 🥰

@wmadden-electric
wmadden-electric merged commit f020e49 into main Sep 10, 2026
7 checks passed
@wmadden-electric
wmadden-electric deleted the claude/agent-skills-opt-out-52276a branch September 10, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants