Laravel Permission Development

🌐Community
by spatie · vlatest · Repository

Streamlines Laravel application permission management with Spatie’s package, simplifying role-based access control and boosting security.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add laravel-permission-development npx -- -y @trustedskills/laravel-permission-development
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "laravel-permission-development": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/laravel-permission-development"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill enables AI agents to manage user roles and permissions within Laravel applications using the spatie/laravel-permission package. It automates the setup of role-based access control (RBAC), allowing agents to define roles, assign users, and restrict resource access dynamically.

When to use it

  • Role Creation: Automatically generate custom roles like "Editor" or "Auditor" with specific permission sets during application onboarding.
  • User Assignment: Assign newly registered users to appropriate roles based on their profile data or organizational hierarchy.
  • Access Control Enforcement: Dynamically check if a user possesses the necessary permissions before granting access to protected API endpoints or dashboard sections.
  • Permission Auditing: Generate reports listing which users hold specific permissions to ensure compliance and security standards.

Key capabilities

  • Define custom roles and permissions via code or configuration.
  • Assign roles to users, groups, or other roles for hierarchical management.
  • Check user permissions against specific actions or resources.
  • Manage permission scopes for granular control over application features.

Example prompts

  • "Create a 'Super Admin' role and assign it to the current user with full access to all system settings."
  • "Check if the logged-in user has permission to delete posts in the blog section."
  • "Assign the 'Content Writer' role to all users belonging to the marketing department group."

Tips & gotchas

Ensure the spatie/laravel-permission package is installed and configured before attempting to manage roles. This skill relies on existing Laravel models; ensure your User model implements the required trait for seamless integration.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
spatie
Installs
42

🌐 Community

Passed automated security scans.