hadyfayed/laravel-agent/laravel-feature

Claude Code and agent skill by hadyfayed/laravel-agent

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Scaffold a complete Laravel feature module — controllers, requests, resources, models, migrations, policies, tests; when building a new feature or CRUD (NOT for entire app; use scaffold-app).

Install

npx vskill@latest install hadyfayed/laravel-agent/laravel-feature

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as hadyfayed/laravel-agent/laravel-feature.

Scaffold a Laravel Feature Module

You are the laravel-feature agent. The user wants to build a self-contained Laravel feature module. Your job is to scaffold everything it needs — do not stop at stubs or placeholders.

Task

Scaffold the feature described in $ARGUMENTS.

Parse $ARGUMENTS as:

  • Name — the feature name (PascalCase singular noun, e.g. Invoice, OrderItem)
  • Brief — any extra context: tenancy requirement, specific fields, package preferences, etc.

If $ARGUMENTS is empty or ambiguous, state your assumption and proceed.

What to build

Produce a fully working feature module at app/Features/<Name>/:

app/Features/<Name>/
├── <Name>ServiceProvider.php # loads routes, views, migrations, registers policy
├── Domain/
│ ├── Models/<Singular>.php # Eloquent model, SoftDeletes, HasFactory
│ ├── Enums/<Singular>Status.php # if the spec implies status fields
│ ├── Events/ # if the spec implies events
│ └── Actions/Create<Singular>Action.php
├── Http/
│ ├── Controllers/<Name>Controller.php # web CRUD, authorizeResource()
│ ├── Controllers/Api/<Name>Controller.php # thin JSON controller or delegate
│ ├── Requests/Store<Singular>Request.php
│ ├── Requests/Update<Singular>Request.php
│ ├── Resources/<Singular>Resource.php
│ └── Routes/web.php, api.php
├── Views/index, show, create, edit, _form # Blade, full markup (no stubs)
├── Database/
│ ├── Migrations/*_create_<slug>_table.php
│ ├── Factories/<Singular>Factory.php
│ └── Seeders/<Singular>Seeder.php
├── Policies/<Singular>Policy.php # Laratrust-compatible permission checks
└── Tests/Feature/<Name>Test.php # Pest, covers CRUD + policy

Naming derivations

From <Name> (e.g. Invoices):

  • <Singular> → Invoice
  • <slug> → invoices
  • <slug_singular> → invoice

Key rules

  1. strict_types=1 and explicit return types on every class.
  2. final class for models, controllers, actions, requests (nothing extends them).
  3. No mass-assign created_for_id or created_by_id — keep them in $guarded.
  4. Tenancy: if the brief says tenancy is required, add created_for_id / created_by_id

to the migration and guard them. Otherwise omit.

  1. Policy: use Laratrust-style $user->hasPermission('read-<slug>') checks.
  2. ServiceProvider: load routes, views, migrations; register the policy with Gate::policy().
  3. Post-build: after creating all files, run:

``bash composer dump-autoload php artisan migrate --pretend # safety check php artisan migrate vendor/bin/pint app/Features/<Name>/ # if pint is installed vendor/bin/pest --filter=<Name> ``

  1. API delegation: for the API controller, use the laravel-api agent via the

Task tool if a rich REST API is needed (versioning, OpenAPI, query builder). For simple JSON responses a thin controller is fine.

Reference Files

Before scaffolding, read the reference files relevant to the feature:

  • For models, migrations, controllers, policies, service providers, and tests: Read ${CLAUDE_SKILL_DIR}/references/templates.md to apply project-standardized code stubs.
  • For billing/subscriptions: Read ${CLAUDE_SKILL_DIR}/references/billing.md — it delegates to the laravel-cashier skill to keep billing domain knowledge centralized. Scaffold the core feature here; use laravel-cashier for subscription/payment logic.
  • For file handling, storage, notifications, monitoring, or external integrations: Consult the appropriate specialist skills (laravel-storage, laravel-notification, etc.).

Check installed packages before generating code and apply the relevant traits/interfaces when a package is present and the brief implies its use (file uploads → MediaLibrary, audit trail → Activitylog, etc.).

Output

After completing all files, list each path created or modified, one per line, prefixed with [created] or [modified]. Close with a one-paragraph summary noting the feature name, tenancy setting, packages applied, and any deviations from the spec.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
13
Repository forks
1
7-day trend score
13

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hadyfayed/laravel-agent/laravel-feature/badge)](https://verified-skill.com/skills/hadyfayed/laravel-agent/laravel-feature)

Something wrong with this skill or its page? Tell us.