agentleFS
AlizHarbAlizHarb/agent-skills/skills/filament-development/SKILL.md

filament-development

Skill1 starsChanged 5 months agoMITView on GitHub

Use when creating or changing Filament v5 panels, resources, relation managers, pages, widgets, forms, tables, infolists, actions, notifications, query-builder filters, or Filament-related extensions.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for Filament v5 admin panels, CRUD resources, dashboard widgets, custom pages, relation managers, forms, tables, infolists, …

    line 13
  2. Distinctive:

    Keep all business logic in Actions, Services, DTOs, Policies, Events, Jobs, or builders.

    line 23
  3. Distinctive:

    Use Filament’s declarative APIs for forms, tables, infolists, actions, and navigation.

    line 24
  4. Distinctive:

    Use custom Eloquent builders or query objects for reusable filtering and ordering.

    line 26
  5. Distinctive:

    Use Spatie Data for payloads, defaults, validation, and serialization when the project is already using it.

    line 28
  6. Distinctive:

    Add tests for admin behaviors and regressions.

    line 29
  7. Distinctive:

    Use policies or authorization callbacks for protected behavior.

    line 49
  8. Very specific:

    Prefer dependency injection over app() inside Filament support code.

    line 50
  9. Distinctive:

    Use attribute-based Laravel metadata when it improves panel, model, or query clarity.

    line 51
  10. Distinctive:

    Test resource and page authorization, validation, action execution, filters, sorting, persistence, and deletion flows.

    line 55
  11. Distinctive:

    Test custom table data sources, relation managers, and query-builder behavior.

    line 56
  12. Distinctive:

    Test localization keys where user-visible copy is part of the behavior.

    line 57
  13. Distinctive:

    Never trust Filament form state without validation.

    line 62
  14. Distinctive:

    Avoid leaking private fields into tables, infolists, exports, or notifications.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Filament Development

When To Use

Use this skill for Filament v5 admin panels, CRUD resources, dashboard widgets, custom pages, relation managers, forms, tables, infolists, query-builder UIs, imports/exports, and plugin-driven admin UX.

Inputs Needed

  • Panel goal, models, permissions, reusable actions, DTOs, query behavior, localization, UI flow, and tests.

Workflow

  1. Inspect existing Filament conventions, panel providers, resources, and stubs.
  2. Decide whether the feature belongs in a resource, page, widget, relation manager, or custom Livewire component.
  3. Keep all business logic in Actions, Services, DTOs, Policies, Events, Jobs, or builders.
  4. Use Filament’s declarative APIs for forms, tables, infolists, actions, and navigation.
  5. Localize labels, descriptions, placeholders, tooltips, empty states, and notifications.
  6. Use custom Eloquent builders or query objects for reusable filtering and ordering.
  7. Authorize every protected record, action, or page.
  8. Use Spatie Data for payloads, defaults, validation, and serialization when the project is already using it.
  9. Add tests for admin behaviors and regressions.

Files That May Be Created

  • app/Filament/Resources/*
  • app/Filament/Resources/*/Pages/*
  • app/Filament/Resources/*/RelationManagers/*
  • app/Filament/Pages/*
  • app/Filament/Widgets/*
  • app/Providers/Filament/*PanelProvider.php
  • app/Forms/*, app/Tables/*, app/Infolists/*, app/Actions/*, app/Data/*, app/DTOs/*, and tests

Files That May Be Modified

  • Filament resources, pages, widgets, relation managers, builders, policies, Actions, DTOs, data objects, localization files, and tests.

Architecture Rules

  • Filament orchestrates application code; it does not own business workflows.
  • Reusable query logic belongs in builders or query objects, not model scopes.
  • Use policies or authorization callbacks for protected behavior.
  • Prefer dependency injection over app() inside Filament support code.
  • Use attribute-based Laravel metadata when it improves panel, model, or query clarity.

Testing Requirements

  • Test resource and page authorization, validation, action execution, filters, sorting, persistence, and deletion flows.
  • Test custom table data sources, relation managers, and query-builder behavior.
  • Test localization keys where user-visible copy is part of the behavior.

Security Requirements

  • Protect records and actions with policies and explicit checks.
  • Never trust Filament form state without validation.
  • Avoid leaking private fields into tables, infolists, exports, or notifications.

Review Checklist

  • Is the panel layer thin?
  • Are reusable actions and builders used?
  • Is all visible text localized?
  • Are protected behaviors authorized?
  • Are premium/plugin features only used if the package exists?
  • Are imports/exports and notifications safe for retries and data exposure?

Common Mistakes

  • Putting business rules in resource closures.
  • Duplicating the same validation in forms, pages, and actions.
  • Using model scopes instead of builders for new reusable queries.
  • Hardcoding labels or confirmation text.
  • Depending on premium or plugin APIs that are not installed.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.