{"id":"5a003b3c-2f1b-4a6f-97a5-506414366031","shortId":"Acn3Zs","kind":"skill","title":"cdk-patterns","tagline":"Common AWS CDK patterns and constructs for building cloud infrastructure with TypeScript, Python, or Java. Use when designing reusable CDK stacks and L3 constructs.","description":"You are an expert in AWS Cloud Development Kit (CDK) specializing in reusable patterns, L2/L3 constructs, and production-grade infrastructure stacks.\n\n## Use this skill when\n\n- Building reusable CDK constructs or patterns\n- Designing multi-stack CDK applications\n- Implementing common infrastructure patterns (API + Lambda + DynamoDB, ECS services, static sites)\n- Reviewing CDK code for best practices and anti-patterns\n\n## Do not use this skill when\n\n- The user needs raw CloudFormation templates without CDK\n- The task is Terraform-specific\n- Simple one-off CLI resource creation is sufficient\n\n## Instructions\n\n1. Identify the infrastructure pattern needed (e.g., serverless API, container service, data pipeline).\n2. Use L2 constructs over L1 (Cfn*) constructs whenever possible for safer defaults.\n3. Apply the principle of least privilege for all IAM roles and policies.\n4. Use `RemovalPolicy` and `Tags` appropriately for production readiness.\n5. Structure stacks for reusability: separate stateful (databases, buckets) from stateless (compute, APIs).\n6. Enable monitoring by default (CloudWatch alarms, X-Ray tracing).\n\n## Examples\n\n### Example 1: Serverless API Pattern\n\n```typescript\nimport { Construct } from \"constructs\";\nimport * as apigateway from \"aws-cdk-lib/aws-apigateway\";\nimport * as lambda from \"aws-cdk-lib/aws-lambda\";\nimport * as dynamodb from \"aws-cdk-lib/aws-dynamodb\";\n\nexport class ServerlessApiPattern extends Construct {\n  constructor(scope: Construct, id: string) {\n    super(scope, id);\n\n    const table = new dynamodb.Table(this, \"Table\", {\n      partitionKey: { name: \"pk\", type: dynamodb.AttributeType.STRING },\n      billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,\n      removalPolicy: cdk.RemovalPolicy.RETAIN,\n    });\n\n    const handler = new lambda.Function(this, \"Handler\", {\n      runtime: lambda.Runtime.NODEJS_20_X,\n      handler: \"index.handler\",\n      code: lambda.Code.fromAsset(\"lambda\"),\n      environment: { TABLE_NAME: table.tableName },\n      tracing: lambda.Tracing.ACTIVE,\n    });\n\n    table.grantReadWriteData(handler);\n\n    new apigateway.LambdaRestApi(this, \"Api\", { handler });\n  }\n}\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `cdk.Tags.of(this).add()` for consistent tagging\n- ✅ **Do:** Separate stateful and stateless resources into different stacks\n- ✅ **Do:** Use `cdk diff` before every deploy\n- ❌ **Don't:** Use L1 (`Cfn*`) constructs when L2 alternatives exist\n- ❌ **Don't:** Hardcode account IDs or regions — use `cdk.Aws.ACCOUNT_ID`\n\n## Troubleshooting\n\n**Problem:** Circular dependency between stacks\n**Solution:** Extract shared resources into a dedicated base stack and pass references via constructor props.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["cdk","patterns","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-cdk-patterns","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/cdk-patterns","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34882 github stars · SKILL.md body (2,997 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T12:50:44.486Z","embedding":null,"createdAt":"2026-04-18T21:34:08.637Z","updatedAt":"2026-04-24T12:50:44.486Z","lastSeenAt":"2026-04-24T12:50:44.486Z","tsv":"'/aws-apigateway':208 '/aws-dynamodb':226 '/aws-lambda':217 '1':117,191 '2':130 '20':265 '3':143 '4':156 '5':165 '6':178 'account':324 'add':291 'alarm':184 'altern':319 'anti':85 'anti-pattern':84 'api':70,125,177,193,283 'apigateway':202 'apigateway.lambdarestapi':281 'appli':144 'applic':65 'appropri':161 'ask':385 'aw':5,33,205,214,223 'aws-cdk-lib':204,213,222 'base':344 'best':81,285 'billingmod':251 'boundari':393 'bucket':173 'build':11,54 'cdk':2,6,23,37,56,64,78,100,206,215,224,306 'cdk-pattern':1 'cdk.aws.account':329 'cdk.removalpolicy.retain':256 'cdk.tags.of':289 'cfn':136,315 'circular':333 'clarif':387 'class':228 'clear':360 'cli':111 'cloud':12,34 'cloudform':97 'cloudwatch':183 'code':79,269 'common':4,67 'comput':176 'consist':293 'const':240,257 'construct':9,27,43,57,133,137,197,199,231,234,316 'constructor':232,350 'contain':126 'creation':113 'criteria':396 'data':128 'databas':172 'dedic':343 'default':142,182 'depend':334 'deploy':310 'describ':364 'design':21,60 'develop':35 'diff':307 'differ':302 'dynamodb':72,220 'dynamodb.attributetype.string':250 'dynamodb.billingmode.pay':252 'dynamodb.table':243 'e.g':123 'ec':73 'enabl':179 'environ':272,376 'environment-specif':375 'everi':309 'exampl':189,190 'exist':320 'expert':31,381 'export':227 'extend':230 'extract':338 'grade':47 'handler':258,262,267,279,284 'hardcod':323 'iam':152 'id':235,239,325,330 'identifi':118 'implement':66 'import':196,200,209,218 'index.handler':268 'infrastructur':13,48,68,120 'input':390 'instruct':116 'java':18 'kit':36 'l1':135,314 'l2':132,318 'l2/l3':42 'l3':26 'lambda':71,211,271 'lambda.code.fromasset':270 'lambda.function':260 'lambda.runtime.nodejs':264 'lambda.tracing.active':277 'least':148 'lib':207,216,225 'limit':352 'match':361 'miss':398 'monitor':180 'multi':62 'multi-stack':61 'name':247,274 'need':95,122 'new':242,259,280 'one':109 'one-off':108 'output':370 'partitionkey':246 'pass':347 'pattern':3,7,41,59,69,86,121,194 'per':253 'permiss':391 'pipelin':129 'pk':248 'polici':155 'possibl':139 'practic':82,286 'principl':146 'privileg':149 'problem':332 'product':46,163 'production-grad':45 'prop':351 'python':16 'raw':96 'ray':187 'readi':164 'refer':348 'region':327 'removalpolici':158,255 'request':254 'requir':389 'resourc':112,300,340 'reusabl':22,40,55,169 'review':77,382 'role':153 'runtim':263 'safer':141 'safeti':392 'scope':233,238,363 'separ':170,296 'serverless':124,192 'serverlessapipattern':229 'servic':74,127 'share':339 'simpl':107 'site':76 'skill':52,91,355 'skill-cdk-patterns' 'solut':337 'source-sickn33' 'special':38 'specif':106,377 'stack':24,49,63,167,303,336,345 'state':171,297 'stateless':175,299 'static':75 'stop':383 'string':236 'structur':166 'substitut':373 'success':395 'suffici':115 'super':237 'tabl':241,245,273 'table.grantreadwritedata':278 'table.tablename':275 'tag':160,294 'task':102,359 'templat':98 'terraform':105 'terraform-specif':104 'test':379 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'trace':188,276 'treat':368 'troubleshoot':331 'type':249 'typescript':15,195 'use':19,50,89,131,157,288,305,313,328,353 'user':94 'valid':378 'via':349 'whenev':138 'without':99 'x':186,266 'x-ray':185","prices":[{"id":"e7edb657-3215-4d84-9e05-60dece9992cf","listingId":"5a003b3c-2f1b-4a6f-97a5-506414366031","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:34:08.637Z"}],"sources":[{"listingId":"5a003b3c-2f1b-4a6f-97a5-506414366031","source":"github","sourceId":"sickn33/antigravity-awesome-skills/cdk-patterns","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/cdk-patterns","isPrimary":false,"firstSeenAt":"2026-04-18T21:34:08.637Z","lastSeenAt":"2026-04-24T12:50:44.486Z"}],"details":{"listingId":"5a003b3c-2f1b-4a6f-97a5-506414366031","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"cdk-patterns","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34882,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"b4252ff2f89a6fa4a400d99f703621d4abe806ed","skill_md_path":"skills/cdk-patterns/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/cdk-patterns"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"cdk-patterns","description":"Common AWS CDK patterns and constructs for building cloud infrastructure with TypeScript, Python, or Java. Use when designing reusable CDK stacks and L3 constructs."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/cdk-patterns"},"updatedAt":"2026-04-24T12:50:44.486Z"}}