agent-creator
Use when creating expert agents. Generates agent.md with frontmatter, hooks, required sections, and skill references.
Use when implementing user authentication, API tokens, social login, or authorization in Laravel 13.
Claude Code
$ npx -y skills add fusengine/claude-plugins --skill laravel-auth --agent claude-code
Codex
$ npx skills add fusengine/claude-plugins --skill laravel-auth -a codex -y
Cursor
$ npx skills add fusengine/claude-plugins --skill laravel-auth -a cursor -y
Gemini CLI
$ npx skills add fusengine/claude-plugins --skill laravel-auth -a gemini-cli -y
GitHub Copilot
$ npx skills add fusengine/claude-plugins --skill laravel-auth -a github-copilot -y
OpenCode
$ npx skills add fusengine/claude-plugins --skill laravel-auth -a opencode -y
Windsurf
$ npx skills add fusengine/claude-plugins --skill laravel-auth -a windsurf -y
name: laravel-auth description: Use when implementing user authentication, API tokens, social login, or authorization in Laravel 13. versions: laravel: "13.0" sanctum: "4.3" php: "8.3" user-invocable: true references: references/authentication.md, references/authorization.md, references/sanctum.md, references/passport.md, references/fortify.md, references/socialite.md, references/starter-kits.md, references/verification.md, references/passwords.md, references/session.md, references/csrf.md, references/encryption.md, references/hashing.md, references/templates/LoginController.php.md, references/templates/GatesAndPolicies.php.md, references/templates/PostPolicy.php.md, references/templates/sanctum-setup.md, references/templates/PassportSetup.php.md, references/templates/FortifySetup.php.md, references/templates/SocialiteController.php.md, references/templates/PasswordResetController.php.md related-skills: laravel-api, laravel-permission, fusecore
<objective> Covers the Laravel 13 authentication and authorization ecosystem: Sanctum (API tokens, SPA auth), Passport (OAuth2 server), Fortify (headless custom-UI auth), Socialite (social login), starter kits, policies and gates, email verification, password reset, session management, CSRF / PreventRequestForgery, encryption, and hashing. Includes FuseCore modular- project integration patterns for auth (User module, cross-module authorization via policies). </objective>
Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`:
1. **fuse-ai-pilot:explore-codebase** - Check existing auth setup, guards, policies 2. **fuse-ai-pilot:research-expert** - Verify latest Laravel 13 auth docs via Context7 3. **mcp__context7__query-docs** - Query specific patterns (Sanctum, Passport, etc.)
After implementation, run **fuse-ai-pilot:sniper** for validation.
---
Laravel provides a complete authentication and authorization ecosystem. Choose based on your needs:
| Package | Best For | Complexity | |---------|----------|------------| | **Starter Kits** | New projects, quick setup | Low | | **Sanctum** | API tokens, SPA auth | Low | | **Fortify** | Custom UI, headless backend | Medium | | **Passport** | OAuth2 server, third-party access | High | | **Socialite** | Social login (Google, GitHub) | Low |
---
1. **Use policies for model authorization** - Not inline `if` checks 2. **Always hash passwords** - `Hash::make()` or `'hashed'` cast 3. **Regenerate session after login** - Prevents fixation attacks 4. **Use HTTPS in production** - Required for secure cookies 5. **Define token abilities** - Principle of least privilege
---
app/
├── Http/
│ ├── Controllers/
│ │ └── Auth/ ← Auth controllers (if manual)
│ └── Middleware/
│ └── Authenticate.php ← Redirects unauthenticated
├── Models/
│ └── User.php ← HasApiTokens trait (Sanctum)
├── Policies/ ← Authorization policies
│ └── PostPolicy.php
├── Providers/
│ └── AppServiceProvider.php ← Gate definitions
└── Actions/
└── Fortify/ ← Fortify actions (if used)
├── CreateNewUser.php
└── ResetUserPassword.php
config/
├── auth.php ← Guards & providers
├── sanctum.php ← API token config
└── fortify.php ← Fortify features---
When working in a **FuseCore project**, authentication follows the modular structure:
FuseCore/
├── Core/ # Infrastructure (priority 0)
│ └── App/Contracts/
│ └── AuthServiceInterface.php ← Auth contract
│
├── User/ # Auth module (existing)
│ ├── App/
│ │ ├── Models/User.php ← HasApiTokens trait
│ │ ├── Http/
│ │ │ ├── Controllers/
│ │ │ │ ├── AuthController.php
│ │ │ │ └── TokenController.php
│ │ │ ├── Requests/
│ │ │ │ ├── LoginRequest.php
│ │ │ │ └── RegisterRequest.php
│ │ │ └── Resources/UserResource.php
│ │ ├── Policies/UserPolicy.php
│ │ └── Services/AuthService.php
│ ├── Config/
│ │ └── sanctum.php ← Sanctum config (module-level)
│ ├── Database/Migrations/
│ ├── Routes/api.php ← Auth routes
│ └── module.json # dependencies: []
│
└── {YourModule}/ # Depends on User module
├── App/Policies/ ← Module-specific policies
└── module.json # dependencies: ["User"]// In FuseCore/{Module}/Routes/api.php
Route::middleware(['api', 'auth:sanctum'])->group(function () {
Route::apiResource('posts', PostController::class);
});
// In FuseCore/{Module}/App/Http/Controllers/PostController.php
public function update(UpdatePostRequest $request, Post $post)
{
$this->authorize('update', $post); // Uses PostPolicy
// ...
}→ See [fusecore skill](../fusecore/SKILL.md) for complete module patterns.
---
Need auth scaffolding? → Starter Kit
├── Yes → Use React/Vue/Livewire starter kit
└── No → Building custom frontend?
├── Yes → Use Fortify (headless)
└── No → API only?
├── Yes → Sanctum (tokens)
└── No → Session-basedThird-party apps need access? → Passport (OAuth2) ├── No → Mobile app? │ ├── Yes → Sanctum API tokens │ └── No → SPA on same domain? │ ├── Yes → Sanctum SPA auth (cookies) │ └── No → Sanctum API tokens
---
| Con
A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment.
Use when creating expert agents. Generates agent.md with frontmatter, hooks, required sections, and skill references.
Use when starting ANY development task -- feature, bug fix, refactor, hotfix (triggers: implement, create, build, fix, add…
Use when creating a feature/component or adding functionality. Fires BEFORE APEX Analyze to refine requirements via structured…
Use before a root-cause, done/verified claim, irreversible action, or 2nd-time fix reaches the owner (APEX or plain…
Use when validating code quality after modifications -- SOLID compliance, DRY duplication, linter errors, architecture…
Use when an expert agent self-reviews and self-corrects code after the Execute phase, before sniper validation (BMAD-METHOD…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.