One-click install
npx skills add https://github.com/reckerswartz/resume_builder --skill authorization-pundit-reckerswartz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authorization-pundit
Source: https://github.com/reckerswartz/resume_builder/tree/main/.windsurf/skills/authorization-pundit
Command: npx skills add https://github.com/reckerswartz/resume_builder --skill authorization-pundit-reckerswartz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Implements policy-based authorization for Rails apps, helping prevent unauthorized access and simplify permission management across controllers and views.

Core Features & Use Cases

  • Policy-based authorization with plain Ruby policy objects
  • Controller integration with Pundit, including ApplicationController setup and after_action guards
  • Multiple policy patterns: Basic, Role-Based, State Conditions, and Headless
  • Testing support with pundit-matchers and policy specs

Quick Start

Install pundit, generate install, and create a base policy for your models.

Frequently Asked Questions about authorization-pundit

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

FAQPage Schema
How do I implement role-based authorization in Rails?

Role-based authorization in Rails is implemented using plain Ruby policy objects that check user roles and ownership conditions before permitting access to controller actions and views.

What's the best way to enforce access control policies across Rails controllers and views?

Enforcing access control policies across Rails controllers is done by integrating ApplicationPolicy base classes, policy scopes, and after_action guards to restrict resource visibility and prevent unauthorized access.

How do I set up Pundit policies for a Rails application?

Setting up Pundit policies involves installing the gem, generating the base configuration, and creating a base ApplicationPolicy to define user roles, ownership rules, and state conditions for your models.

Can I handle authorization errors with i18n in Rails policy objects?

Yes, authorization errors can be handled with i18n integration to provide localized error messages when policy checks fail, ensuring consistent access denial feedback across different languages.

How do I test Rails authorization policies and access control rules?

Testing Rails authorization policies uses pundit-matchers and policy specs to verify that user roles, ownership checks, and state conditions correctly permit or deny access to resources.

When should I use headless policies instead of basic Pundit policies?

Headless policies are used when you need authorization logic without an underlying model class, whereas basic Pundit policies apply standard role and ownership checks tied directly to specific resources.