| name | goravel-scaffold |
| description | Full end-to-end CRUD scaffolding for a new Goravel entity. Orchestrates all 19 steps from migration to navigation. |
| argument-hint | [EntityName] [table_name] |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Write, Edit, Grep, Glob |
Goravel Full CRUD Scaffold
Complete end-to-end scaffolding for $ARGUMENTS.
This skill orchestrates the full 19-step scaffolding sequence. Each step references a granular skill for details.
Pre-Flight
Before starting, gather requirements:
- Entity name (PascalCase): e.g.,
Event, BusinessFormalisation
- Table name (snake_case plural): e.g.,
events, business_formalisations
- Fields: List all fields with types
- Enums: Any enum types needed (use
/goravel-enum first)
- Relationships: Foreign keys to other entities
- Permission scope: Which actions (CRUD + extras)?
- Read-only fields: Calculated/aggregated fields?
Scaffolding Sequence
Phase 1: Database & Model
See /goravel-crud-migration and /goravel-crud-model for details.
Phase 2: Service & Permissions
See /goravel-crud-service and /goravel-crud-permissions for details.
Phase 3: Controller & Routes
See /goravel-crud-request, /goravel-crud-controller, and /goravel-crud-routes for details.
Phase 4: Testing
See /goravel-crud-test for details.
GATE: All CRUD Tests Must Pass Before UI Work
STOP. Do NOT proceed to Phase 5 until all CRUD tests pass.
Run the full test suite and confirm green:
APP_ENV=testing go test -v ./tests/feature/crud -run Test<Entity>CRUDTestSuite
This catches backend bugs (Bind issues, validation key mismatches, GORM column mapping, permission errors) that are much harder to debug through the UI. Skipping this step leads to wasted frontend work on a broken backend.
Phase 5: UI & Navigation
See /goravel-crud-page, /goravel-crud-nav, and /goravel-crud-search for details.
Phase 6: Optional Enhancements
Post-Scaffold Verification
- All CRUD tests pass
- API endpoints respond correctly (test with curl or Swagger)
- Admin page loads and displays data
- Navigation shows with correct permission gating
- Global search includes the new entity
- Different user roles see appropriate data (scope filtering)
CRITICAL Rules
- NEVER modify core framework files (generic_crud_service, generic_crud_controller, CRUDPage)
- ALWAYS use artisan commands for generation, then fix
- ALWAYS test after each major phase
- Use hyphenated endpoints:
/entity-names not /entity_names
- Service constants MUST match between controller and permission_constants.go