Agent skill

Tirith Standards

by StackGuardian in StackGuardian/tirith

Generate a Tirith policy set for an existing Terraform or OpenTofu repository, covering organization standards such as required tags, naming conventions, allowed regions, permitted resource types…

Apache-2.0Auto-check passedDevOps & Cloud

Install Tirith Standards

skills CLI
$ npx skills add StackGuardian/tirith --skill tirith-standards -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install StackGuardian/tirith tirith-standards --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/StackGuardian/tirith.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/tirith-standards .claude/skills/tirith-standards && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tirith-standards
GitHub stars
167
Token cost
~2k tokens
SKILL.md length
1,039 words
Files
7
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Generate a Tirith policy set for an existing Terraform or OpenTofu repository, covering organization standards such as required tags, naming conventions, allowed regions, permitted resource types…

  • Works in 6 steps: Inventory the repository. List every… → Extract the conventions already there.… → Propose before writing. Give the user a… → …
  • Asked to add guardrails to a repository that has no policies yet
  • SKILL.md covers Vocabulary comes from…, The boundary that decides…, The rule that catches most… and Protocol, plus 3 more sections
  • Calls terraform; reaches stackguardian.github.io

What it does

Tirith Standards is an agent skill from StackGuardian/tirith. Generate a Tirith policy set for an existing Terraform or OpenTofu repository, covering organization standards such as required tags, naming conventions, allowed regions, permitted resource types, sizes and encryption defaults. Use when asked to add guardrails to a repository that has no policies yet, to enforce a tagging or naming standard, to codify a team convention, or to produce a starting policy set from existing IaC. Requires the tirith-policies skill for the vocabulary.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files (for example `examples/org-standards/README.md`, `examples/org-standards/naming.json` and `examples/org-standards/no-bucket.json`).

It sits in DevOps & Cloud, covering Infrastructure as code. It works with Terraform, Amazon Web Services and Microsoft Azure. The repository describes itself as: Plug IaC governance into any IaC pipeline. Evaluate plans with Tirith, protect sensitive values, enforce centralised policies, and surface actionable results before… The licence is Apache-2.0.

When your agent uses it

  • Asked to add guardrails to a repository that has no policies yet
  • Enforce a tagging
  • Naming standard
  • Codify a team convention

Example prompts

  • “/tirith-standards”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Inventory the repository. List every distinct resource "TYPE" "NAME" across .tf and
  2. Extract the conventions already there. Read the existing code before proposing rules. What
  3. Propose before writing. Give the user a table: standard, the resource types it would cover,
  4. Write one file per standard, under .tirith/policies/, named for the rule
  5. Prove each one. For every policy, produce a plan document that violates it and confirm
  6. Report what you could not express. Name the standard, name what Tirith would need, and stop.

What it can do on your machine

Read from SKILL.md and the folder at commit 4a3411e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • terraform

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • stackguardian.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tirith Standards loads about 2k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 1,039 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~125
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from StackGuardian/tirith at commit 4a3411e, republished under its Apache-2.0 licence (© StackGuardian). 1,039 words, ~1,989 tokens.

Download SKILL.mdSave it as .claude/skills/tirith-standards/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
tirith-standards
description
Generate a Tirith policy set for an existing Terraform or OpenTofu repository, covering organization standards such as required tags, naming conventions, allowed regions, permitted resource types, sizes and encryption defaults. Use when asked to add guardrails to a repository that has no policies yet, to enforce a tagging or naming standard, to codify a team convention, or to produce a starting policy set from existing IaC. Requires the tirith-policies skill for the vocabulary.

Standards policies from existing IaC

A catalogue of generic checks is not what stops your incidents. The rules that do are the ones only your organization can state: the tag your finance team reconciles against, the module registry you are allowed to pull from, the two regions your data residency answer depends on.

This skill turns a repository you already have into that policy set.

Vocabulary comes from tirith-policies

Do not write policy JSON from memory. Read ../tirith-policies/reference/schema.md for the closed list of providers, operations, argument keys and the thirteen condition types. If that skill is not installed, fetch https://stackguardian.github.io/tirith/llms.txt and follow it to the schema page. Everything below assumes that vocabulary.

The boundary that decides every policy: HCL in, plan out

You read .tf and .tofu files to discover what to write policies about. The policies themselves never see that HCL. They evaluate terraform show -json output, where:

In your codeIn the plan
var.environment, local.tags, ${} interpolationalready resolved to a value, or null when it is not known until apply
a module blockits resources, at addresses like module.vpc.aws_subnet.this[0]
count / for_eachone resource instance per element
a computed namenull, because the plan does not know it yet
dynamic blocksthe blocks they expanded into

So: never write a policy about a variable, a local, or a module block. Write it about the resource attribute the plan will carry. A standard that is only enforceable in HCL (for example "always use our module rather than the raw resource") is expressible as direct_references or as a provider_config check, or not at all. Say which, rather than producing a policy that reads nothing.

The rule that catches most generated policies

severity > error_tolerance  ->  the check FAILS
otherwise                   ->  the check is SKIPPED

DEFAULT_ERROR_TOLERANCE is 0, and the plan provider raises severity 1 when the resource type is absent from the plan and 2 when the attribute is absent from the resource.

Therefore a policy scoped to one resource type has no green outcome on a plan that does not touch that type. Both tolerance settings are red, in different ways, and this is the single most common defect in a generated standards set:

error_tolerancePlan has no resource of that typeReads as
omitted, so 01 > 0, the check fails, exit 3your infrastructure violates a policy
1the check is skipped, so every check is skipped, final_result: null, exit 1Tirith could not reach a verdict
Guard every type-scoped policy

count behaves differently from attribute on an absent type: it returns 0 rather than raising severity 1. So it can gate the rule.

json
{
  "evaluators": [
    {"id": "not_applicable",
     "provider_args": {"operation_type": "count", "terraform_resource_type": "aws_s3_bucket"},
     "condition": {"type": "Equals", "value": 0}},
    {"id": "the_rule", "provider_args": {"...": "..."},
     "condition": {"type": "RegexMatch", "value": "...", "error_tolerance": 1}}
  ],
  "eval_expression": "not_applicable || the_rule"
}

Verified on the engine: exit 3 when a bucket breaks the rule, 0 when they all satisfy it, 0 when the plan touches no bucket at all. examples/org-standards/ is that policy with its three plans.

Keep error_tolerance: 1 on the rule alongside the guard, so the not-applicable case is skipped rather than failed and then masked by the ||. Both give exit 0; only one leaves a clean result document.

StandardScopeShape
Presence, all types"*"no guard needed, omit the tolerance. A plan always contains something
Anything scoped to a typeaws_s3_bucketguard + error_tolerance: 1
Anythinganynever 2. It forgives the missing attribute, which is the thing you were checking

Deletes are safe by default: a destroyed resource is severity 0, which the default tolerance skips rather than fails.

Show full SKILL.md (486 more words)Show less

Protocol

  1. Inventory the repository. List every distinct resource "TYPE" "NAME" across .tf and .tofu files. Group by provider (aws_, azurerm_, google_). Note which types are used more than once: those are where a standard pays for itself. Note the modules in use and where they are sourced from.

  2. Extract the conventions already there. Read the existing code before proposing rules. What tag keys appear on most resources? What naming pattern do the existing names follow? Which regions and instance sizes appear? A standard the repository already follows is a rule you can enforce today without a migration; a standard it does not follow yet is a change request, and you must say so rather than shipping a policy that fails on day one.

  3. Propose before writing. Give the user a table: standard, the resource types it would cover, how many resources in the repository would pass today, and how many would fail. Let them choose. Do not generate thirty policies unasked.

  4. Write one file per standard, under .tirith/policies/, named for the rule (required-tags.json, naming-s3.json). One concern per file: a single policy combining tags and naming reports one verdict for two unrelated problems, and the person who has to fix it cannot tell which fired.

  5. Prove each one. For every policy, produce a plan document that violates it and confirm tirith -policy-path P -input-path should-fail.json --fail-on-error exits 3, then one that satisfies it and confirm exit 0. A policy that has only been seen passing is untested. Run tirith lint over the directory first: it catches an invented condition type or a misplaced error_tolerance without needing any plan at all.

  6. Report what you could not express. Name the standard, name what Tirith would need, and stop. A policy that approximates a rule without saying so is worse than an absent one.

The standards catalogue

reference/standards.md carries one row per standard: the exact provider_args, the condition, the tolerance, and the trap specific to that standard. Read it before writing any of them. It covers required tags, tag value shape, naming conventions, allowed regions, permitted and forbidden resource types, size ceilings, encryption and public-access defaults, provider version pinning, and module source restrictions.

What not to generate

Why
A policy per resource instanceStandards are about types, not addresses. terraform_resource_type already quantifies over every instance
A policy about var. or local.Neither survives into the plan. See the boundary table above
error_tolerance: 2 on a presence checkIt forgives exactly the case the check exists to catch
A rule the repository does not already follow, shipped silentlyIt fails on the first run and gets disabled. Propose it as a change first
Thirty policies from one requestPropose the set, ship what is agreed

Worked example

examples/org-standards/ holds a naming policy with the plan that violates it and the plan that satisfies it, including the error_tolerance: 1 that keeps it quiet on unrelated changes.

© StackGuardian, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files in .claude/skills/tirith-standards of StackGuardian/tirith.

  • SKILL.md
  • examples/org-standards/README.md
  • examples/org-standards/naming.json
  • examples/org-standards/no-bucket.json
  • examples/org-standards/should-fail.json
  • examples/org-standards/should-pass.json
  • reference/standards.md

Open the folder on GitHubat commit 4a3411e

Compare with similar skills

Tirith Standards next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tirith Standards compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tirith Standards this skillStackGuardian/tirith167—~2kAutomated safety check: PassApache-2.0
Terravision Cloud Diagramspatrickchugh/terravision1.6k—~5.6kAutomated safety check: NotesAGPL-3.0-only
TerrasharkLukasNiessen/terrashark715—~843Automated safety check: PassMIT
Provider Verificationmondoohq/mql411—~3.7kAutomated safety check: PassCustom licence
Terraform Module Librarywshobson/agents40k10 repos~1.3kAutomated safety check: PassMIT
Atmos Migrationcloudposse/atmos1.4k—~5.1kAutomated safety check: WarnApache-2.0

Similar skills

  • Terravision Cloud Diagrams

    patrickchugh/terravision

    Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.

    1.6k GitHub stars~5.6k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Terrashark

    LukasNiessen/terrashark

    Prevent Terraform/OpenTofu hallucinations by diagnosing and fixing failure modes: identity churn, secret exposure, blast-radius mistakes, CI drift, and compliance gate gaps.

    715 GitHub stars~843 tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Verify mql provider resource/field changes against real cloud infrastructure.

    411 GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Build reusable, tested Terraform modules for AWS, Azure, GCP and OCI, with a standard file layout, an AWS VPC example, versioning rules and Terratest checks.

    40k GitHub starsUsed in 10 repos~1.3k tokens
    DevOps & CloudAuto-check passed
  • Atmos Migration

    cloudposse/atmos

    Migrate to Atmos from native Terraform, Terraform Workspaces, Terramate, Terragrunt, Make, Just, or Task; migrate tool versions from mise or Aqua CLI; migrate AWS/GCP/Azure CLI configs, Leapp…

    1.4k GitHub stars~5.1k tokensUpdated today
    DevOps & CloudAuto-check: warnings
  • Tsh Implementing Terraform Modules

    TheSoftwareHouse/copilot-collections

    Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices.

    284 GitHub stars~1.6k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed

More from StackGuardian/tirith

  • Tirith Migrate

    StackGuardian/tirith

    Translate existing policy-as-code into Tirith policies. An agent skill from StackGuardian/tirith.

    167 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Tirith Policies

    StackGuardian/tirith

    Write, validate, run and debug Tirith IaC governance policies, install Tirith, and add it to a CI pipeline (GitHub Actions, GitLab CI, Bitbucket Pipelines, Jenkins, Azure DevOps, CircleCI or any…

    167 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Tirith Standards

What does Tirith Standards do?

Generate a Tirith policy set for an existing Terraform or OpenTofu repository, covering organization standards such as required tags, naming conventions, allowed regions, permitted resource types…. Tirith Standards is an agent skill from StackGuardian/tirith. Generate a Tirith policy set for an existing Terraform or OpenTofu repository, covering organization standards such as required tags, naming conventions, allowed regions, permitted resource types, sizes and encryption defaults.

When should I use Tirith Standards?

Tirith Standards fits situations like: asked to add guardrails to a repository that has no policies yet; enforce a tagging; naming standard; codify a team convention.

How do I install Tirith Standards in Claude Code?

Run `npx skills add StackGuardian/tirith --skill tirith-standards -a claude-code`. Or copy the skill folder (.claude/skills/tirith-standards in StackGuardian/tirith) into .claude/skills/tirith-standards in your project. Claude Code loads it when a task matches its description.

How do I install Tirith Standards in Codex?

Run `npx skills add StackGuardian/tirith --skill tirith-standards -a codex`. Or copy the skill folder (.claude/skills/tirith-standards in StackGuardian/tirith) into .agents/skills/tirith-standards in your project. Codex loads it when a task matches its description.

Can I use Tirith Standards in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add StackGuardian/tirith --skill tirith-standards -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tirith-standards, .gemini/skills/tirith-standards, .github/skills/tirith-standards and .opencode/skills/tirith-standards in your project.

What does Tirith Standards need to run?

Going by SKILL.md and its folder, Tirith Standards needs the command-line tools its instructions call (terraform).

Does Tirith Standards access the network?

SKILL.md names 1 domain. In commands or code: stackguardian.github.io; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Tirith Standards safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tirith Standards use?

Tirith Standards is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tirith Standards use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tirith Standards?

Skills that share tags, products or a category with Tirith Standards: Terravision Cloud Diagrams (patrickchugh/terravision, 1.6k stars), Terrashark (LukasNiessen/terrashark, 715 stars), Provider Verification (mondoohq/mql, 411 stars) and Terraform Module Library (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tirith Standards?

StackGuardian (a GitHub organization) maintains it in StackGuardian/tirith, which has 167 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.

Source: StackGuardian/tirith on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.