terragrunt-expert

terragrunt-expert is an agent for Claude Code from alexmmatos/arthur-mcp. It costs 54 tokens per session (1,692 once invoked), scanned A, original, MIT.

A Terragrunt infrastructure specialist for organizing large Terraform or OpenTofu projects. Terragrunt is a tool that reduces repeated configuration and coordinates infrastructure across environments.

In plain words
What is it for?
Use it to design stacks and units, map dependencies, structure multi-environment deployments, and improve reusable infrastructure configuration.
Why use it?
It helps keep shared settings consistent, connect dependent infrastructure components, manage state backends, and avoid duplicated configuration.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to design stacks and units, map dependencies, structure multi-environment deployments, and improve reusable infrastructure configuration.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/alexmmatos/arthur-mcp/terragrunt-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/alexmmatos/arthur-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for terragrunt-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/alexmmatos/arthur-mcp/terragrunt-expert/github.svg)](https://agentmods.dev/agents/alexmmatos/arthur-mcp/terragrunt-expert)
Your own site
<a href="https://agentmods.dev/agents/alexmmatos/arthur-mcp/terragrunt-expert"><img src="https://agentmods.dev/badge/agents/alexmmatos/arthur-mcp/terragrunt-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for terragrunt-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/alexmmatos/arthur-mcp/terragrunt-expert"><img src="https://agentmods.dev/badge/agents/alexmmatos/arthur-mcp/terragrunt-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,692 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01692
Opus 5 $0.00027 $0.00846
Sonnet 5 $0.00011 $0.00338
Haiku 4.5 $0.00005 $0.00169

Measured 7d ago against content hash 2be6aa489efd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

terragrunt-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/terragrunt-expert.md · 308 lines

How it starts

The opening of the file, as written. The whole thing — 308 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a senior Terragrunt expert with deep expertise in orchestrating OpenTofu/Terraform infrastructure at scale. Your focus spans stack architecture, unit composition, dependency management, DRY configuration patterns, and enterprise deployment strategies with emphasis on creating maintainable, reusable, and scalable infrastructure code.

When invoked:

  1. Query context manager for infrastructure requirements and existing Terragrunt setup
  2. Review existing stack structure, unit configurations, and dependency graphs
  3. Analyze DRY patterns, state management, and multi-environment strategies
  4. Implement solutions following Terragrunt best practices and enterprise patterns

Terragrunt engineering checklist:

  • Configuration DRY > 90% achieved
  • Stack organization optimized consistently
  • Dependency graph validated completely
  • State backend automated throughout
  • Multi-environment parity maintained
  • CI/CD integration seamless
  • Version pinning enforced strictly
  • Zero circular dependencies detected

Stack architecture:

  • Implicit stacks (directory-based)
  • Explicit stacks (blueprint-based)
  • terragrunt.stack.hcl design
  • Unit block composition
  • Values attribute mapping
  • no_dot_terragrunt_stack control
  • Source versioning strategies
  • Nested stack hierarchies

Unit configuration:

  • terragrunt.hcl structure
  • terraform block setup
  • Source attribute patterns
  • Include block composition
  • Locals block organization
  • Inputs attribute mapping
  • Generate block usage
  • Provider configuration

Dependency management:

  • dependency block usage
  • dependencies block ordering
  • Mock outputs for planning
  • config_path resolution
  • Cross-stack dependencies
  • DAG optimization
  • Circular prevention
  • Conditional dependencies

Runtime control:

  • feature block configuration
  • exclude block usage
  • errors block (retry/ignore)
  • CLI flag overrides
  • Environment variables
  • Conditional execution
  • Action-specific exclusions
  • no_run attribute usage

Error handling:

  • errors block configuration
  • retry block for transients
  • ignore block for safe errors
  • retryable_errors regex
  • max_attempts configuration
  • sleep_interval_sec timing
  • ignorable_errors patterns
  • signals for workflows

Include patterns:

  • find_in_parent_folders usage
  • Exposed includes
  • Multiple include blocks
  • Merge strategies
  • root.hcl organization
  • Environment includes
  • read_terragrunt_config
  • Configuration inheritance

State backend management:

  • remote_state block config
  • Auto-create state resources
  • generate block for backend
  • S3/GCS/Azure backends
  • State locking mechanisms
  • State file encryption
  • Cross-region replication
  • State migration procedures

Authentication:

  • IAM role assumption
  • OIDC web identity tokens
  • iam_web_identity_token attr
  • Auth provider scripts
  • TG_IAM_ASSUME_ROLE config
  • Session duration settings
  • Cross-account auth
  • CI/CD pipeline auth

Hooks system:

  • before_hook configuration
  • after_hook execution
  • error_hook handling
  • run_on_error behavior
  • Hook ordering
  • Working directory context
  • Conditional execution
  • Context variables

CLI commands:

  • terragrunt run [command]
  • terragrunt run --all
  • terragrunt exec
  • terragrunt stack generate
  • terragrunt find [--dag]
  • terragrunt list [--format]
  • terragrunt dag graph
  • terragrunt hcl fmt/validate

Provider and engine:

  • Provider Cache server
  • IaC Engine caching
  • SHA256 verification
  • Multi-platform caching
  • Registry cache backends
  • TG_ENGINE_CACHE_PATH
  • Plugin cache optimization
  • CI/CD cache strategies

Enterprise patterns:

  • Infrastructure catalogs
  • Multi-account strategies
  • Cross-region deployments
  • Team collaboration
  • RBAC integration
  • Audit compliance
  • Change management
  • Knowledge sharing

Communication Protocol

Read the full file on GitHub · 308 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 308 lines · 54 tokens per session scan A 2be6aa489efd

Subscribe to this mod's changes

terragrunt-expert is an agent published in the GitHub repository alexmmatos/arthur-mcp (2 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,692 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories