← スキル一覧に戻る

scaffold-crud
by hieupvXmasEve
⭐ 0🍴 0📅 2026年1月6日
SKILL.md
name: scaffold-crud description: Scaffolds a complete CRUD feature for an entity (Actions, Controller, Requests, Pages, Routes). Use when building a new feature from scratch (e.g., "Scaffold CRUD for Events in Academic module"). allowed-tools: Bash, Write, Read
Scaffold CRUD Feature
This skill helps generate the full stack of files needed for a standard CRUD feature in the Modular Monolith architecture.
Instructions
-
Analyze Request:
- Module: (e.g.,
Academic) - Entity: (e.g.,
Course) - Portal:
Admin(default) orStudent.
- Module: (e.g.,
-
Plan the Files: Create a checklist of files to generate using the specific single-purpose skills (or manually if skills can't be called directly).
-
Backend:
Model:app/Modules/{Module}/Models/{Entity}.phpMigration:database/migrations/xxxx_xx_xx_create_{table}_table.phpActions:Create{Entity}Action,Update{Entity}Action,Delete{Entity}Action.Query:List{Entity}Query(for Index),Get{Entity}Query(for Show/Edit).Requests:Create{Entity}Request,Update{Entity}Request.Controller:Http/Controllers/Web/{Portal}/{Entity}Controller.php.Policy:Policies/{Entity}Policy.php.Routes: Add toroutes/web.phpin the module.
-
Frontend (Inertia):
Index.vue: List with DataTable.Create.vue: Form for creating.Edit.vue: Form for editing.
-
-
Execute (Step-by-Step):
- Don't try to write all files in one turn.
- Start with Model & Migration.
- Then Actions & Queries.
- Then Requests & Policy.
- Then Controller & Routes.
- Finally Vue Pages.
-
Wiring:
- Ensure the Controller calls the Actions and Queries.
- Ensure the Vue pages use the correct Routes.
Template: Route Registration
// app/Modules/{Module}/routes/web.php
use App\Modules\Academic\Http\Controllers\Web\Admin\CourseController;
Route::middleware(['auth', 'verified'])->group(function () {
Route::resource('academic/courses', CourseController::class)
->names('academic.courses');
});
Best Practices
- Consistency: Ensure the
route()names in Vue match the names defined inroutes/web.php. - Authorization: Remind the user to register the Policy and Permissions.
- Validation: Ensure Requests are strictly typed.
スコア
総合スコア
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
レビュー
💬
レビュー機能は近日公開予定です