Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
create-request
alizharb/agent-skills
claude-code
form-requests
validation
authorization
testing
dto
http-boundary

Use when creating Laravel Form Request classes for validation and authorization.

Install
php artisan boost:add-skill alizharb/agent-skills

Save this content to: .claude/skills/create-request/SKILL.md

# Create Request

## When To Use

Use this skill for request validation, authorization, input normalization, and reusable HTTP boundary rules.

## Inputs Needed

- Request purpose, actor, validated fields, authorization rule, failure behavior, and tests.

## Workflow

1. Inspect nearby request classes and naming conventions.
2. Create the request with Artisan.
3. Put authorization in `authorize()`.
4. Put validation in `rules()` and custom messages in `messages()`.
5. Use `prepareForValidation()` only for input normalization.
6. Prefer reusable DTOs or Actions after validation when the same data is needed elsewhere.
7. Add tests for authorize allow/deny and validation failures.

## Files That May Be Created

- `app/Http/Requests/*`
- Request tests

## Files That May Be Modified

- Controllers, Livewire components, Actions, DTOs, and tests

## Architecture Rules

- Requests own HTTP boundary validation and authorization only.
- Requests should not contain business workflows.
- Keep request messages localized.

## Testing Requirements

- Test authorization, required fields, invalid data, and any normalization behavior.

## Review Checklist

- Is the request thin and reusable?
- Are authorization and validation both covered?
- Are messages localized?

## Common Mistakes to Avoid

- Putting business logic in `authorize()`.
- Duplicating the same rules in controllers and components.
- Skipping tests because the request looks simple.

Create Request

When To Use

Use this skill for request validation, authorization, input normalization, and reusable HTTP boundary rules.

Inputs Needed

  • Request purpose, actor, validated fields, authorization rule, failure behavior, and tests.

Workflow

  1. Inspect nearby request classes and naming conventions.
  2. Create the request with Artisan.
  3. Put authorization in authorize().
  4. Put validation in rules() and custom messages in messages().
  5. Use prepareForValidation() only for input normalization.
  6. Prefer reusable DTOs or Actions after validation when the same data is needed elsewhere.
  7. Add tests for authorize allow/deny and validation failures.

Files That May Be Created

  • app/Http/Requests/*
  • Request tests

Files That May Be Modified

  • Controllers, Livewire components, Actions, DTOs, and tests

Architecture Rules

  • Requests own HTTP boundary validation and authorization only.
  • Requests should not contain business workflows.
  • Keep request messages localized.

Testing Requirements

  • Test authorization, required fields, invalid data, and any normalization behavior.

Review Checklist

  • Is the request thin and reusable?
  • Are authorization and validation both covered?
  • Are messages localized?

Common Mistakes to Avoid

  • Putting business logic in authorize().
  • Duplicating the same rules in controllers and components.
  • Skipping tests because the request looks simple.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager