Implements policy-based authorization with Pundit for resource access control. Use when adding authorization rules, checking permissions, restricting actions, role-based access, or when user mentions Pundit, policies, authorization, or permissions.
86
83%
Does it follow best practices?
Impact
93%
1.04xAverage score across 3 eval scenarios
Passed
No known issues
Policy TDD workflow and structure
Policy file locations
100%
100%
Policy naming convention
100%
100%
ApplicationPolicy base
100%
100%
Default deny in base
100%
100%
Scope class defined
100%
100%
Multi-tenancy in Scope
100%
100%
TDD workflow documented
100%
100%
pundit-matchers gem listed
100%
100%
pundit/matchers required
100%
100%
permit_actions matcher used
62%
75%
Private helper methods
100%
100%
Nested resource delegation
100%
100%
Scope raises NotImplementedError
100%
100%
Spec covers multiple contexts
100%
100%
Controller integration and authorization enforcement
Pundit::Authorization included
100%
100%
verify_authorized after_action
50%
100%
verify_policy_scoped after_action
100%
100%
rescue_from configured
100%
100%
Redirect back on unauthorized
100%
100%
policy_scope in index
100%
100%
authorize on resource actions
100%
100%
Custom action authorization
100%
100%
skip_after_action for public pages
100%
100%
skip_after_action policy_scoped
100%
100%
i18n default message
100%
100%
i18n action-specific messages
100%
100%
Flash alert on unauthorized
100%
100%
Permitted attributes and view integration
permitted_attributes defined
90%
100%
Role-based attribute lists
100%
100%
Admin-only fields
100%
100%
permitted_attributes in create
60%
100%
permitted_attributes in update
55%
100%
policy() in view
0%
0%
Scope with role filtering
100%
100%
ViewComponent Pundit include
0%
0%
Direct policy instantiation
100%
100%
Component exposes can_* methods
100%
100%
Specs cover permitted_attributes
100%
100%
Scope inherits correctly
100%
100%
15fdeaf
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.