Install any skill in seconds. Free to start, no credit card required.
Get Started Free →AWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python. Use when creating CDK stacks, defining CDK constructs, implementing infrastructure as code, or when the user mentions CDK, CloudFormation, IaC, cdk synth, cdk deploy, or wants to define AWS infrastructure programmatically. Covers CDK app structure, construct patterns, stack composition, and deployment workflows.
.claude/skills/microck-aws-cdk-development/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 226% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 67% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 67% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 191% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 49% | 0% |
This skill provides comprehensive guidance for developing AWS infrastructure using the Cloud Development Kit (CDK), with integrated MCP servers for accessing latest AWS knowledge and CDK utilities.
This skill includes two MCP servers automatically configured with the plugin:
When to use: Always verify AWS service information before implementation
Critical: Use this server whenever AWS service features, configurations, or availability need verification.
When to use: For CDK-specific guidance and utilities
Important: Leverage this server for CDK construct guidance and advanced CDK operations.
Use this skill when:
CRITICAL: Do NOT explicitly specify resource names when they are optional in CDK constructs.
Why: CDK-generated names enable:
Pattern: Let CDK generate unique names automatically using CloudFormation's naming mechanism.
typescript// ❌ BAD - Explicit naming prevents reusability and parallel deployments new lambda.Function(this, 'MyFunction', { functionName: 'my-lambda', // Avoid this // ... }); // ✅ GOOD - Let CDK generate unique names new lambda.Function(this, 'MyFunction', { // No functionName specified - CDK generates: StackName-MyFunctionXXXXXX // ... });
Security Note: For different environments (dev, staging, prod), follow AWS Security Pillar best practices by using separate AWS accounts rather than relying on resource naming within a single account. Account-level isolation provides stronger security boundaries.
Use the appropriate Lambda construct based on runtime:
TypeScript/JavaScript: Use @aws-cdk/aws-lambda-nodejs
typescriptimport { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs'; new NodejsFunction(this, 'MyFunction', { entry: 'lambda/handler.ts', handler: 'handler', // Automatically handles bundling, dependencies, and transpilation });
Python: Use @aws-cdk/aws-lambda-python
typescriptimport { PythonFunction } from '@aws-cdk/aws-lambda-python-alpha'; new PythonFunction(this, 'MyFunction', { entry: 'lambda', index: 'handler.py', handler: 'handler', // Automatically handles dependencies and packaging });
Benefits:
Use a multi-layer validation strategy for comprehensive CDK quality checks:
For TypeScript/JavaScript projects:
Install cdk-nag for synthesis-time validation:
bashnpm install --save-dev cdk-nag
Add to your CDK app:
typescriptimport { Aspects } from 'aws-cdk-lib'; import { AwsSolutionsChecks } from 'cdk-nag'; const app = new App(); Aspects.of(app).add(new AwsSolutionsChecks());
Optional - VS Code users: Install CDK NAG Validator extension for faster feedback on file save.
For Python/Java/C#/Go projects: cdk-nag is available in all CDK languages and provides the same synthesis-time validation.
bash cdk synth # cdk-nag runs automatically via Aspects
typescript import { NagSuppressions } from 'cdk-nag';
// Document WHY the exception is needed NagSuppressions.addResourceSuppressions(resource, { id: 'AwsSolutions-L1', reason: 'Lambda@Edge requires specific runtime for CloudFront compatibility' } ]);
bash npm run build # or language-specific build command
bash npm test # or pytest, mvn test, etc.
bash ./scripts/validate-stack.sh
The validation script now focuses on:
Always verify before implementing:
Example scenarios:
Leverage for CDK-specific guidance:
Example scenarios:
For detailed CDK patterns, anti-patterns, and architectural guidance, refer to the comprehensive reference:
File: references/cdk-patterns.md
This reference includes:
scripts/validate-stack.sh - Pre-deployment validationreferences/cdk-patterns.md - Detailed pattern libraryWhen GitHub Actions workflow files exist in the repository, ensure all checks defined in .github/workflows/ pass before committing. This prevents CI/CD failures and maintains code quality standards.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 10,238 | 7,005 | -32% | 1 | 1 | 0% | 1,949 | 3,258 | +67% | 0 | 0 | — |
case-02 | pass→pass | 5,869 | 9,924 | +69% | 1 | 1 | 0% | 1,028 | 2,988 | +191% | 0 | 0 | — |
case-03 | fail→pass | 6,543 | 10,961 | +68% | 1 | 1 | 0% | 1,335 | 4,351 | +226% | 0 | 0 | — |
case-04 | pass→pass | 15,618 | 12,531 | -20% | 1 | 1 | 0% | 2,795 | 4,163 | +49% | 0 | 0 | — |
case-05 | pass→pass | 11,828 | 7,660 | -35% | 1 | 1 | 0% | 2,093 | 3,296 | +57% | 0 | 0 | — |
case-06 | pass→pass | 5,718 | 5,540 | -3% | 1 | 1 | 0% | 1,054 | 2,914 | +176% | 0 | 0 | — |
case-07 | pass→pass | 18,226 | 13,662 | -25% | 1 | 1 | 0% | 3,053 | 4,489 | +47% | 0 | 0 | — |
case-08 | pass→pass | 8,150 | 6,008 | -26% | 1 | 1 | 0% | 1,428 | 2,886 | +102% | 0 | 0 | — |
case-09 | pass→pass | 5,208 | 3,818 | -27% | 1 | 1 | 0% | 893 | 2,609 | +192% | 0 | 0 | — |
case-10 | pass→pass | 7,511 | 3,406 | -55% | 1 | 1 | 0% | 1,164 | 2,402 | +106% | 0 | 0 | — |
case-11 | pass→pass | 8,314 | 8,249 | -1% | 1 | 1 | 0% | 1,484 | 3,043 | +105% | 0 | 0 | — |
case-12 | pass→pass | 8,685 | 2,181 | -75% | 1 | 1 | 0% | 1,438 | 2,273 | +58% | 0 | 0 | — |
case-13 | pass→pass | 9,288 | 3,316 | -64% | 1 | 1 | 0% | 1,567 | 2,510 | +60% | 0 | 0 | — |
case-14 | pass→pass | 14,772 | 10,020 | -32% | 1 | 1 | 0% | 2,755 | 3,989 | +45% | 0 | 0 | — |
case-15 | fail→pass | 10,204 | 2,012 | -80% | 1 | 1 | 0% | 1,353 | 2,257 | +67% | 0 | 0 | — |
case-16 | pass→pass | 4,468 | 3,807 | -15% | 1 | 1 | 0% | 635 | 2,605 | +310% | 0 | 0 | — |
case-17 | fail→fail | 16,609 | 16,544 | -0% | 1 | 1 | 0% | 2,667 | 4,389 | +65% | 0 | 0 | — |
case-18 | pass→pass | 6,023 | 3,095 | -49% | 1 | 1 | 0% | 1,080 | 2,482 | +130% | 0 | 0 | — |
case-19 | pass→pass | 7,653 | 5,102 | -33% | 1 | 1 | 0% | 1,116 | 2,813 | +152% | 0 | 0 | — |
case-20 | pass→pass | 11,570 | 11,371 | -2% | 1 | 1 | 0% | 2,023 | 4,074 | +101% | 0 | 0 | — |
case-21 | fail→fail | 13,180 | 10,756 | -18% | 1 | 1 | 0% | 2,250 | 3,647 | +62% | 0 | 0 | — |
case-22 | pass→pass | 11,364 | 8,694 | -23% | 1 | 1 | 0% | 1,931 | 3,451 | +79% | 0 | 0 | — |
case-23 | pass→pass | 9,061 | 7,973 | -12% | 1 | 1 | 0% | 1,606 | 3,352 | +109% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.