Agent skill
laravel-auth
Implement authentication with Sanctum, Passport, Socialite, Fortify, policies, and gates. Use when setting up user authentication, API tokens, social login, or authorization.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/laravel-auth-fusengine-agents
SKILL.md
Laravel Authentication & Authorization
Documentation
Authentication
- authentication.md - Authentication basics
- sanctum.md - API token authentication
- passport.md - OAuth2 server
- fortify.md - Authentication backend
- socialite.md - Social authentication
- starter-kits.md - Breeze & Jetstream
Authorization
- authorization.md - Gates & Policies
Security
- verification.md - Email verification
- passwords.md - Password reset
- encryption.md - Encryption
- hashing.md - Hashing
- csrf.md - CSRF protection
- session.md - Session management
Sanctum Setup
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
}
Policy
<?php
declare(strict_types=1);
namespace App\Policies;
final class PostPolicy
{
public function update(User $user, Post $post): bool
{
return $user->id === $post->user_id;
}
public function delete(User $user, Post $post): bool
{
return $user->id === $post->user_id || $user->isAdmin();
}
}
Gates
Gate::define('admin', fn (User $user) => $user->role === UserRole::Admin);
// Usage
if (Gate::allows('admin')) { }
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?