Enforces Laravel authorization via Policies and Gates, with patterns for controller integration, route protection, and testing.
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.
Use Policies for per-model actions; use Gates for cross-cutting checks.
# Generate a policy
sail artisan make:policy PostPolicy --model=Post # or: php artisan make:policy PostPolicy --model=Post
# Apply in routes (resource controllers)
Route::resource('posts', PostController::class);
// In controller constructor
$this->authorizeResource(Post::class, 'post');
# One-off checks
$this->authorize('update', $post); // in controller
Gate::allows('manage-billing', $user); // ad-hoc gate
viewAny, view, create, update, delete, restore, forceDeleteAuthServiceProvidercan middleware for quick route protection: ->middleware('can:update,post')actingAs($user)->get(...)->assertForbidden() for denied casesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
laravel-authorization, policies, gates, controller-protection
/noartem-laravel-vue-skills:laravel-policies-and-authorizationfrom 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-skills31 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"./laravel-api-resources-and-paginationUse API Resources with pagination and conditional fields; keep response shapes stable and cache-friendly/laravel-config-env-storagePortable storage configuration across S3/R2/MinIO with optional CDN—env toggles, path-style endpoints, and URL generation/laravel-constants-and-configurationReplace hardcoded values with constants, enums, and configuration for maintainability; use PHP 8.1+ enums and config filesOther plugins' skills for the same job