mralexsaavedra/spotiarr/spotiarr-prisma

Claude Code and agent skill by mralexsaavedra/spotiarr

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Trigger: Prisma, database, migration, schema, repository, query. SQLite Prisma patterns for spotiarr: boundaries, error handling, commands.

Install

npx vskill@latest install mralexsaavedra/spotiarr/spotiarr-prisma

SKILL.md

Activation Contract

Load when editing Prisma schema, writing repository code, running migrations, or handling DB errors.

Hard Rules

  • Prisma calls belong in apps/backend/src/infrastructure/database/ only. Never in domain/ or presentation/.
  • Singleton: apps/backend/src/infrastructure/setup/prisma.ts → import from there, never instantiate PrismaClient elsewhere.
  • Always validate input with Zod before passing to Prisma. Flow: HTTP request → Zod parse → typed DTO → repository → Prisma.
  • Map Prisma errors to application errors — never let raw DB errors reach the presentation layer.
  • Use transactions when multiple writes must succeed/fail atomically. Keep transaction scope tight.

Decision Gates

ErrorHandling
P2025 (not found)Guard with isPrismaNotFoundError, handle gracefully
Unique constraintCatch and map to domain conflict error
Foreign key violationMap to application-level validation error
ts
const isPrismaNotFoundError = (e: unknown): e is { code: string } =>
e instanceof Error && "code" in e && e.code === "P2025";

Execution Steps

After schema changes:

bash
pnpm --filter backend run prisma:generate # regenerate client
pnpm --filter backend run prisma:migrate:deploy # apply migrations

References

  • Schema: apps/backend/prisma/schema.prisma
  • Singleton: apps/backend/src/infrastructure/setup/prisma.ts
  • Repository example: apps/backend/src/infrastructure/database/

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
35
Repository forks
6
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mralexsaavedra/spotiarr/spotiarr-prisma/badge)](https://verified-skill.com/skills/mralexsaavedra/spotiarr/spotiarr-prisma)

Something wrong with this skill or its page? Tell us.