Compétences trpc-scaffolder
🏗️

trpc-scaffolder

Risque faible ⚡ Contient des scripts📁 Accès au système de fichiers⚙️ Commandes externes

타입 안전한 tRPC 엔드포인트 생성

tRPC 라우터와 Zod 스키마를 수동으로 구축하면 엔드포인트당 20-30분이 걸리고 타입 오류 및 누락된 export 위험이 있습니다. 이 스킬은 검증 스키마, 예시 패턴, 자동 등록 검사까지 포함한 완전한 타입 안전 엔드포인트를 스캐폴딩합니다.

Prend en charge: Claude Codex Code(CC)
🥉 72 Bronze
1

Télécharger le ZIP du skill

2

Importer dans Claude

Allez dans Paramètres → Capacités → Skills → Importer un skill

3

Activez et commencez à utiliser

Tester

Utilisation de "trpc-scaffolder". Create a new tRPC router for analytics with a getDashboardStats query procedure

Résultat attendu:

  • Created router file: frontend/src/lib/trpc/routers/analytics.ts
  • Procedure snippet generated for getDashboardStats
  • Remember to register analyticsRouter in _app.ts
  • Next: Create schemas in lib/trpc/schemas/analytics.schema.ts

Utilisation de "trpc-scaffolder". Add a mutation procedure to create new posts in the blogRouter

Résultat attendu:

  • Procedure template generated for createPost mutation
  • Add to blogRouter inside the router({ ... }) object
  • Create input/output schemas: createPostInputSchema, createPostOutputSchema
  • Run validation to verify registration

Audit de sécurité

Risque faible
v5 • 1/16/2026

This skill scaffolds tRPC routers and schemas using bash scripts with standard Unix utilities. All file operations are constrained to predefined project paths. Documentation backticks flagged as command execution are false positives. The '../..' patterns in scripts are controlled project-root navigation. No network calls or credential access. Safe for marketplace publication.

14
Fichiers analysés
1,977
Lignes analysées
4
résultats
5
Total des audits
Problèmes à risque faible (1)
Shell scripts use external Unix utilities
The skill uses bash scripts that invoke standard Unix utilities (find, grep, sed, mkdir, basename) for file operations. These commands are necessary for scaffolding functionality but execute external processes.

Score de qualité

59
Architecture
100
Maintenabilité
87
Contenu
22
Communauté
88
Sécurité
83
Conformité aux spécifications

Ce que vous pouvez construire

새 API 엔드포인트 추가

Next.js 애플리케이션용 프로젝트 규칙에 따라 타입 안전 tRPC 엔드포인트를 빠르게 스캐폴딩

검증 스키마 생성

입력 및 출력 검증을 위한 올바른 타입 추론의 Zod 스키마 생성

코드 표준 준수

자동 검증 검사로 모든 신규 엔드포인트가 일관된 패턴을 따르도록 보장

Essayez ces prompts

새 라우터 생성
Create a new tRPC router for user management. Use the trpc-scaffolder skill to generate the router file and Zod schemas.
프로시저 추가
Add a query procedure called getUserProfile to the existing userRouter. Use the add-procedure.sh script from trpc-scaffolder.
스키마 생성
Create Zod schemas for a notification entity. Use create-schema.sh to generate the schema file with input and output schemas.
설정 검증
Run the tRPC validation script to check if all routers are properly registered in _app.ts and schemas export types correctly.

Bonnes pratiques

  • 새 엔드포인트 생성 후 항상 validate-trpc.sh를 실행하여 올바른 등록 여부를 확인
  • 완전한 TypeScript 타입 안전성을 위해 z.infer<typeof schemaName>로 추론된 타입을 export
  • GET 작업에는 query 프로시저를, 데이터 수정에는 mutation 프로시저 사용

Éviter

  • _app.ts에서 라우터 등록을 건너뜀 - 런타임에 타입 오류 발생
  • 추론된 타입을 export하지 않음 - TypeScript 타입 추론이 깨짐
  • 읽기 작업에 mutation 사용 - REST 규칙 및 캐싱 동작 위반

Foire aux questions

지원되는 tRPC 버전은 무엇인가요?
Next.js App Router와 함께 tRPC v11을 위해 설계되었습니다. 검증에는 Zod를 사용합니다.
이 스킬은 어디에서 사용할 수 있나요?
Claude, Codex, Claude Code와 호환됩니다. tRPC 및 API 관련 키워드에서 자동 트리거됩니다.
기존 파일을 수정하나요?
스크립트는 템플릿에서 새 파일만 생성합니다. 검증 스크립트는 준수 여부를 확인하기 위해 파일만 읽습니다.
내 데이터는 안전한가요?
스크립트는 프로젝트 디렉터리 내에서만 동작합니다. 네트워크 호출 없음. 외부 데이터 전송 없음.
검증에 실패하면 어떻게 하나요?
_app.ts에서 라우터가 import되고 등록되었는지 확인하세요. 스키마가 z.infer로 타입을 export하는지 सुनिश्चित하세요.
tRPC CLI와 어떤 점이 다른가요?
DevPrep AI 패턴을 따르는 프로젝트 전용 템플릿을 사용합니다. 검증과 모범 사례 강제 적용이 포함됩니다.