infrastructure-state-analysis

Analyze deployed CDK and CloudFormation state to prevent design errors.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/cajias/claude-skills --skill infrastructure-state-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: infrastructure-state-analysis
Source: https://github.com/cajias/claude-skills/tree/main/skills/infrastructure-state-analysis
Command: npx skills add https://github.com/cajias/claude-skills --skill infrastructure-state-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents costly architectural errors in CDK and CloudFormation work by forcing an upfront review of deployed state, stack relationships, and synth behavior before implementation begins.

Core Features & Use Cases

  • CloudFormation state inspection: Reviews existing stacks, exports, and imports to uncover hidden dependencies.
  • SSM and lookup validation: Checks parameter existence and ensures lookups happen at Stack scope instead of App scope.
  • CDK synth and diff safety checks: Validates synth output, detects circular dependencies, and flags destructive changes before the RED phase.
  • Use case: Before modifying a stack that shares exports with other services, use this Skill to map consumers, verify parameters, and confirm the design matches the code.

Quick Start

Ask the AI to perform infrastructure state analysis for your CDK or CloudFormation change, including stack inventory, export and import review, SSM parameter checks, and a synth/diff validation before implementation.

Frequently Asked Questions about infrastructure-state-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check CloudFormation cross-stack dependencies before modifying CDK exports?

To verify SSM parameter lookups in CDK, you must ensure lookups happen at the Stack scope instead of the App scope. This parameter validation checks SSM path existence and prevents scope-related synth errors during infrastructure deployment.

What is the best way to validate CDK synth output and detect destructive changes?

Performing infrastructure state analysis before stack changes requires reviewing deployed CloudFormation state, SSM parameter paths, and synth behavior. You must conduct stack inventory checks, export and import review, and cross-stack dependency mapping to ensure safe deployment.

Why does my CDK synth fail with circular dependencies across stacks?

CDK synth fails with circular dependencies when cross-stack references create loops between stacks. Infrastructure state analysis detects these circular dependencies during synth validation by reviewing CloudFormation exports, imports, and stack relationships before deployment.

Do I need to audit CloudFormation stack inventory before migrating exports and imports?

You need to audit CloudFormation stack inventory before migrating exports and imports to identify hidden dependencies. Infrastructure state analysis maps existing stack relationships and verifies SSM parameters to prevent architectural errors during migration.