rego-skill

Generate, review, and test OPA Rego policies with default deny and test suites.

17|1|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/Void3110/rego-skill --skill rego-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rego-skill
Source: https://github.com/Void3110/rego-skill/tree/main
Command: npx skills add https://github.com/Void3110/rego-skill --skill rego-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation, security review, and test-driven validation of Open Policy Agent Rego policies so teams avoid insecure authorizations and manual policy mistakes.

Core Features & Use Cases

  • Policy generation: Create policies that start with explicit default deny and use modern Rego syntax.
  • Security review: Apply a checklist to detect input validation gaps, privilege escalation, path traversal, regex risks, and information leakage.
  • Test generation & validation: Produce comprehensive test suites covering allow, deny, and edge cases and validate policies with OPA tooling.
  • Use case: Author RBAC or ABAC policies for API gateways, Kubernetes admission controllers, or internal authorization services and ship them with passing tests and auditable decisions.

Quick Start

Create a Rego policy that grants admins full access, editors read and write, and viewers read-only for resource type document.

Frequently Asked Questions about rego-skill

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

FAQPage Schema
How do I generate OPA Rego policies with tests included?

Generating OPA Rego policies with tests involves creating files with modern syntax, explicit default deny rules, and companion *_test.rego suites. This skill produces secure authorization policies and validates them using opa check and opa test.

How do I write secure RBAC and ABAC policies for an API gateway?

Writing secure RBAC and ABAC policies for API gateways requires explicit default deny and auditable decisions. This skill generates policies that pass a security review checklist to detect input validation gaps, privilege escalation, and information leakage.

What is the best way to test Kubernetes admission control policies in Rego?

Testing Kubernetes admission control policies in Rego requires comprehensive test suites covering allow, deny, and edge cases. This skill produces companion *_test.rego files and validates authorization decisions using opa test.

Can I use this to review existing Rego policies for security vulnerabilities?

Reviewing existing Rego policies for security vulnerabilities is supported through a dedicated checklist. This skill detects input validation gaps, path traversal risks, regex vulnerabilities, and information leakage in your authorization rules.

Do I need to install OPA tooling to validate generated Rego policies?

Validating generated Rego policies requires OPA tooling to execute opa check and opa test. This skill outputs Rego files and companion test suites designed to be validated by the Open Policy Agent CLI.

Why should my Rego policy use explicit default deny?

Explicit default deny ensures your Rego policy blocks unauthorized access by default before evaluating allow conditions. This skill generates policies starting with default deny to prevent insecure authorizations and manual policy mistakes.