symfony:voter

Generate Symfony Security Voter classes with defined permissions and decision strategies.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/atournayre/claude-personas --skill symfony-voter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: symfony:voter
Source: https://github.com/atournayre/claude-personas/tree/main/symfony/skills/voter
Command: npx skills add https://github.com/atournayre/claude-personas --skill symfony-voter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the creation of Symfony Security Voters, enabling fine-grained access control for specific objects and actions within your application.

Core Features & Use Cases

  • Automated Voter Generation: Creates a Voter class based on user-defined permissions and subject types.
  • Granular Access Control: Implements logic for VIEW, EDIT, DELETE, and custom permissions.
  • Use Case: Securely manage access to sensitive data like user profiles or financial records by defining who can view, edit, or delete them.

Quick Start

Use the symfony:voter skill to generate a new voter for managing access to posts.

Frequently Asked Questions about symfony:voter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Symfony Security Voter for granular access control?

To create a Symfony Security Voter, you generate a PHP class in `src/Security/Voter/` that defines permissions, subject types, and decision strategies for authenticated and anonymous users. You provide the voter name, subject, permissions, and strategy to produce the file.

How does a Symfony Voter handle custom permissions like VIEW or EDIT?

A Symfony Voter handles custom permissions by implementing attribute-based logic that checks if a user can VIEW, EDIT, or DELETE a specific object. The generated class validates the subject type and applies the defined access strategy for the requested permission.

Can I use this to manage anonymous and authenticated user access in Symfony?

Yes, you can manage anonymous and authenticated user access in Symfony. The generated Voter class includes defined access strategies that explicitly handle permission logic for both authenticated and anonymous users based on the subject object.

What is the best way to secure specific objects and actions in a Symfony application?

The best way to secure specific objects and actions in Symfony is using a Security Voter. It provides granular access control by linking defined permissions directly to subject types, ensuring only authorized users can interact with sensitive data like financial records.

Do I need to manually configure access strategies when generating a Symfony Voter?

No, you do not need to manually configure access strategies from scratch. When generating the Symfony Voter, you provide the desired decision strategy as input, and the resulting PHP file automatically implements the access logic for your specified permissions.