Agent skill

Tirith Migrate

by StackGuardian in StackGuardian/tirith

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

Apache-2.0Auto-check passedDevOps & Cloud

Install Tirith Migrate

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

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

GitHub CLI
$ gh skill install StackGuardian/tirith tirith-migrate --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-migrate .claude/skills/tirith-migrate && 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-migrate
GitHub stars
167
Token cost
~1.7k tokens
SKILL.md length
818 words
Files
92
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Works in 6 steps: Inventory. List every source policy.… → Classify before translating. For each… → Translate exact and approximate. Carry… → …
  • Asked to migrate
  • SKILL.md covers Vocabulary comes from…, Per-source references, The protocol and Rules that hold for every source, plus 2 more sections
  • Reaches stackguardian.github.io

What it does

Tirith Migrate is an agent skill from StackGuardian/tirith. Translate existing policy-as-code into Tirith policies. HashiCorp Sentinel and Azure Policy today; Checkov, OPA/Rego and conftest are planned. Use when asked to migrate, convert, port or translate policies to Tirith, when a repository contains .sentinel files or a sentinel.hcl, when given an Azure Policy definition, initiative or assignment (a policyRule with if/then), or when asked what a Sentinel or Azure policy would look like in Tirith. Requires the tirith-policies skill for the target vocabulary.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 96 other files (for example `examples/azure-policy/README.md`, `examples/azure-policy/allowed-locations/notes.md` and `examples/azure-policy/allowed-locations/policy.json`).

It sits in DevOps & Cloud, covering Infrastructure as code. It works with Microsoft Azure, Terraform and Amazon Web Services. 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 migrate
  • Translate policies to Tirith
  • A repository contains .sentinel files
  • Given an Azure Policy definition

Example prompts

  • “/tirith-migrate”

Workflow steps

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

  1. Inventory. List every source policy. Read the policy-set manifest (sentinel.hcl, an
  2. Classify before translating. For each policy, name its pattern from the source reference
  3. Translate exact and approximate. Carry meta.name from the source policy name, put the
  4. Refuse not expressible in words. Write what the policy does, what Tirith cannot see, and
  5. Verify every translation against the source's own tests. Sentinel policies ship mocks under
  6. Hand back a report, one row per source policy: name, fidelity, Tirith file, and one line

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    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 Migrate loads about 1.7k tokens when it runs. Until then it costs about 130 tokens; SKILL.md has 818 words of instructions outside code blocks.

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

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). 818 words, ~1,651 tokens.

Download SKILL.mdSave it as .claude/skills/tirith-migrate/SKILL.md (or your agent's skills folder). This skill also uses 91 other files; get the full folder from GitHub.
name
tirith-migrate
description
Translate existing policy-as-code into Tirith policies. HashiCorp Sentinel and Azure Policy today; Checkov, OPA/Rego and conftest are planned. Use when asked to migrate, convert, port or translate policies to Tirith, when a repository contains .sentinel files or a sentinel.hcl, when given an Azure Policy definition, initiative or assignment (a policyRule with if/then), or when asked what a Sentinel or Azure policy would look like in Tirith. Requires the tirith-policies skill for the target vocabulary.

Migrate policies to Tirith

A migration is a projection from a larger language onto a smaller one. Sentinel and Rego are programs; a Tirith policy is JSON that names a provider, a value, and a condition. Most real policies fit. Some do not, and the failure mode is quiet: a translation that parses, looks right, and gates nothing. This skill exists to say which is which before any JSON is written.

Vocabulary comes from tirith-policies

Do not translate 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.

Per-source references

SourceReferenceStatus
HashiCorp Sentinelreference/sentinel.md, corpus in reference/sentinel-corpus.mdMeasured against 110 public policies
Azure Policyreference/azure-policy.md, corpus in reference/azure-policy-corpus.md713 built-ins classified; Terraform and ARM targets
CheckovPlanned
OPA / Rego, conftestPlanned

The protocol

  1. Inventory. List every source policy. Read the policy-set manifest (sentinel.hcl, an Azure initiative or assignment) for enforcement levels and parameter values. Note which policies are registered twice with different parameters; they translate once. For Azure, decide the target first: Terraform plan or ARM template.
  2. Classify before translating. For each policy, name its pattern from the source reference and assign a fidelity:
    • exact: a Tirith policy returns the same verdict on every plan.
    • approximate: expressible, but stricter or looser in a case you can name.
    • not expressible: needs something Tirith lacks. Name it, and link the tracking issue.
  3. Translate exact and approximate. Carry meta.name from the source policy name, put the Sentinel enforcement level in meta.enforcement, and map every param to {{ var.NAME }}. If an approximation drops the test a param fed, do not ship an unread variables.json: name the orphaned parameter in the notes and in the report row.
  4. Refuse not expressible in words. Write what the policy does, what Tirith cannot see, and the issue that would change that. Do not write a policy that checks something adjacent.
  5. Verify every translation against the source's own tests. Sentinel policies ship mocks under test/<policy>/. Transcribe the failing mock into should-fail.json and the passing one into should-pass.json (the mocks already have the resource_changes shape). Run both:
    bash
    tirith -policy-path policy.json -input-path should-fail.json --fail-on-error; echo $?   # 3
    tirith -policy-path policy.json -input-path should-pass.json --fail-on-error; echo $?   # 0
    For an approximate translation, also write diverges.json: a plan where the source and the translation disagree. The reviewer needs to see the divergence, not read about it.
  6. Hand back a report, one row per source policy: name, fidelity, Tirith file, and one line on what changed. Fidelity is the column the reader looks at first.
Show full SKILL.md (391 more words)Show less

Rules that hold for every source

  • A Tirith evaluator yields one result per matching resource and fails if any fails. That is the universal quantifier. There is no existential: "at least one resource satisfies X" does not map.
  • eval_expression combines evaluator verdicts, each already collapsed across all resources. It cannot bind two tests to the same resource or the same nested block. "Where type is ingress, cidr must not be open" becomes "no block may have cidr open", which is stricter. Say so.
  • attribute reads change.after only. Anything about the previous value, a destroyed resource, or a value unknown until apply is invisible.
  • Configuration is not the plan. Module sources, variables, outputs, provisioners and expression references live in tfconfig; Tirith reads none of them.
  • A resource skipped through error_tolerance does not touch the verdict of the others: an evaluator fails if any resource fails, passes if none fail and at least one was evaluated, and is skipped only when every resource was tolerated away. Test with mixed plans anyway; that is where a scope difference shows.

Before you hand it back

  1. Did every policy get a fidelity before it got JSON?
  2. Does every approximate row name the case where verdicts differ, and ship diverges.json?
  3. Does every not expressible row link a Tirith issue or say "not tracked"?
  4. Did every translated policy exit 3 on should-fail.json and 0 on should-pass.json?
  5. Is every param a {{ var.NAME }} with a variables.json beside the policy, or named as orphaned in the report?
  6. Is every condition type and argument key taken from schema.md, not recalled?

Worked examples

examples/azure-policy/ holds eight Azure built-ins, the ones a customer assigns first, each with the verbatim definition, the Tirith policy for a Terraform plan (one also for an ARM template), and the plans that prove it. examples/azure-policy/README.md is the index.

examples/sentinel/ holds five translations from the idioms of HashiCorp's public policy libraries, each with its Sentinel source, the Tirith policy, and the plans that prove it:

ExampleFidelityShows
restrict-instance-typeexactfilter_attribute_not_in_list to ContainedIn; param to -var
mandatory-tagsexactTag keys via Contains on the map; one evaluator per key and type
prevent-database-destroyexactaction emits one result per action; NotEquals "delete" catches deletes and replacements
restrict-ssh-ingressapproximateThe per-block conjunction collapses to a stricter rule
require-private-registry-modulesnot expressibleA tfconfig policy, refused in words

© 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 91 other files in .claude/skills/tirith-migrate of StackGuardian/tirith.

  • SKILL.md
  • examples/azure-policy/README.md
  • examples/azure-policy/allowed-locations/notes.md
  • examples/azure-policy/allowed-locations/policy.json
  • examples/azure-policy/allowed-locations/should-fail.json
  • examples/azure-policy/allowed-locations/should-pass.json
  • examples/azure-policy/allowed-locations/source.json
  • examples/azure-policy/allowed-locations/variables.json
  • examples/azure-policy/allowed-resource-types/notes.md
  • examples/azure-policy/allowed-resource-types/policy.json
  • examples/azure-policy/allowed-resource-types/should-fail.json
  • examples/azure-policy/allowed-resource-types/should-pass.json
  • examples/azure-policy/allowed-resource-types/source.json
  • examples/azure-policy/allowed-vm-skus/notes.md
  • examples/azure-policy/allowed-vm-skus/policy.json
  • examples/azure-policy/allowed-vm-skus/should-fail.json
  • … and 76 more

Open the folder on GitHubat commit 4a3411e

Compare with similar skills

Tirith Migrate 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 Migrate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tirith Migrate this skillStackGuardian/tirith167—~1.7kAutomated 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 yesterday
    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 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
  • Tirith Standards

    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…

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

Categories

Questions about Tirith Migrate

What does Tirith Migrate do?

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

When should I use Tirith Migrate?

Tirith Migrate fits situations like: asked to migrate; translate policies to Tirith; A repository contains .sentinel files; given an Azure Policy definition.

How do I install Tirith Migrate in Claude Code?

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

How do I install Tirith Migrate in Codex?

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

Can I use Tirith Migrate 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-migrate -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-migrate, .gemini/skills/tirith-migrate, .github/skills/tirith-migrate and .opencode/skills/tirith-migrate in your project.

What does Tirith Migrate need to run?

SKILL.md names no scripts, command-line tools or credentials: Tirith Migrate is instructions for the agent only.

Does Tirith Migrate 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 Migrate 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 Migrate use?

Tirith Migrate 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 Migrate use?

About 1.7k tokens (SKILL.md is roughly 6.6k 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 Migrate?

Skills that share tags, products or a category with Tirith Migrate: 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 Migrate?

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.