aws-cdk-cloudformation-design
Skill2 starsChanged 2 months agoMITView on GitHub
AWS CDKまたはCloudFormationによるシステム設計・実装・レビューで、設定境界、命名、固定セキュリティ基準、更新・削除時の安全性を整理する。AWS以外の設計や単純なAWS CLI操作には使用しない。
In this repository14 other files it gives its agents.
- aws-cli-operationsSkill
- aws-cost-auditSkill
- aws-drawio-architectureSkill
- cognitive-rhythm-writingSkill
- de-ai-uiSkill
- gcloud-cli-operationsSkill
- generate-docsSkill
- git-daily-operationsSkill
- internal-doc-authoringSkill
- japanese-tech-writingSkill
- pleasanter-script-deploySkill
- prepare-public-release-docsSkill
- system-deploy-checkSkill
- system-designSkill
The file
Files
AWS CDK / CloudFormation Design
AWS CDKとCloudFormationを、単なるリソース作成コードではなく、設定・識別子・ライフサイクルを管理する契約として扱う。
参照する資料
- AWS CDKまたはCloudFormationを扱うときは、必ず固定ベースラインを読む。
- リソース名、名前空間、Construct ID、Stack名、configからの名前生成を設計・変更するときは、命名と識別子を読む。
- 既存Stackの更新、リファクタリング、置換、削除、再デプロイ、ドリフト対応を扱うときは、変更と削除の安全性を読む。
必要な参照だけを読み、同じ規約をプロジェクト文書へ複製しない。プロジェクト固有の値はconfigまたはそのプロジェクトの設計書で管理する。
設計の進め方
- 現在のCDKコード、合成テンプレート、デプロイconfig、既存Stackを確認する。
- 値を「利用者が設定する値」「CDKが導出する値」「CloudFormation/CDKが生成する値」「CDK管理外の事前作業」に分ける。
- 固定ベースラインとの差を洗い出し、差が必要なら理由、影響、確認方法を記録する。
- Statefulリソース、公開URL、認証、外部参照について、更新・置換・削除時の挙動を明示する。
- synthとテストで構造を確認し、既存環境への変更ではdiffで置換・削除・IAM拡張を確認する。
- デプロイが依頼範囲に含まれる場合だけ反映し、Stack Outputと実リソースを確認する。
設定境界
- 同じ意味の値をconfig、CDK、Runtime、フロントエンドへ重複して持たせない。変換は一か所に集約し、生成結果を参照またはOutputで渡す。
- 未知のconfigキー、無効値、回復不能な競合は、原因が分かる形で停止する。固定値への暗黙的な置換や勝手な別名での再試行をしない。
- Secret本文、パスワード、アクセストークンをCDK context、CloudFormation Parametersの既定値、Output、静的配信物へ入れない。Secrets Manager等の参照名またはARNだけを扱う。
- アカウントID、リソースID、実ドメインなどの環境固有値をサンプルや共通スキルへ固定しない。
- モデル契約、外部IdP登録、既存証明書、既存Hosted Zoneなど、CloudFormationが安全に所有できない事前作業を明示する。IaC管理外であることは、未管理のまま放置することを意味しない。
成果物
設計またはレビューでは、少なくとも次を判断できる形にする。
- config項目と導出値の対応
- CDK管理内・管理外の境界
- 固定ベースラインとの差分
- 物理名を固定する対象と、CDK生成名へ任せる対象
- 更新で置換される可能性があるリソースとデータ影響
- デプロイ前の手動作業、diff確認点、デプロイ後の検証点
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

