← スキル一覧に戻る

trpc-auditor
by gregsuptown
⭐ 0🍴 0📅 2026年1月10日
SKILL.md
name: trpc-auditor description: Audit tRPC procedures for security, validation, and architectural consistency. Ensures procedures follow the service-layer pattern and have proper Zod input validation. Use when reviewing server-side routers and procedures. allowed-tools: Read, Grep, Glob
tRPC Procedure Auditor
Standards
Security
- ✅ Use
protectedProcedurefor all authenticated routes - ✅ Validate user permissions within the procedure or middleware
- ✅ Ensure sensitive data is not leaked in response objects
Validation
- ✅ Use Zod for strict input validation (
input(z.object({ ... }))) - ✅ Provide meaningful error messages for validation failures
Architecture (The "Service Layer" Rule)
- ❌ NO business logic in routers.
- ✅ Routers should only:
- Validate input (via Zod)
- Check authentication/authorization
- Call a service function from
server/services/ - Return the result
- ✅ All business logic, database queries, and external API calls must live in
server/services/.
Error Handling
- ✅ Use
TRPCErrorwith appropriate codes (NOT_FOUND, UNAUTHORIZED, etc.) - ✅ Log errors before throwing them to the client
Review Checklist
- Service Layer: Is there business logic in this router? If yes, flag it for move to service layer.
- Validation: Is every input strictly validated with Zod?
- Auth: Is the correct procedure type (public vs protected) being used?
- Typing: Are the return types clear and well-defined?
Auto-Invocation Triggers
This Skill should activate when:
- Reviewing files in
server/routers/or files named*-router.ts - User asks to "audit trpc" or "check server procedures"
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です