create-policy

Generate OPA governance policy templates and policy-set scaffolds for Harness MCP.

80|16|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/harness/harness-skills --skill create-policy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-policy
Source: https://github.com/harness/harness-skills/tree/main/skills/create-policy
Command: npx skills add https://github.com/harness/harness-skills --skill create-policy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Governing Harness configurations across pipelines, services, environments and other entities requires consistent policy templates. This skill generates ready-to-use OPA policy templates and policy-set scaffolds for Harness MCP, enabling safe, repeatable governance.

Core Features & Use Cases

  • Generate Rego-based governance policies (deny/warn rules) for common Harness entities (pipeline, service, environment, feature flags, Terraform, GitOps, secrets, and more).
  • Provide ready-to-deploy policy skeletons and references to Rego writing patterns to accelerate policy authoring.
  • Create policy-sets and example policies to illustrate governance workflows and explain enforcement points.

Quick Start

Generate a minimal deny policy in Rego for a common Harness entity (e.g., a pipeline) to enforce governance.

Frequently Asked Questions about create-policy

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

FAQPage Schema
How do I generate OPA governance policies for Harness pipelines and services?

To generate OPA governance policies for Harness pipelines and services, use this skill to create reusable Rego-based deny and warn rule templates. It provides ready-to-deploy policy scaffolds that enforce consistent syntax across all Harness entities.

What is a Harness policy-set and how does it work with Rego?

A Harness policy-set is a collection of Rego governance rules applied to entities like pipelines, environments, and feature flags. This skill creates policy-set scaffolds and example policies to illustrate enforcement workflows and explain deployment points.

Can I use this to create governance policies for Terraform and GitOps configurations?

Yes, you can use this skill to create governance policies for Terraform and GitOps configurations. It supports generating Rego deny rules and policy templates for these specific Harness entities, along with secrets and feature flags.

How do I write Rego deny rules with the correct frontmatter metadata for Harness MCP?

To write Rego deny rules with correct frontmatter metadata for Harness MCP, this skill enforces frontmatter requirements and provides structured guidance on Rego patterns and Harness references to ensure your policies are valid and testable.

What's the best way to automate policy authoring for multiple Harness entities?

The best way to automate policy authoring for multiple Harness entities is to generate standardized policy templates using this skill. It accelerates authoring by providing reusable skeletons for pipelines, services, environments, and other configuration objects.

Does this skill provide testable policy templates for feature flags and secrets?

Yes, this skill provides testable policy templates for feature flags and secrets. It generates structured Rego templates with consistent syntax and frontmatter metadata, ensuring policies governing these Harness entities are safe and repeatable.