一键导入
goravel-crud-permissions
Register permissions for a new Goravel entity in the permission system. Adds service constant, display name, and actions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Register permissions for a new Goravel entity in the permission system. Adds service constant, display name, and actions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a broadcast notification system that sends notifications and messages to eligible users based on entity-specific criteria. Use when adding a new entity type that needs to notify users when records are created, updated, or published.
Guide for building non-CRUD pages with consistent design. Use when creating portal pages, custom views, detail modals, sidebar widgets, notification drawers, or any page that is not a standard CRUD table. Covers fullscreen modals, minimal text patterns, calendar widgets, doorbell notifications, optimistic updates, and CrudPage read-only integration.
Guide for building dashboards, charts, KPI cards, and data visualizations. Use when creating dashboard pages, adding charts to features, building stat displays, aggregating data for visual presentation, or implementing export (CSV/PNG/fullscreen) for charts. Based on the Books dashboard implementation using Recharts and shadcn/ui chart components.
Deploy the application to staging or production. Validates, builds, pushes Docker image, deploys via Helm, and runs smoke tests.
Run a comprehensive E2E browser test suite for a newly scaffolded Goravel entity. Tests navigation, CRUD operations, search, filters, row actions, form validation, FK dropdowns, and cross-entity integration using Playwright MCP.
Create a Go database seeder for a Goravel entity with 25+ realistic records. Covers all status/enum values, diverse data for sorting/pagination testing, and proper nullable field handling.
| name | goravel-crud-permissions |
| description | Register permissions for a new Goravel entity in the permission system. Adds service constant, display name, and actions. |
| argument-hint | [ServiceName] [DisplayName] |
| allowed-tools | Bash, Read, Write, Edit, Grep, Glob |
Register permissions for $ARGUMENTS.
app/auth/permission_constants.go
Add to the ServiceRegistry const block (around line 26):
const (
ServiceBooks ServiceRegistry = "books"
ServiceUsers ServiceRegistry = "users"
// ... existing services
ServiceYourEntity ServiceRegistry = "your_entities" // ADD THIS
)
Naming convention: Service + PascalCase entity name. Value is lowercase plural snake_case.
Add your service to the return slice (around line 52):
func GetAllServiceRegistries() []ServiceRegistry {
return []ServiceRegistry{
ServiceBooks,
ServiceUsers,
// ... existing services
ServiceYourEntity, // ADD THIS
}
}
Add a case in GetServiceDisplayName() (around line 70):
case ServiceYourEntity:
return "Your Entity Management"
Add a case in GetServiceActions() (around line 125):
case ServiceYourEntity:
return []CorePermissionAction{
PermissionCreate,
PermissionRead,
PermissionUpdate,
PermissionDelete,
PermissionView,
}
Common action sets:
go run . artisan permissions:setup
This creates the permission records in the database. Then:
/admin/permissions as super adminCheck that the permissions were created:
go run . artisan db:table permissions
Look for entries like your_entities_create, your_entities_read, etc.
Reference app/auth/permission_constants.go for existing patterns:
ServiceBooks = "books"ServiceUsers = "users"ServiceConfig = "config"ServiceLenders = "lenders"ServiceApplications = "applications"After editing permission_constants.go:
# Vet the auth package for issues
go vet ./app/auth/...
# Confirm full project compiles (catches typos in constants)
go build ./...
Run /goravel-crud-request to generate request validators.