Keep Terraform and CDK infrastructure in sync. An agent skill from agentic-community/mcp-gateway-registry.

Apache-2.0Auto-check passedDevOps & Cloud

Install Infra Sync

skills CLI
$ npx skills add agentic-community/mcp-gateway-registry --skill infra-sync -a claude-code

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

GitHub CLI
$ gh skill install agentic-community/mcp-gateway-registry infra-sync --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/agentic-community/mcp-gateway-registry.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/infra-sync .claude/skills/infra-sync && 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
infra-sync
GitHub stars
962
Token cost
~2.7k tokens
SKILL.md length
912 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Keep Terraform and CDK infrastructure in sync. An agent skill from agentic-community/mcp-gateway-registry.

  • Works in 5 steps: Identify the Source of Truth → Read Both Configurations → Compare Resource by Resource → …
  • Changes are made to either Terraform
  • SKILL.md covers When to Use, Input Modes, Workflow and Comparison Details by Area, plus 2 more sections
  • Calls terraform and npx

What it does

Infra Sync is an agent skill from agentic-community/mcp-gateway-registry. Keep Terraform and CDK infrastructure in sync. Compares terraform/aws-ecs/ and infra/ to identify discrepancies in ECS services, networking, storage, secrets, IAM, and configuration. Reports parity gaps and generates fixes for the target IaC tool. Use when changes are made to either Terraform or CDK infrastructure.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Infrastructure as code. It works with Terraform, Amazon Web Services and Model Context Protocol. The repository describes itself as: Enterprise-ready MCP Gateway & Registry that centralizes AI development tools with secure OAuth authentication, dynamic tool discovery, and unified access for both autonomous AI… The licence is Apache-2.0.

When your agent uses it

  • Changes are made to either Terraform
  • CDK infrastructure

Example prompts

  • “/infra-sync”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Identify the Source of Truth
  2. Read Both Configurations
  3. Compare Resource by Resource
  4. Generate Parity Report
  5. Apply Fixes

What it can do on your machine

Read from SKILL.md and the folder at commit ec3a197. 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
    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    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

Infra Sync loads about 2.7k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 912 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 agentic-community/mcp-gateway-registry at commit ec3a197, republished under its Apache-2.0 licence (© agentic-community). 912 words, ~2,702 tokens.

Download SKILL.mdSave it as .claude/skills/infra-sync/SKILL.md (or your agent's skills folder).
name
infra-sync
description
Keep Terraform and CDK infrastructure in sync. Compares terraform/aws-ecs/ and infra/ to identify discrepancies in ECS services, networking, storage, secrets, IAM, and configuration. Reports parity gaps and generates fixes for the target IaC tool. Use when changes are made to either Terraform or CDK infrastructure.
license
Apache-2.0
metadata.author
mcp-gateway-registry
metadata.version
1.0

Infrastructure Sync Skill

Use this skill when changes are made to either the Terraform (terraform/aws-ecs/) or CDK (infra/) infrastructure and the other needs to be updated to maintain parity.

When to Use

  • After modifying Terraform files in terraform/aws-ecs/
  • After modifying CDK files in infra/lib/registry/
  • When asked to check if Terraform and CDK are in sync
  • Before deploying to verify both IaC tools produce equivalent infrastructure

Input Modes

  1. Full Sync Check - Compare all resources across both IaC tools
  2. Targeted Sync - Compare a specific area (e.g., "sync ECS services" or "sync networking")
  3. Propagate Change - User made changes to one tool and wants the other updated

Workflow

Step 1: Identify the Source of Truth

Ask the user (or determine from context):

  • Which IaC tool was just modified? (Terraform or CDK)
  • Is this a full sync check or targeted to a specific area?
Step 2: Read Both Configurations

Read the relevant files from both Terraform and CDK based on the comparison area.

File Mapping (Terraform to CDK)
Comparison AreaTerraform FilesCDK Files
ECS Servicesterraform/aws-ecs/modules/mcp-gateway/ecs-services.tfinfra/lib/registry/registry-service-stack.ts
Networkingterraform/aws-ecs/modules/mcp-gateway/networking.tf, terraform/aws-ecs/vpc.tfinfra/lib/registry/registry-network-stack.ts, infra/lib/registry/registry-service-stack.ts (ALB section)
Storage (EFS)terraform/aws-ecs/modules/mcp-gateway/storage.tfinfra/lib/registry/registry-service-stack.ts (EFS section)
Storage (DocumentDB)terraform/aws-ecs/documentdb.tfinfra/lib/registry/registry-data-stack.ts, infra/lib/registry/constructs/documentdb-cluster.ts
Secretsterraform/aws-ecs/modules/mcp-gateway/secrets.tfinfra/lib/registry/registry-service-stack.ts (secrets section)
IAMterraform/aws-ecs/modules/mcp-gateway/iam.tfinfra/lib/registry/constructs/registry-ecs-service.ts (task roles)
Keycloakterraform/aws-ecs/keycloak-ecs.tf, terraform/aws-ecs/keycloak-*.tfinfra/lib/registry/registry-auth-stack.ts, infra/lib/registry/constructs/keycloak-service.ts
Observabilityterraform/aws-ecs/modules/mcp-gateway/observability.tfinfra/lib/registry/constructs/observability-pipeline.ts
CloudFront/WAFterraform/aws-ecs/cloudfront.tf, terraform/aws-ecs/waf.tfinfra/lib/registry/registry-cdn-stack.ts, infra/lib/registry/constructs/cloudfront-distribution.ts, infra/lib/registry/constructs/waf-rules.ts
Secret Rotationterraform/aws-ecs/secret-rotation.tfinfra/lib/registry/registry-ops-stack.ts, infra/lib/registry/constructs/secret-rotation.ts
CI/CDterraform/aws-ecs/codebuild.tfinfra/lib/registry/registry-build-stack.ts, infra/lib/registry/constructs/codebuild-pipeline.ts
Variables/Configterraform/aws-ecs/variables.tf, terraform/aws-ecs/modules/mcp-gateway/variables.tfinfra/lib/registry/registry-config.ts, infra/config.yaml
Monitoringterraform/aws-ecs/cloudwatch-alarms.tf, terraform/aws-ecs/modules/mcp-gateway/monitoring.tfinfra/lib/registry/registry-service-stack.ts (monitoring section)
Step 3: Compare Resource by Resource

For each comparison area, check the following attributes:

ECS Services Comparison Checklist

For each service (registry, auth-server, MCP servers, A2A agents):

  • Container image - Same ECR repository and tag
  • CPU/Memory - Same task definition resources
  • Port mappings - Same container ports
  • Environment variables - Same env vars passed to container
    • Check every env var key and value source
    • Flag any env var present in one but not the other
  • Secrets - Same Secrets Manager references
    • Check JSON key extraction syntax (:username::, :password::)
  • EFS mounts - Same volume mounts (or both empty)
  • Health check - Same endpoint, interval, timeout
  • Service Connect - Same discovery name and port
  • Auto-scaling - Same min/max/target values
  • Circuit breaker - Document if only in one (CDK has it, Terraform may not)
  • Replicas - Same desired count
Networking Comparison Checklist
  • VPC - Same CIDR, AZ count, subnet layout
  • ALB - Same scheme, listeners, target groups
  • Security groups - Same ingress/egress rules
  • Service Discovery - Same namespace name, service names
  • VPC Endpoints - Same endpoint types
Storage Comparison Checklist
  • EFS access points - Same paths, POSIX user/group, permissions
  • EFS mount targets - Same subnet placement
  • DocumentDB - Same engine, instance class, encryption, auth
  • Aurora MySQL - Same engine, scaling, encryption
Secrets Comparison Checklist
  • Secret names - Same set of secrets created
  • KMS encryption - Same key configuration
  • Conditional creation - Same conditions for optional secrets
  • Rotation - Same rotation schedule and Lambda config
Step 4: Generate Parity Report

Present findings in this format:

markdown
## Infrastructure Parity Report

**Date:** {date}
**Source of Truth:** {Terraform|CDK}
**Scope:** {Full|Targeted area}

### Summary

| Area | Status | Discrepancies |
|------|--------|---------------|
| ECS Services | {In Sync / Diverged} | {count} |
| Networking | {In Sync / Diverged} | {count} |
| Storage | {In Sync / Diverged} | {count} |
| Secrets | {In Sync / Diverged} | {count} |
| IAM | {In Sync / Diverged} | {count} |
| Observability | {In Sync / Diverged} | {count} |

### Discrepancies

#### {Area}: {Description}

| Attribute | Terraform | CDK | Action Required |
|-----------|-----------|-----|-----------------|
| {attr} | {tf value} | {cdk value} | {Fix in TF / Fix in CDK / Intentional} |

### Intentional Differences

These differences are by design and should NOT be synced:

| Feature | CDK | Terraform | Rationale |
|---------|-----|-----------|-----------|
| Circuit Breaker | Enabled | Not configured | Faster failure detection (~4 min vs ~3 hours) |
| HOME=/tmp | Set on registry | Not set | Fixes Path.home() PermissionError in container |
| DocumentDB credentials | Always passed when cluster exists | Gated on storage_backend | Skills repository always uses DocumentDB |
| Keycloak URL fallback | Falls back to http://{alb-dns} | Always https:// | Deployment without Route53/certs |

### Recommendations

1. **Must Fix:** {Critical parity gaps}
2. **Should Fix:** {Important but non-breaking gaps}
3. **Consider:** {Nice-to-have improvements}
Step 5: Apply Fixes

If the user wants fixes applied:

  1. Determine the target (Terraform or CDK)
  2. Make the edits to bring the target in sync
  3. For CDK changes: run cd infra && npx tsc --noEmit to verify TypeScript compiles
  4. For Terraform changes: run cd terraform/aws-ecs && terraform validate if available
  5. Present a summary of all changes made

Comparison Details by Area

Show full SKILL.md (383 more words)Show less
ECS Services - Environment Variables Deep Comparison

This is the most common source of drift. For each ECS service, extract and compare every environment variable:

Terraform location: Look for environment = [{ name = "...", value = "..." }] blocks in ecs-services.tf

CDK location: Look for environment: { KEY: "value" } objects in registry-service-stack.ts

Compare line by line. Pay special attention to:

  • Variables that reference other resources (ALB DNS, Keycloak URL, DocumentDB endpoint)
  • Variables with conditional logic (only set when a feature is enabled)
  • Variables that use Secrets Manager references vs plain environment variables
ECS Services - Secrets Deep Comparison

Terraform: Look for secrets = [{ name = "...", valueFrom = "..." }] blocks CDK: Look for secrets: { KEY: ecs.Secret.fromSecretsManager(...) } objects

Compare the JSON key extraction syntax carefully:

  • Terraform: "${aws_secretsmanager_secret.x.arn}:username::"
  • CDK: ecs.Secret.fromSecretsManager(secret, 'username')
EFS Mounts Deep Comparison

Terraform: Check mount_points and volume blocks in each service definition CDK: Check efsVolumes property in RegistryEcsService constructor calls

Important: The registry service should have NO EFS mounts in both tools. Only auth-server and specific MCP servers mount EFS.

ALB Listeners and Target Groups

Terraform: Check aws_lb_listener and aws_lb_target_group resources in networking.tf CDK: Check listener and target group creation in registry-service-stack.ts

Compare:

  • Listener ports and protocols
  • Target group health check paths, intervals, and thresholds
  • Deregistration delay
  • Stickiness settings

Known Intentional Differences

Maintain this list of differences that should NOT trigger sync warnings:

  1. Circuit Breaker - CDK enables circuitBreaker: { enable: true, rollback: true } on ECS services. Terraform does not. This is intentional for faster failure detection.

  2. HOME=/tmp - CDK sets HOME=/tmp on the registry container. Terraform does not. This fixes a Path.home() PermissionError that occurs when the container runs as a non-root user without a home directory.

  3. DocumentDB Credential Passing - CDK passes DocumentDB credentials whenever dataStack.documentDbSecretArn exists. Terraform gates on var.storage_backend == "documentdb". CDK's approach is correct because the skills repository always uses DocumentDB regardless of the storage backend setting.

  4. Keycloak URL Fallback - CDK falls back to http://{alb-dns-name} when Route53 is disabled. Terraform always uses https://. CDK's approach allows deployment without DNS/certificates.

Tips

  • When comparing environment variables, sort them alphabetically for easier visual comparison
  • Use grep -n "ENV_VAR_NAME" to quickly find where a variable is defined in both codebases
  • After making changes to CDK, always run cd infra && npx tsc --noEmit to verify compilation
  • After making changes to Terraform, run terraform fmt and terraform validate
  • Check infra/docs/CDK-INFRASTRUCTURE.md for the latest CDK documentation and parity notes

© agentic-community, 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

Just SKILL.md in .claude/skills/infra-sync of agentic-community/mcp-gateway-registry.

Open the folder on GitHubat commit ec3a197

Compare with similar skills

Infra Sync 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.

Infra Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Infra Sync this skillagentic-community/mcp-gateway-registry962—~2.7kAutomated safety check: PassApache-2.0
Terravision Cloud Diagramspatrickchugh/terravision1.6k—~5.6kAutomated safety check: NotesAGPL-3.0-only
Eks Best Practicesaws-samples/appmod-blueprints113—~5kAutomated safety check: PassMIT-0
AWS Sst Developmentzxkane/aws-skills367—~2.7kAutomated safety check: WarnMIT
AWS Cdk Developmentzxkane/aws-skills3672 repos~2.5kAutomated safety check: PassMIT
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2596 repos~1.1kAutomated safety check: NotesCustom licence

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
  • Eks Best Practices

    aws-samples/appmod-blueprints

    Official

    Advisory guidance for Amazon EKS architecture and configuration decisions — compute strategy, networking, security, reliability, cost, autoscaling, observability, multi-tenancy, and upgrade planning.

    113 GitHub stars~5k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • AWS Sst Development

    zxkane/aws-skills

    SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework.

    367 GitHub stars~2.7k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check: warnings
  • AWS Cdk Development

    zxkane/aws-skills

    AWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python.

    367 GitHub starsUsed in 2 repos~2.5k tokens
    DevOps & CloudAuto-check passed
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    259 GitHub starsUsed in 6 repos~1.1k tokens
    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

More from agentic-community/mcp-gateway-registry

All 17 skills in this repo
  • Explainer

    agentic-community/mcp-gateway-registry

    Explain a GitHub issue or pull request at 100, 200, and 300 level.

    962 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed
  • Debug

    agentic-community/mcp-gateway-registry

    Debug issues in the MCP Gateway Registry using first-principles thinking.

    962 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • Search Benchmark

    agentic-community/mcp-gateway-registry

    Generate a search quality benchmark for the AI Registry. An agent skill from agentic-community/mcp-gateway-registry.

    962 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Writing

    agentic-community/mcp-gateway-registry

    Write prose people will actually read. An agent skill from agentic-community/mcp-gateway-registry.

    962 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Agentcore Register

    agentic-community/mcp-gateway-registry

    Given an MCP server URL, probe the server via curl to discover its metadata and tools, then generate a markdown file with copy-pasteable content for each field in the Amazon Bedrock AgentCore…

    962 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Benchmark Report

    agentic-community/mcp-gateway-registry

    Generate a benchmark report from stress test results (registration, API performance, search concurrency).

    962 GitHub stars~590 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Infra Sync

What does Infra Sync do?

Keep Terraform and CDK infrastructure in sync. An agent skill from agentic-community/mcp-gateway-registry. Infra Sync is an agent skill from agentic-community/mcp-gateway-registry. Keep Terraform and CDK infrastructure in sync.

When should I use Infra Sync?

Infra Sync fits situations like: changes are made to either Terraform; CDK infrastructure.

How do I install Infra Sync in Claude Code?

Run `npx skills add agentic-community/mcp-gateway-registry --skill infra-sync -a claude-code`. Or copy the skill folder (.claude/skills/infra-sync in agentic-community/mcp-gateway-registry) into .claude/skills/infra-sync in your project. Claude Code loads it when a task matches its description.

How do I install Infra Sync in Codex?

Run `npx skills add agentic-community/mcp-gateway-registry --skill infra-sync -a codex`. Or copy the skill folder (.claude/skills/infra-sync in agentic-community/mcp-gateway-registry) into .agents/skills/infra-sync in your project. Codex loads it when a task matches its description.

Can I use Infra Sync 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 agentic-community/mcp-gateway-registry --skill infra-sync -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/infra-sync, .gemini/skills/infra-sync, .github/skills/infra-sync and .opencode/skills/infra-sync in your project.

What does Infra Sync need to run?

Going by SKILL.md and its folder, Infra Sync needs the command-line tools its instructions call (terraform and npx). Our summary lists: Node.js.

Does Infra Sync access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Infra Sync 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 Infra Sync use?

Infra Sync is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Infra Sync use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Infra Sync?

Skills that share tags, products or a category with Infra Sync: Terravision Cloud Diagrams (patrickchugh/terravision, 1.6k stars), Eks Best Practices (aws-samples/appmod-blueprints, 113 stars), AWS Sst Development (zxkane/aws-skills, 367 stars) and AWS Cdk Development (zxkane/aws-skills, 367 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Infra Sync?

agentic-community (a GitHub organization) maintains it in agentic-community/mcp-gateway-registry, which has 962 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 6, 2026.

Source: agentic-community/mcp-gateway-registry on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.