fabrico-building-admin-resources
Skill2 starsChanged 4 months agoMITView on GitHub
Builds repeatable Laravel admin CRUD resources from versioned field and table definitions using shadcn-vue, VeeValidate/Zod, TanStack Table, and server-side Laravel validation and querying. Use when creating CRUD forms, dynamic forms, data tables, filters, resource pages, schema-driven admin modules, or reusable admin blocks; keeps database-stored JSON schemas limited to genuinely runtime-configurable forms.
In this repository42 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fabrico-architecture-designingSkill
- fabrico-building-admin-dashboardsSkill
- fabrico-building-lean-applicationsSkill
- fabrico-codebase-analysingSkill
- fabrico-code-reviewingSkill
- fabrico-creating-agentsSkill
- fabrico-creating-instructionsSkill
- fabrico-creating-promptsSkill
- fabrico-creating-skillsSkill
- fabrico-designing-multi-cloud-architectureSkill
- fabrico-e2e-testingSkill
- fabrico-engineering-promptsSkill
- fabrico-ensuring-accessibilitySkill
- fabrico-implementation-gap-analysingSkill
- fabrico-implementing-backendSkill
- fabrico-implementing-ci-cdSkill
- fabrico-implementing-formsSkill
- fabrico-implementing-frontendSkill
- fabrico-implementing-kubernetesSkill
- fabrico-implementing-observabilitySkill
- fabrico-implementing-terraform-modulesSkill
- fabrico-improving-codebasesSkill
- fabrico-improving-uiSkill
- fabrico-jira-task-formattingSkill
- fabrico-managing-secretsSkill
- fabrico-optimizing-cloud-costSkill
- fabrico-optimizing-frontendSkill
- fabrico-planning-migrationSkill
- fabrico-preparing-applications-for-aiSkill
- fabrico-preparing-applications-for-saasSkill
- fabrico-reverse-engineering-specSkill
- fabrico-reviewing-frontendSkill
- fabrico-sql-and-database-understandingSkill
- fabrico-task-analysingSkill
- fabrico-task-extractingSkill
- fabrico-task-quality-reviewingSkill
- fabrico-technical-context-discoveringSkill
- fabrico-transcript-processingSkill
- fabrico-ui-verifyingSkill
- fabrico-writing-hooksSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 12 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Use standard unless runtime configurability is an explicit acceptance criterion.
- Distinctive: line 21
Keep core entity data in relational columns.
- Distinctive: line 28
Use VeeValidate and Zod for typed client-side validation of standard forms.
- Distinctive: line 29
Treat Laravel Form Requests as the authoritative validation boundary.
- Distinctive: line 31
Use shadcn-vue table markup with TanStack Vue Table for column, selection, sorting, and visibility state.
- Distinctive: line 33
Use MySQL 8 for persistence and Redis for cache, queues, locks, and rate-limit coordination where applicable.
- Distinctive: line 56
Search the configured shadcn-vue MCP registry and private registry before writing UI code.
- Very specific: line 57
Prefer shared resource-form, resource-filters, and resource-page blocks when available.
- Very specific: line 59
Keep domain behavior outside generated components/ui primitives.
- Very specific: line 63
Read references/admin-resource-schema.md before creating or changing a resource definition.
- Distinctive: line 71
Run the same validator in CI when resource definitions are committed.
- Distinctive: line 75
Never place JavaScript, callbacks, SQL fragments, PHP class names, raw HTML, arbitrary component paths, or authorization decisions in a …
- Distinctive: line 89
Keep TanStack Table state controlled and synchronize shareable filters, search, page, and sort state with the URL when useful.
- Distinctive: line 93
Use stable row identifiers and preserve keyboard operation for selection, menus, and bulk actions.
- Distinctive: line 99
Use separate records for stable identity, immutable published versions, and submissions:
- Distinctive: line 105
Never mutate a published version.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Building Admin Resources
Build forms, tables, filters, and CRUD pages as reusable admin resources on top of fabrico-building-admin-dashboards. Optimize for many applications: keep the default path typed, code-owned, inexpensive, and easy to generate; introduce a runtime form engine only when the product actually requires one.
Make the Architecture Decision
Choose exactly one mode before implementation:
| Requirement | Mode | Definition location | Renderer |
| Developers own the CRUD screen and deploy changes | standard | Version-controlled repository file | Typed Vue components composed from shadcn-vue |
| Authorized users must change fields without a deployment | dynamic | Immutable, versioned JSON records in MySQL 8 | Whitelist-based schema renderer composed from shadcn-vue |
Use standard unless runtime configurability is an explicit acceptance criterion. Do not put ordinary CRUD definitions in the database merely to make them "generic".
Keep core entity data in relational columns. Use JSON for dynamic submissions, UI preferences, and genuinely variable long-tail attributes. Project frequently filtered, sorted, joined, or reported values into typed and indexed columns.
Do not make Vueform the default component system. Consider it only when an embedded visual form builder or its advanced runtime form features are explicit requirements. Before adoption, verify current license and total cost, Vue/Tailwind compatibility, accessibility, bundle impact, export and migration paths, and whether the team accepts a second UI abstraction beside shadcn-vue. Record approval in the architecture decision.
Use the Default Resource Stack
- Render controls, field structure, buttons, dialogs, menus, and table visuals with shadcn-vue.
- Use VeeValidate and Zod for typed client-side validation of standard forms.
- Treat Laravel Form Requests as the authoritative validation boundary.
- Enforce authorization with Laravel policies or gates for every read and mutation.
- Use shadcn-vue table markup with TanStack Vue Table for column, selection, sorting, and visibility state.
- Execute search, filtering, sorting, pagination, and exports on the Laravel server for unbounded or growing datasets. Permit client-side state only for explicitly bounded small datasets within a documented row and payload budget.
- Use MySQL 8 for persistence and Redis for cache, queues, locks, and rate-limit coordination where applicable.
Apply fabrico-implementing-forms for field composition, validation timing, accessible errors, and multi-step behavior. This skill defines the resource boundary and reuse strategy; it does not replace those form fundamentals.
Follow the Resource Workflow
Track this checklist:
Progress:
- [ ] Inspect existing admin conventions and reusable registry blocks
- [ ] Classify the resource as standard or dynamic
- [ ] Define and validate the resource contract
- [ ] Implement the form and authoritative server validation
- [ ] Implement the table and server-side query contract
- [ ] Enforce permissions, tenancy, and auditability
- [ ] Add versioned persistence when the resource is dynamic
- [ ] Verify behavior, accessibility, security, and performance1. Reuse before building
- Inspect routes, policies, Form Requests, query objects, Inertia pages,
components.json, generated shadcn-vue primitives, and existing resource components. - Search the configured shadcn-vue MCP registry and private registry before writing UI code.
- Prefer shared
resource-form,resource-filters, andresource-pageblocks when available. Share a small table shell and controls, but keep domain columns and query behavior local because data tables vary by resource. - Promote stable cross-application compositions into a reviewed private shadcn-vue registry. Do not turn the first resource into an internal framework.
- Keep domain behavior outside generated
components/uiprimitives.
2. Define the contract
Read references/admin-resource-schema.md before creating or changing a resource definition. Start from references/admin-resource.example.json and store a standard definition under the repository's established convention, such as resources/admin/<resource>.resource.json.
Run:
python3 .claude/skills/fabrico-building-admin-resources/scripts/validate_admin_resource.py path/to/resource.jsonRun the same validator in CI when resource definitions are committed. Treat the definition as declarative product and UI metadata, not executable configuration.
For standard mode, use the validated definition to generate or guide ordinary typed code that the application owns. Do not ship a generic runtime interpreter merely to avoid generating a form or table.
Never place JavaScript, callbacks, SQL fragments, PHP class names, raw HTML, arbitrary component paths, or authorization decisions in a definition. Whitelist field types, condition operators, option sources, sortable keys, filter keys, row actions, and permission names on the server.
3. Implement the form
- Map every field to an approved shadcn-vue component through an explicit registry in code.
- Generate or write typed form values and Zod validation for
standardresources. Mirror business validation in a Laravel Form Request; do not infer authoritative server rules from client input. - For
dynamicresources, compile the published definition into client constraints and separately into an allowlisted Laravel validation rule set. - Load option sources through named, authorized adapters. Do not accept URLs, model classes, or queries from JSON.
- Preserve labels, descriptions, error associations, focus movement, disabled and loading behavior, draft recovery, and destructive-action confirmation.
- Prevent mass assignment by mapping validated fields explicitly into a command or service.
4. Implement the table
- Choose client-side processing only when the complete dataset is bounded, non-sensitive, cheap to fetch, and remains inside an explicit payload and browser-memory budget. Otherwise use Laravel pagination and manual TanStack server state from the first release.
- Keep TanStack Table state controlled and synchronize shareable filters, search, page, and sort state with the URL when useful.
- Debounce text search and cancel stale requests.
- Pass only allowlisted filters and sort keys to a Laravel query object. Never concatenate request values into SQL identifiers.
- Paginate on the server and return only the required fields. Do not load an unbounded collection into the browser.
- Use stable row identifiers and preserve keyboard operation for selection, menus, and bulk actions.
- Store per-user column visibility, order, and width as JSON only after intersecting preferences with the current column allowlist.
- Require explicit permission checks and audit events for row and bulk mutations.
5. Persist dynamic definitions safely
Use separate records for stable identity, immutable published versions, and submissions:
form_definitions: stable form identity, tenant ownership, and lifecycle metadata.form_definition_versions: definition ID, monotonically increasing version,draft|published|archivedstatus, schema JSON, checksum, creator, and publication timestamp.form_submissions: exact definition-version ID, tenant ID, payload JSON, status, submitter, and submission timestamp.
Never mutate a published version. Create a draft successor, validate it, preview it, publish it transactionally, and retain the version used by every submission. Apply tenant scopes to definitions, versions, option sources, and submissions.
Validate definitions and submissions in application code. Use MySQL JSON checks only as defense in depth because database JSON Schema support may not match the application validator. Add indexes or relational projections for operational queries; do not depend on scanning arbitrary JSON payloads.
Verification Gate
Validation:
- [ ] Resource definition passes validate_admin_resource.py
- [ ] Standard definitions live in Git; runtime definitions use immutable versions
- [ ] All controls and table visuals compose shadcn-vue primitives
- [ ] Client validation improves UX; Laravel validation remains authoritative
- [ ] Policies enforce every route and mutation independently of visible UI
- [ ] Table sort, filter, search, pagination, and export inputs are allowlisted
- [ ] Tenant boundaries and audit events have automated tests
- [ ] Dynamic publication, version pinning, and submission replay have tests
- [ ] Loading, empty, error, success, stale-request, and destructive states work
- [ ] Keyboard, focus, labels, errors, and responsive behavior are verified
- [ ] Query count, indexes, payload size, and large-dataset pagination are verifiedConnected Skills
fabrico-building-admin-dashboards- for the mandatory Laravel, MySQL 8, Redis, Docker, Vue/Inertia, and shadcn-vue foundationfabrico-building-lean-applications- for reusable golden paths, complexity budgets, and evidence-based escalationfabrico-implementing-forms- for form validation, field composition, accessibility, and multi-step flowsfabrico-implementing-frontend- for Vue composition, state boundaries, and design tokensfabrico-implementing-backend- for Laravel services, Form Requests, policies, queues, and testsfabrico-sql-and-database-understanding- for relational modeling, JSON tradeoffs, indexes, and transactionsfabrico-ensuring-accessibility- for WCAG, keyboard, focus, and error semanticsfabrico-preparing-applications-for-saas- for tenant isolation, roles, entitlements, and audit trails
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

