agentleFS
AlizHarbAlizHarb/agent-skills/skills/create-domain-feature/SKILL.md

create-domain-feature

Skill1 starsChanged 5 months agoMITView on GitHub

Use when building a general Laravel domain feature that spans routes, UI, API, actions, policies, DTOs, events, jobs, or tests.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for cohesive behavior that touches multiple layers.

    line 13
  2. Distinctive:

    Create DTOs for meaningful input or output contracts.

    line 23
  3. Distinctive:

    Create Actions for business operations.

    line 24
  4. Distinctive:

    Create Policies for protected resources.

    line 25
  5. Distinctive:

    Create Filament resources, relation managers, pages, and widgets when the feature has admin-facing UX.

    line 26
  6. Distinctive:

    Use Laravel 13 attributes for controller middleware/authorization, container injection, model metadata, Form Requests, resources, jobs, and …

    line 28
  7. Distinctive:

    Create Events for useful completed facts.

    line 29
  8. Distinctive:

    Create Jobs only for asynchronous work.

    line 30
  9. Distinctive:

    Add controllers, Livewire components, commands, or API endpoints as thin clients.

    line 31
  10. Distinctive:

    Add tests across behavior, authorization, validation, API, Livewire, events, jobs, and failure paths as needed.

    line 32
  11. Distinctive:

    Add documentation only when behavior is important or requested.

    line 33
  12. Distinctive:

    Keep web, API, Livewire, mobile, desktop, command, and third-party reuse in mind.

    line 46
  13. Distinctive:

    Use Filament resource, relation manager, and page reuse patterns when the feature is admin-facing.

    line 48
  14. Distinctive:

    Test meaningful behavior, protected access, invalid input, failures, and client contracts.

    line 52

≈ “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

Create Domain Feature

When To Use

Use this skill for cohesive behavior that touches multiple layers.

Inputs Needed

  • Boundary, actor, resource, use cases, clients, data contracts, authorization, validation, side effects, async needs, and tests.

Workflow

  1. Define the feature boundary and responsibility first.
  2. Inspect existing conventions and related code.
  3. Create DTOs for meaningful input or output contracts.
  4. Create Actions for business operations.
  5. Create Policies for protected resources.
  6. Create Filament resources, relation managers, pages, and widgets when the feature has admin-facing UX.
  7. Inject dependencies into Actions, Services, Jobs, commands, and controllers instead of resolving them with app().
  8. Use Laravel 13 attributes for controller middleware/authorization, container injection, model metadata, Form Requests, resources, jobs, and Livewire when they clarify framework metadata.
  9. Create Events for useful completed facts.
  10. Create Jobs only for asynchronous work.
  11. Add controllers, Livewire components, commands, or API endpoints as thin clients.
  12. Add tests across behavior, authorization, validation, API, Livewire, events, jobs, and failure paths as needed.
  13. Add documentation only when behavior is important or requested.

Files That May Be Created

  • DTOs, Actions, Policies, Events, Jobs, Resources, Requests, Controllers, Livewire components, migrations, and tests.

Files That May Be Modified

  • Routes, providers, models, views, config, and tests.

Architecture Rules

  • Client layers orchestrate; reusable layers own behavior.
  • Keep web, API, Livewire, mobile, desktop, command, and third-party reuse in mind.
  • Dependency injection is preferred over app() throughout reusable code.
  • Use Filament resource, relation manager, and page reuse patterns when the feature is admin-facing.

Testing Requirements

  • Test meaningful behavior, protected access, invalid input, failures, and client contracts.

Security Requirements

  • Validate input, authorize behavior, protect sensitive output, and use safe queue and event payloads.

Review Checklist

  • Is the boundary clear?
  • Is logic reusable?
  • Are protected paths denied by default?
  • Are tests proportional to risk?

Common Mistakes

  • Starting with UI before defining reusable behavior.
  • Creating jobs for synchronous work.
  • Duplicating logic for API and web clients.

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.