skills_all/aws-skills/skills/aws-cdk-development/SKILL.md
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.
npx skillsauth add microck/ordinary-claude-skills aws-cdk-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
// ❌ 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
import { 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
import { 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:
npm install --save-dev cdk-nag
Add to your CDK app:
import { 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.
Synthesis with cdk-nag: Validate stack with comprehensive rules
cdk synth # cdk-nag runs automatically via Aspects
Suppress legitimate exceptions with documented reasons:
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'
}
]);
Build: Ensure compilation succeeds
npm run build # or language-specific build command
Tests: Run unit and integration tests
npm test # or pytest, mvn test, etc.
Validation Script: Meta-level checks
./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.
development
Migrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5. Use when the user wants to update their codebase, prompts, or API calls to use Opus 4.5. Handles model string updates and prompt adjustments for known Opus 4.5 behavioral differences. Does NOT migrate Haiku 4.5.
development
Analyzes Claude Code usage patterns and provides comprehensive recommendations. Runs usage analysis, discovers GitHub community resources, suggests CLAUDE.md improvements, and fetches latest docs on-demand. Use when user wants to optimize their Claude Code workflow, create configurations (agents/skills/commands), or set up project documentation.
development
Quantum computing framework for building, simulating, optimizing, and executing quantum circuits. Use this skill when working with quantum algorithms, quantum circuit design, quantum simulation (noiseless or noisy), running on quantum hardware (Google, IonQ, AQT, Pasqal), circuit optimization and compilation, noise modeling and characterization, or quantum experiments and benchmarking (VQE, QAOA, QPE, randomized benchmarking).
tools
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.