crud
Explicit helper for CRUD scaffolding and API endpoint generation. Do NOT load for: UI components, form design, database schema discussion, or general implementation.
- License 许可
- MIT
- 最近更新
- 2026-07-24
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- crud
- description
- Explicit helper for CRUD scaffolding and API endpoint generation. Do NOT load for: UI components, form design, database schema discussion, or general implementation.
- allowed-tools
- [ "Read", "Write", "Edit", "Bash", "Grep", "Glob" ]
- argument-hint
- <entity-name>
- description-en
- Explicit helper for CRUD scaffolding and API endpoint generation. Do NOT load for: UI components, form design, database schema discussion, or general implementation.
- description-ja
- CRUD足場作成とAPIエンドポイント生成の明示補助スキル。UIコンポーネント、フォーム設計、データベース設計相談、通常の実装には使わない。
- user-invocable
- false
- disable-model-invocation
- true
03 SKILL.md 正文
CRUD Skill
Auto-generates CRUD functionality for specified entities (tables) at production-ready level.
Quick Reference
- "Create CRUD for task management" →
/crud tasks - "Want search and pagination too" → Includes all together
- "Include permissions (who can view/edit)" → Sets up authorization/rules together
Deliverables
- CRUD + validation + authorization + tests, complete production-safe set
- Minimize diff to match existing DB/code
Features:
- Validation (Zod) auto-add
- Auth/authorization (Row Level Security) auto-config
- Relations (one-to-many, many-to-many) support
- Pagination, search, filters
- Auto-generated test cases
Auto-invoke Skills
This skill must explicitly invoke the following skills with the Skill tool:
| Skill | Purpose | When to Call |
|---|---|---|
impl |
Implementation (parent skill) | CRUD feature implementation |
verify |
Verification (parent skill) | Post-implementation verification |
Execution Flow
Detailed steps are described in the phases below.
Phase 1: Entity Analysis
- Parse entity name from $ARGUMENTS
- Detect existing schema (Prisma, Drizzle, raw SQL)
- Infer field types and relations
Phase 2: CRUD Generation
- Generate model/schema if needed
- Create API endpoints (REST or tRPC)
- Add validation schemas (Zod)
- Configure authorization rules
Phase 3: Test Generation
- Create unit tests for each endpoint
- Add integration tests
- Generate test fixtures
Phase 4: Verification
- Run type check
- Run tests
- Verify build
Supported Frameworks
| Framework | Detection | Generated Files |
|---|---|---|
| Next.js + Prisma | prisma/schema.prisma |
API routes, Prisma client |
| Next.js + Drizzle | drizzle.config.ts |
API routes, Drizzle queries |
| Express | express in package.json |
Controllers, routes |
| Hono | hono in package.json |
Route handlers |
Output Structure
src/
├── lib/
│ └── validations/
│ └── {entity}.ts # Zod schemas
├── app/api/{entity}/
│ ├── route.ts # GET (list), POST (create)
│ └── [id]/
│ └── route.ts # GET, PUT, DELETE
└── tests/
└── {entity}.test.ts # Test cases
Related Skills
impl- Feature implementationverify- Build verificationauth- Authentication/authorization
04 同仓库更多 Skills
escape-skill
暂无简介
zz-review-empty
暂无简介
workflow-guide
Explicit helper for Cursor PM ↔ Claude Code two-agent workflow guidance. Do NOT load for: solo implementation, workflow setup, handoff execution, or general process coaching.
vibecoder-guide
Explicit helper for non-technical VibeCoder coaching: what to ask next, how to describe work, and how to stay safe. Do NOT load for: direct implementation, technical review, or Cursor/PM workflow.
ui
Explicit helper for UI components, hero sections, forms, feedback, and contact surfaces. Do NOT load for: authentication, backend implementation, database work, or business logic.
session
Unified session management window. Handles initialization, memory, state all-in-one. Explicit /session invocation only — sub-skills handle auto-delegation. Use when managing Claude Code sessions, /session command. Do NOT load for: app user sessions, login state, authentication features.