Agent Skills: Policy-as-Code Template Library

>-

UncategorizedID: adaptive-enforcement-lab/claude-skills/policy-as-code-template-library

Install this agent skill to your local

pnpm dlx add-skill https://github.com/adaptive-enforcement-lab/claude-skills/tree/HEAD/plugins/enforce/skills/policy-as-code-template-library

Skill Files

Browse the full folder contents for policy-as-code-template-library.

Download Skill

Loading file tree…

plugins/enforce/skills/policy-as-code-template-library/SKILL.md

Skill Metadata

Name
policy-as-code-template-library
Description
>-

Policy-as-Code Template Library

When to Use This Skill

48 production-ready policies for Kubernetes security and governance. Reduce the Rego learning curve. Copy, customize, deploy.

<!-- more -->

Template Library Overview

This library contains 28 Kyverno policies and 20 OPA/Gatekeeper constraint templates covering pod security, image validation, RBAC, resource governance, network security, mutation, and generation. Each template includes complete YAML/Rego, customization variables, validation commands, and real-world use cases.


Implementation

Deploy in Audit Mode First

Always start with audit (Kyverno) or dryrun (OPA) mode. Monitor violations for 48 hours before switching to enforcement. Existing workloads may violate policies.

Kyverno Quick Start (5 minutes)

See examples.md for detailed code examples.

OPA/Gatekeeper Quick Start (10 minutes)

See examples.md for detailed code examples.


Comparison

Choose the right policy engine for your team:

| Feature | Kyverno | OPA/Gatekeeper | |---------|---------|----------------| | Policies | 28 (validation, mutation, generation) | 20 (validation only) | | Language | YAML + JMESPath | Rego (Go-like DSL) | | Learning Curve | < 1 hour | 4-8 hours | | Best For | Kubernetes-native teams, fast adoption | Multi-platform policies, complex logic | | Mutation | ✅ Native support | ❌ Validation only | | Generation | ✅ Auto-create resources | ❌ Validation only |

See Decision Guide → for detailed comparison and recommended starter paths.


Examples

See examples.md for code examples.

Full Reference

See reference.md for complete documentation.

Related Patterns

  • Kyverno Official Documentation
  • OPA/Gatekeeper Documentation
  • Kubernetes Pod Security Standards
  • NIST SP 800-190
  • CIS Kubernetes Benchmark

References