bitovi/ai-enablement-prompts/cross-package-types
Claude Code and agent skill by bitovi/ai-enablement-prompts
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Type flow patterns for tRPC + Prisma monorepos. Covers AppRouter type inference across shared, server, and client packages. Use when setting up types, fixing type errors across packages, or understanding the type chain.
Install
npx vskill@latest install bitovi/ai-enablement-prompts/cross-package-typesSKILL.md
Skill: Cross-Package Types (tRPC + Prisma)
Defines how TypeScript types flow through a monorepo with tRPC and Prisma.
Type Flow
Package Responsibilities
| Package | Owns | Exports | |
|---|---|---|---|
| shared | Zod schemas, enums, constants | Schemas for both server and client | |
| server | tRPC routers, Prisma client | AppRouter type | |
| client | React components, tRPC hooks | Consumes AppRouter type |
Key Principles
- Prisma is the single source of truth — all types derive from the Prisma schema
- Zod schemas derive from Prisma types — use
.pick(),.omit(),.extend()on base schemas - AppRouter types flow from server to client — never import server code in client
- No circular dependencies — shared → server → client (one direction only)
Shared Package
The shared package has two entry points:
Schema Derivation
Server Package
tRPC Router Pattern
AppRouter Export
Client Package
Type-Safe tRPC Client
Usage in Components
Common Mistakes
- ❌ Importing server code in client (breaks browser bundle)
- ❌ Defining types manually instead of deriving from Prisma/Zod
- ❌ Circular imports between packages
- ❌ Using
anyto silence cross-package type errors - ✅ Use
typeimports:import type { AppRouter } from '@myapp/server' - ✅ Derive all schemas from Prisma base types
- ✅ Use shared package for browser-safe code
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/trpc-prisma/skills/cross-package-types/SKILL.md
Popularity
- 7-day trend score
- 0
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
[](https://verified-skill.com/skills/bitovi/ai-enablement-prompts/cross-package-types)