Agent skill
crud
CRUDをサクッと自動生成。ボイラープレートはAIにお任せ。Use when user mentions CRUD, entity generation, or wants to create API endpoints. Do NOT load for: UI component creation, form design, database schema discussions.
Install this agent skill to your Project
npx add-skill https://github.com/Chachamaru127/claude-code-harness/tree/main/skills/crud
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
breezing
チーム実行モード(Codex ネイティブ版)— harness-work のチーム協調エイリアス。breezing, チーム実行, 全部やって でトリガー。
harness-work
Harness v3 統合実行スキル(Codex ネイティブ版)。Plans.md タスクを1件から全並列チーム実行まで担当。以下で起動: 実装して、実行して、harness-work、全部やって、breezing、チーム実行、parallel。プランニング・レビュー・リリース・セットアップには使わない。
harness-plan
Harness v3 統合プランニングスキル。タスク計画・Plans.md管理・進捗同期を担当。以下のフレーズで起動: 計画を作る、タスクを追加、Plans.md更新、完了マーク、進捗確認、harness-plan、harness-sync。実装・レビュー・リリースには使わない。
breezing
チーム実行モード — harness-work のチーム協調エイリアス。breezing, チーム実行, 全部やって でトリガー。
harness-setup
Harness v3 統合セットアップスキル。プロジェクト初期化・ツール設定・2エージェント構成・メモリ設定・公開 skill mirror 同期を担当。以下で起動: セットアップ、初期化、新規プロジェクト、CIセットアップ、codex CLIセットアップ、harness-mem、エージェント設定、symlink、mirror、harness-setup。実装・レビュー・リリース・プランニングには使わない。
harness-sync
Plans.md と実装の進捗同期。差分検出・マーカー更新・レトロスペクティブを実行。以下で起動: harness-sync、sync-status、進捗確認、今どこ、どこまで終わった。--snapshot で進捗スナップショット保存にも対応。プランニング・実装・レビュー・リリースには使わない。
Didn't find tool you were looking for?