projects/agent-native/slices/init-skill-install/briefs/d1-r1.md
Create packages/cli/src/init/skill-install.ts implementing the slice spec's Chosen design:
a pinned-version, package-manager-adaptive runner that installs the prisma/skills catalog via
the upstream skills CLI, with a never-throws failure shape — plus its unit tests in
packages/cli/src/__tests__/skill-install.vitest.ts. Work on branch
tml-2968-s1-install-prisma-skills-during-prisma-init, created from origin/main.
In: packages/cli/src/init/skill-install.ts (new);
packages/cli/src/__tests__/skill-install.vitest.ts (new). If isBun must be shared with
Init.ts, hoisting that constant into the new module (or a tiny shared location under
packages/cli/src/init/) is in scope.
Out: Init.ts wiring (dispatch D2), any Generate.ts surface, real network calls in
tests, new package dependencies (execa is already a packages/cli dependency — use it), any
file outside packages/cli/.
skill-install.ts exports detectRunner(cwd), installSkills({ cwd }), and the
constants SKILLS_CLI_VERSION (exact version literal), SKILL_AGENTS
(['cursor','claude-code','codex','windsurf']), SKILLS_SOURCE ('prisma/skills').installSkills executes <runner> skills@<version> add prisma/skills --agent cursor claude-code codex windsurf --skill '*' -y (runner per detection: npx --yes /
pnpm dlx / yarn dlx / bunx; detection via npm_config_user_agent, then lockfile
sniff in cwd, defaulting to npm; bun via runtime check), streams output, and resolves
{ ok: true } or { ok: false, manualCommand } — it never throws.package.json/no-lockfile
fallback to npm; failure resolves to the failure shape with a usable manualCommand.
Execution is mocked/injected — no network.packages/cli/package.json; record the commands you ran).Stay focused on the goal; control scope. Trivial-and-related fixes that obviously serve the goal go in the same dispatch with a one-line note in your wrap-up message. Anything that pulls you off the goal — even if it looks useful — halts and surfaces.
projects/agent-native/slices/init-skill-install/spec.md — chosen design,
pre-investigated edge cases (npx --yes is load-bearing; no-package.json detection
fallback), slice-DoD.projects/agent-native/slices/init-skill-install/plan.md § Dispatch 1.projects/agent-native/spec.md, projects/agent-native/plan.md.AGENTS.md (kebab-case files, no barrel files, comment discipline,
#field over private).