Policy as code generator

From ethanolivertroy/claude-grc-engineering · View interactive version

Policy as code generator is an AI agent skill from the GitHub repository ethanolivertroy/claude-grc-engineering. Converts natural language compliance requirements into executable policies (OPA Rego, AWS Config Rules, Sentinel, Terraform). Standardizes governance by making it part of the build process.

How to use this skill

Skill file

Policy-as-Code Generator

Converts natural language compliance requirements into executable policy code. Generates OPA Rego, AWS Config Rules, Sentinel policies, or Terraform modules.

Quick Commands

Generate OPA Rego policy:

node plugins/grc-engineer/scripts/generate-policy.js "Ensure no S3 buckets are public and all must have a 'Department' tag" rego

Generate AWS Config Rule:

node plugins/grc-engineer/scripts/generate-policy.js "All EC2 instances must have encryption enabled" aws-config

Generate Sentinel policy:

node plugins/grc-engineer/scripts/generate-policy.js "Terraform plans must not create resources without required tags" sentinel

Supported Output Formats

Example Inputs

Output Structure

Generated policies include:

Prerequisites

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.