Use API Resources with pagination and conditional fields; keep response shapes stable and cache-friendly
Ships in noartem-laravel-vue-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Represent models via Resources; keep transport concerns out of Eloquent.
# Resource
php artisan make:resource PostResource # or: php artisan make:resource PostResource
# Controller usage
return PostResource::collection(
Post::with('author')->latest()->paginate(20)
);
# Resource class
public function toArray($request)
{
return [
'id' => $this->id,
'title' => $this->title,
'author' => new UserResource($this->whenLoaded('author')),
'published_at' => optional($this->published_at)->toAtomString(),
];
}
Resource::collection($query->paginate()) over manual arrayswhen() / mergeWhen() for conditional fieldsWhat SKILL.md sets; muted values are Claude Code's defaults
31 skills in this plugin
/baseline-uiEnforces an opinionated UI baseline to prevent AI-generated interface slop./complexity-guardrailsKeep cyclomatic complexity low; flatten control flow, extract helpers, and prefer table-driven/strategy patterns over large switches/laravel-apiBuild production-grade Laravel REST APIs using opinionated architecture patterns with Laravel best practices. Use when building, scaffoling, or reviewing Laravel APIs with specifications for stateless design, versioned endpoints, invokable controllers, Form Request DTOs, Action classes, JWT authentication, and PSR-12 code quality standards. Triggers on "build a Laravel API", "create Laravel endpoints", "add API authentication", "review Laravel API code", "refactor Laravel API", or "improve Laravel code quality"./noartem-laravel-vue-skills:laravel-api-resources-and-paginationfrom noartem-laravel-vue-skills
noartem-laravel-vue-skills@cascade-code-languages-misc-2 is listed by joshuarweaver/cascade-code-languages-misc-2 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-2 --plugin noartem-laravel-vue-skillsOther plugins' skills for the same job