Best for
- Modifying existing endpoints — use the code-refactoring skill.
- API design decisions — use api-design.
- The project is Symfony / Next.js / FastAPI / etc. — go back to api-endpoint and pick the right carve-out.
event4u-app/agent-config/src/skills/laravel-api-endpoint/SKILL.md
Use when creating a new Laravel API endpoint — Controller, FormRequest, Resource, route, Policy, OpenAPI annotations — versioned route layout, single-action `__invoke` controllers.
Decision brief
Use when creating a new Laravel API endpoint — Controller, FormRequest, Resource, route, Policy, OpenAPI annotations — versioned route layout, single-action `__invoke` controllers.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/laravel-api-endpoint"Inspect the Agent Skill "laravel-api-endpoint" from https://github.com/event4u-app/agent-config/blob/6a5670b7881a676c0da90d2afb950298087c4ccb/src/skills/laravel-api-endpoint/SKILL.md at commit 6a5670b7881a676c0da90d2afb950298087c4ccb. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Read project docs — Check ./agents/ and AGENTS.md for controller conventions, resource patterns, routing. 2. Create route — Add to the correct routes/api.php or module route file (routes/api/v{N}/{domain}.php). 3. Create controller — Single-action invokable controller, thin,…
Use this skill when the project is Laravel (detected via artisan + composer.json with laravel/framework) and the user asks to create a new API endpoint, REST route, or controller action.
1. Controller — Single Action (invokable). Read agents/reference/docs/controller.md and ../../../docs/guidelines/php/controllers.md. 2. FormRequest — Validation rules, authorize() via policies. Read ../../../docs/guidelines/php/validations.md. 3. Resource — JSON response transfo…
Controllers are thin — delegate to Services.
Review the “Show endpoint example” section in the pinned source before continuing.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 9 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use this skill when the project is Laravel (detected via artisan + composer.json with laravel/framework) and the user asks to create a new API endpoint, REST route, or controller action.
Routed in from api-endpoint once the stack is detected as Laravel.
Do NOT use when:
api-design.api-endpoint and pick the right carve-out../agents/ and AGENTS.md for controller conventions, resource patterns, routing.routes/api.php or module route file (routes/api/v{N}/{domain}.php).authorize().response()->json()).agents/reference/docs/controller.md and ../../../docs/guidelines/php/controllers.md.authorize() via policies. Read ../../../docs/guidelines/php/validations.md.agents/reference/docs/api-resources.md.agents/reference/docs/query-filter.md (if it exists).response()->json().): ProjectResource).Resource::make() for single items, Resource::collection() for lists.__invoke() for new controllers.declare(strict_types=1);
namespace App\Http\Controllers\v1\Project;
use App\Http\Controllers\Controller;
use App\Http\Requests\v1\Projects\ShowProjectRequest;
use App\Http\Resources\v1\Project\ProjectResource;
use App\Models\ExternalCustomerDatabase\Project\Project;
use App\OpenApi\Schema\Request\ShowResourceRequestSchema;
use App\OpenApi\Schema\Response\ResourceNotFoundResponse;
use App\OpenApi\Schema\Response\ShowResourceResponseSchema;
class ShowProjectController extends Controller
{
#[ShowResourceRequestSchema(path: '/projects/{id}', version: '1', resource: ProjectResource::class)]
#[ShowResourceResponseSchema(ProjectResource::class, wrapInDataObject: false)]
#[ResourceNotFoundResponse(ProjectResource::class)]
public function __invoke(ShowProjectRequest $request, Project $project): ProjectResource
{
return ProjectResource::make($project);
}
}
class CreateCustomerController extends Controller
{
#[CreateCustomerRequestSchema(path: '/customers', version: '1', resource: CustomerResource::class)]
#[CreateResourceResponseSchema(resource: CreatedCustomerResource::class, wrapInDataObject: false)]
#[ValidationErrorResponse]
public function __invoke(
CreateCustomerRequest $request,
CustomerModelService $customerService,
): CustomerResource {
$result = $customerService->create(CreateCustomerDTO::fromRequest($request));
return CreatedCustomerResource::make($result);
}
}
declare(strict_types=1);
namespace App\Http\Requests\v1\Projects;
use Illuminate\Foundation\Http\FormRequest;
class ShowProjectRequest extends FormRequest
{
public function authorize(): bool
{
return $this->user()->can('view', $this->route('project'));
}
/** @return array<string, mixed> */
public function rules(): array
{
return [];
}
}
For list endpoints, extend CollectionFormRequest which provides perPage, page, and orderBy rules:
use App\Contracts\Http\Requests\CollectionFormRequest;
class ListProjectsRequest extends CollectionFormRequest
{
public string $model = Project::class;
/** @return array<string, mixed> */
public function rules(): array
{
return [
...parent::rules(),
'status' => ['sometimes', 'string'],
];
}
}
| Component | Path |
|---|---|
| Controller | app/Http/Controllers/v{N}/{Domain}/{Action}{Entity}Controller.php |
| FormRequest | app/Http/Requests/v{N}/{Domain}/{Action}{Entity}Request.php |
| Resource | app/Http/Resources/v{N}/{Domain}/{Entity}Resource.php |
| Route | routes/api/v{N}/{domain}.php |
| Policy | app/Policies/{Entity}Policy.php |
Controllers use PHP 8 attributes for OpenAPI spec generation from App\OpenApi\Schema\:
ShowResourceRequestSchema, ListResourceRequestSchema, CreateResourceRequestSchemaShowResourceResponseSchema, ListResourceResponseSchema, CreateResourceResponseSchemaResourceNotFoundResponse, ValidationErrorResponsereturn type on Resource toArray() methods.__invoke().response()->json() — use Resource::make().Frequently asked questions
Use when creating a new Laravel API endpoint — Controller, FormRequest, Resource, route, Policy, OpenAPI annotations — versioned route layout, single-action `__invoke` controllers.
The source record exposes this install command: npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/laravel-api-endpoint". Inspect the command and pinned source before running it.
Alternatives
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre
dancingteeth/unified-code-review
Risk-first code review for PRs and branch audits: blast-radius triage, agent-authored discipline (tests first, intent evidence), call-graph pincer for integration defects between modules, then structural code-judo bar. Use when reviewing PRs, auditing agent-written diffs, catching rubber-stamp green CI, or wiring bugs single-file review misses. Prefer over structure-only thermo-nuclear review alone. Do not use for unrelated coding tasks or as an always-on rule.
enuno/unifi-mcp-server
Specialized guide for adding new MCP tools to the UniFi MCP Server following project standards, UniFi API patterns, and test-driven development practices. Use when implementing new UniFi Network Controller features as MCP tools.
PaulRBerg/agent-skills
Create/scaffold/init a project-local agent skill under `.agents/skills` in an ordinary repository; defer to repository instructions that define a source catalog and lifecycle.