A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
A Claude Code skill for generating, reviewing, and testing OPA Rego policies following security best practices.
A Claude Code skill for generating, reviewing, and testing OPA Rego policies following security best practices.
if / in / contains / every are built-in keywords (no import needed); import rego.v1 is supported for 0.x compatibility# Clone to your Claude skills directory
git clone https://github.com/Void3110/rego-skill.git ~/.claude/skills/rego-skill
# Clone to your project
git clone https://github.com/Void3110/rego-skill.git .claude/skills/rego-skill
# Commit to share with team
git add .claude/skills/rego-skill
git commit -m "Add rego-skill for OPA policy development"
The skill auto-activates when you mention OPA, Rego, authorization policies, or access control.
User: Create a policy where admins can read, write, and delete. Editors can read and write. Viewers can only read.
Claude will:
default allow := false*_test.regoopa check and opa test . -vUser: Review @policies/auth.rego for security issues
User: Write tests for @policies/gateway.rego
Every policy task follows this sequence:
opa check and opa test . -v| Document | Purpose |
|---|---|
| SKILL.md | Core instructions and patterns |
| GENERATE.md | Step-by-step policy generation |
| SECURITY.md | Security review checklist |
| TESTING.md | Test patterns and coverage |
| BEST-PRACTICES.md | Performance, style, and OPA 1.0 migration notes |
| WORKFLOW.md | The suite-wide security-audit Workflow — in depth (architecture, token cost, design) |
See examples/ for complete working policies:
rbac.rego + rbac_test.rego - Role-Based Access Controlgateway.rego + gateway_test.rego - API Gateway AuthorizationRun example tests:
cd examples
opa test . -v
# PASS: 47/47
Beyond authoring one policy at a time, the skill ships a multi-agent audit Workflow
(rego-security-audit-workflow.js) that audits an entire policy corpus at once:
.rego policy, scoring each against the 10-check security rubric;audit-reports/REGO-SECURITY-AUDIT-<date>.md. Report-only — it never edits a
policy.Two caveats:
- This uses the Claude Code Workflow feature (multi-agent orchestration), a relatively new capability — your Claude Code version must expose it. The rest of the skill works without it.
- It can be token-hungry. A run spawns many agents (one per policy, plus verifiers, plus cross-policy agents), so cost scales with corpus size and findings density. The workflow has built-in caps (
maxPolicies, per-policy verify limits, incremental mode). Budget accordingly.
See WORKFLOW.md for the full architecture, measured token costs, and design rationale, and the "Suite-wide security audit" section of SKILL.md for how to run it.
A sample report generated by running this workflow on this repo's own policies lives in
audit-reports/ — it caught a real glob.match auth bypass in
examples/gateway.rego (since fixed).
package mypackage
# OPA 1.0+: no import needed. (Add `import rego.v1` only to also run on OPA 0.x.)
default allow := false
allow if {
# explicit conditions only
}
On OPA 1.0+ the if / in / contains / every keywords are built in — no import required.
See BEST-PRACTICES.md for the full 1.0 migration notes.
package mypackage
# Use 'if' keyword
allow if {
some role in input.user.roles
role == "admin"
}
# Use 'contains' for sets
violations contains msg if {
# condition
msg := "violation message"
}
# Use 'every' for universal checks
all_valid if {
every item in input.items {
item.status == "approved"
}
}
decision := {
"allowed": allowed,
"reason": reason,
"context": {
"user": input.user.id,
"action": input.action
}
}
Before completing any policy:
default allow := false)allow := trueis_string, is_array)MIT
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams
Claude Code skill for YouTube creators — channel audits, video SEO, retention scripts, thumbnails, content strategy, Sho
Design enforcement with memory — keeps your UI consistent across a project
AI image generation skill for Claude Code -- Creative Director powered by Gemini