# Conftest Structured Configuration Policy Testing with OPA Rego

> Conftest is a CLI tool that tests structured configuration data using the Open Policy Agent Rego language. It validates Kubernetes manifests, Terraform configs, Dockerfiles, CI pipelines, and any other structured format against custom policy rules.

- Skill: `agentskillexchange/conftest-structured-configuration-policy-testing-with-opa-re` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/conftest-structured-configuration-policy-testing-with-opa-re`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/conftest-structured-configuration-policy-testing-with-opa-re/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/conftest-structured-configuration-policy-testing-with-opa-re

---


# Conftest Structured Configuration Policy Testing with OPA Rego

Conftest is a CLI tool that tests structured configuration data using the Open Policy Agent Rego language. It validates Kubernetes manifests, Terraform configs, Dockerfiles, CI pipelines, and any other structured format against custom policy rules.

## Installation

Basic usage or getting-started notes:
- Here's a quick example. Save the following as policy/deployment.rego:
- Assuming you have a Kubernetes deployment in deployment.yaml you can run Conftest like so:

- Source: https://github.com/open-policy-agent/conftest
- Extracted from upstream docs: https://raw.githubusercontent.com/open-policy-agent/conftest/HEAD/README.md

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/conftest-opa-config-policy-testing/)

