Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

tirith-policies

Skill by StackGuardian

Writes, validates, runs and debugs Tirith IaC governance policies, and adds Tirith to CI pipelines. It is for engineers who gate Terraform or OpenTofu changes before apply. Tirith checks the plan a pipeline produces against JSON policies.

  • Score 72
  • 176 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install tirith-policies

Built from the published package, never by AI.

git clone --depth 1 https://github.com/StackGuardian/tirith /tmp/tirith && mkdir -p ~/.claude/skills && cp -r /tmp/tirith/.claude/skills/tirith-policies ~/.claude/skills/tirith-policies

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install tirith-policies in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill guides an assistant through Tirith, a tool that checks the plan a pipeline already produces against declarative JSON policies. A policy names a provider, the value to inspect, and the condition that value must satisfy. Tirith exits non-zero when a policy fails, so a violating change does not reach apply. The skill covers writing policies, validating them, running them, reading exit codes, and debugging a failed check.

The skill is aimed at engineers who run Terraform, OpenTofu or other infrastructure-as-code pipelines and want a guardrail in CI. It also covers adding Tirith to GitHub Actions, GitLab CI, Bitbucket Pipelines, Jenkins, Azure DevOps, CircleCI or any container runner. It says to test each policy against a document that should fail it, because a policy that matches nothing looks the same as one that works.

Written from the project's SKILL.md and checked against it.

What it can do

  • Write policiesCreates Tirith JSON policies for Terraform or OpenTofu plans, Kubernetes manifests, Infracost breakdowns and arbitrary JSON or YAML.
  • Validate policiesChecks a policy is well formed using tirith lint, tirith fmt and the interface, per the validation reference.
  • Run policiesRuns a policy against an input document and reports the verdict and exit code.
  • Read exit codesExplains exit codes 0, 1 and 3 and what a CI job should do with each.
  • Add to CI pipelinesDescribes adding Tirith to GitHub Actions, GitLab CI, Bitbucket Pipelines, Jenkins, Azure DevOps and CircleCI.
  • Debug failed checksGuides from a red CI build to the rule and the resource that caused the failure.
  • Bundled exampleProvides a required-tags example with a policy, a failing plan and a passing plan.

What you need

  • Python with pip
  • Git access to GitHub to install Tirith from a tag
  • Tirith 1.2.1 or later for tirith lint

Try asking

  • Write a Tirith policy that requires a costcenter tag on every resource
  • Add a Tirith check to my GitHub Actions Terraform pipeline
  • Why did my Tirith check exit with code 3 in CI?

Good to know

  • Tirith is not published on PyPI; pip install tirith installs an unrelated project
  • There is no CloudFormation provider; templates are read as arbitrary JSON
  • tirith lint ships from version 1.2.1
  • Translating Sentinel policies requires the separate tirith-migrate skill

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/tirith-policies/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to tirith-policies

All alternatives →
deploy-release-testvercel
94

Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.

AAA Skill 144k
deepeval-tracingconfident-ai
94

Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.

AAA Skill 20k
azure-container-registry-cligithub
94

Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.

AAA Skill 42k
crabbox-appsopenclaw
94

Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.

AAA Skill 395k
gke-batch-hpcgoogle
94

Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.

AAA Skill 25k
gke-cost-analysisgoogle
94

Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.

AAA Skill 25k

Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli

tirith-policies: common questions

What does Tirith exit code 1 mean?

Exit code 1 means no verdict could be reached, such as a tool or input problem, a skipped run or a platform timeout. It is not a policy failure, which exits with 3.

Does Tirith support CloudFormation?

The source says there is no CloudFormation provider. A CloudFormation template is handled as arbitrary JSON read by the stackguardian/json provider.

Why does a policy pass when it should fail?

The source says a policy that matches nothing looks identical to one that works. A wrong argument key is ignored rather than rejected, so the check reads nothing and passes, so test each policy against a failing document.

How do I install tirith-policies?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is tirith-policies free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is tirith-policies safe to use?

It scores 72 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to tirith-policies?

Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.

tirith-policies Install

Add to stack

Loading.