/engsys-cdk:iac-cdkfrom engsys-cdk
AWS CDK discipline for any project where CDK is the active IaC tool — app/stack structure, constructs (L1/L2/L3), synth/diff/deploy flow, stack separation, context and environment config, asset bundling, and bootstrapping. Activate when working on CDK code (bin/ + lib/ TypeScript or app.py), cdk synth/diff/deploy, construct design, or diagnosing CDK/CloudFormation deploy failures.
Ships in engsys-cdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The operational discipline for AWS CDK as the active IaC tool. CDK synthesizes
CloudFormation, so it inherits CloudFormation's behavior. Pairs with the
cloud-architecture-aws pack (service-level detail) and the aws-deployment-preflight
skill (the pre-deploy gate). Project file layout and account/region facts come from
CLAUDE.md.
cdk synth output — the abstraction is convenient, not magic.cdk diff is the contract. Never deploy without reading the diff. It shows
resource changes and IAM/security changes (the --require-approval gate) — review
security deltas deliberately, never rubber-stamp.bin/<app>.ts # the App: instantiates stacks, sets env (account/region)
lib/
<x>-stack.ts # one stack per deployment unit / lifecycle boundary
constructs/ # reusable L3 constructs (your own abstractions)
cdk.json # app entry + context
Stack props (passing constructs) over brittle string exports/imports.env explicitly (account + region) on stacks — environment-agnostic stacks
silently use ambient credentials and can deploy to the wrong account.Cfn*) — raw CloudFormation, 1:1 with resources. Escape hatch for properties
L2 doesn't expose yet (addPropertyOverride). Verbose, no defaults.grantRead, etc.), and
helper methods. The default choice — prefer them; they encode best practice.grant* methods for IAM rather than hand-writing policies — least-privilege
by construction, and they wire the right principal.cdk synth # generate the template; fails on construct/TS errors first
cdk diff # the what-if: resource + IAM changes vs the deployed stack
cdk deploy <stack> # apply (CI: behind approval for prod)
cdk bootstrap creates the CDKToolkit stack
(asset bucket, ECR repo, deploy roles). A missing bootstrap is a common first-deploy
failure.RemovalPolicy.RETAIN
on precious resources; know that RETAIN-ed resources then block stack deletion until
cleared manually (see preflight).deploy '*', but explicit
ordering in CI is clearer).cdk.json context + cdk.context.json (cached lookups like AZs, AMIs, VPCs).
Cached context can go stale — cdk context --clear to refresh. Commit cdk.context.json
so synth is deterministic across machines/CI.tryGetContext reads. Keep env selection explicit (e.g. -c env=prod →
typed config object), not implicit.--platform for native deps) — bundle size
drives cold start (see cloud-architecture-aws). Docker is required for some bundling
modes.ROLLBACK_COMPLETE stack can't be updated — delete and recreate (cdk destroy then
deploy). Read the first failed CloudFormation event, not the rollback cascade.cdk diff won't show
console drift directly — use CloudFormation drift detection. No click-ops in prod.Before deploying, run the aws-deployment-preflight skill — it covers
cdk synth/cdk diff validation, stale/failed-stack cleanup (ROLLBACK_COMPLETE),
globally-unique naming (S3/ECR), and service-quota checks that the diff alone won't surface.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub eric-sabe/engsys --plugin engsys-cdk