/harness:create-policyfrom Harness DevOps
Creates OPA governance policies for Harness via MCP. Defines Rego rules to enforce compliance on pipelines, services, environments, artifacts, and more. Use when asked to create, write, fix, or explain OPA policies, Rego rules, or governance policies for Harness entities.
Ships in Harness DevOps. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Create OPA governance policies for Harness Software Supply Chain Assurance (SCS) via MCP.
Determine what the policy should enforce:
For writing Rego policies, consult references/rego-writing-guide.md for the complete Rego writing rules, entity types, package names, and common patterns. For entity-specific schemas and examples, see the entity reference files listed in that guide.
Call MCP tool: harness_create
Parameters:
resource_type: "policy"
org_id: "<organization>"
project_id: "<project>"
body: <policy definition>
OPA policies are managed under the governance toolset — resource_type: "policy" supports full CRUD (list, get, create, update, delete).
After a policy is created, check compliance status on artifacts or repositories:
Call MCP tool: harness_list
Parameters:
resource_type: "scs_compliance_result"
org_id: "<organization>"
project_id: "<project>"
Enforce that all artifacts have an SBOM before deployment:
package harness.artifact
deny[msg] {
not input.artifact.sbom
msg := "Artifact must have an SBOM before deployment"
}
Deny deployment of artifacts with critical CVEs:
package harness.artifact
deny[msg] {
vuln := input.artifact.vulnerabilities[_]
vuln.severity == "CRITICAL"
msg := sprintf("Critical vulnerability %s found in artifact", [vuln.cve_id])
}
Restrict container images to approved base images:
package harness.artifact
approved_bases := {"alpine", "distroless", "ubuntu"}
deny[msg] {
not approved_bases[input.artifact.base_image]
msg := sprintf("Base image '%s' is not in the approved list", [input.artifact.base_image])
}
Enforce artifact signing before deployment:
package harness.artifact
deny[msg] {
not input.artifact.signed
msg := "Artifact must be signed before deployment"
}
| Resource Type | Operations | Description |
|---|---|---|
policy | list, get, create, update, delete | OPA governance policies (governance toolset) |
policy_set | list, get, create, update, delete | Group policies with enforcement actions |
policy_evaluation | list, get | View policy evaluation results |
scs_compliance_result | list | Check SCS policy compliance status |
artifact_security | list, get | View artifact security posture |
code_repo_security | list, get | View repository security posture |
scs_chain_of_custody | get | Verify artifact provenance |
For writing Rego policies for any Harness entity, consult these reference files:
package harness.<domain> convention.resource_type: "policy")policy_set with an enforcement action (warn/deny) before they firescs_compliance_result or policy_evaluation to verify the policy is being evaluatedpackage harness.<domain> conventionmsg string explaining the violationpolicy_set to activate enforcementreferences/advanced-patterns.md (opens in a new tab)references/entity-code-repository.md (opens in a new tab)references/entity-connector.md (opens in a new tab)references/entity-database.md (opens in a new tab)references/entity-feature-flag.md (opens in a new tab)references/entity-gitops.md (opens in a new tab)references/entity-override.md (opens in a new tab)references/entity-pipeline.md (opens in a new tab)references/entity-sbom.md (opens in a new tab)references/entity-secret.md (opens in a new tab)references/entity-security-tests.md (opens in a new tab)references/entity-service-env-infra.md (opens in a new tab)references/entity-template.md (opens in a new tab)references/entity-terraform.md (opens in a new tab)references/entity-upstream-firewall.md (opens in a new tab)references/entity-variable.md (opens in a new tab)references/quality-tests.md (opens in a new tab)references/rego-writing-guide.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
opa-policy, rego, governance-policy, harness-mcp, supply-chain-security
npx claudepluginhub harness/harness-ai --plugin harness73 skills in this plugin
/ai-operationsConfigure Harness AI-powered operations (AIDA) via MCP. Set up predictive failure analysis with ML models for memory leaks, disk exhaustion, connection pool saturation, and latency degradation. Configure intelligent alert correlation and noise reduction to reduce alert volume. Use when asked to set up predictive failure analysis, configure AI-powered alerting, reduce alert noise, or enable ML-based anomaly detection. Do NOT use for pipeline debugging (use debug-pipeline instead) or SLO management (use manage-slos instead). Trigger phrases: AIDA, predictive failure, alert correlation, noise reduction, anomaly detection, AI ops, predictive analysis, alert fatigue, ML alerting, intelligent alerting./analyze-costsAnalyze cloud costs, find optimization opportunities, and track anomalies using Harness CCM via MCP. Use when user says "cloud costs", "analyze costs", "cost optimization", "reduce spending", "cost report", or asks about cloud bills./approve-exemptApprove pending Harness STO security exemptions (waivers) at their current scope or elevate them to Project, Org, or Account scope. Users say "approve" for both in-scope approval and higher-scope elevation — do not require the word "promote". Supports approving one exemption or a mixed list where each row has a different approval scope. Default workflow lists pending exemptions in chat (paginated preview) so the user picks by row number — no copying from the Harness UI. Use when a user wants to approve, sign off on, or clear pending exemptions, waive approvals, org-wide approval, or account-wide approval. Trigger phrases: approve exempt, approve exemption, approve waiver, sign off exemption, clear pending exemption, approve for org, approve for account, org-wide approval, account-wide approval, pending exemptions.Other plugins' skills for the same job