dirien/yet-another-agent-harness / .claude/skills/pulumi-cdk-to-pulumi
pulumi-cdk-to-pulumi
VerifiedConvert an AWS CDK application to Pulumi. This skill MUST be loaded whenever a user requests migration or conversion of a CDK application to Pulumi.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.3 KB |
| agents/openai.yaml | config | 212 B |
| cdk-convert.md | markdown | 2.8 KB |
| cdk-importer.md | markdown | 4.1 KB |
| cloudformation-id-lookup.md | markdown | 2.8 KB |
cdk-convert.md
View on GitHub# Pulumi CDK Conversion Tool (`cdk2pulumi`)
This tool plugin converts AWS CDK Cloud Assemblies to Pulumi YAML programs.
## Prerequisites
- The tool must be installed: `pulumi plugin install tool cdk2pulumi`
- All commands run through the Pulumi CLI using: `pulumi plugin run cdk2pulumi -- <args>`
- A CDK Cloud Assembly (typically in `cdk.out` directory) must exist for conversion operations
## Commands
### 1. Convert CDK Assembly to Pulumi YAML
Converts a CDK Cloud Assembly to a Pulumi YAML program (`Pulumi.yaml`) with an accompanying conversion report (`Pulumi.yaml.report.json`).
**Basic conversion:**
```bash
pulumi plugin run cdk2pulumi -- --assembly path/to/cdk.out
```
**Required flags:**
- `--assembly`: Path to the synthesized CDK Cloud Assembly (typically `cdk.out` directory). By default this will convert the entire CDK application (i.e. all stacks and stages)
**Optional flags:**
- `--stacks`: Comma separated list of CDK Stacks to convert
- `--stage`: Filter conversion to a specific CDK Stage
- `--skip-custom`: Skip converting CDK custom resources
**Important Notes:**
- Cross-stack references in partially converted stacks become config placeholders: `${external.<stack>.<output>}`
- Set these with: `pulumi config set external.<stack>.<output> <value>` before deployment
- CDK custom resources are rewritten to `aws-native:cloudformation:CustomResourceEmulator`
- The generated code will use the original CDK logical IDS. DO NOT update these otherwise automated import will FAIL
## Common Workflows
### Converting a CDK Application to Pulumi
1. **Synthesize the CDK app** to generate the Cloud Assembly:
```bash
cdk synth
```
2. **Convert the assembly** to Pulumi YAML:
```bash
pulumi plugin run cdk2pulumi -- --assembly cdk.out
```
3. **Review the conversion report** at `Pulumi.yaml.report.json` to identify any resources that didn't convert 1:1
4. **Set any required config** for cross-stack references:
```bash
pulumi config set external.<stack>.<output> <value>
```
5. **Convert the Pulumi YAML program** to the target language:
```bash
pulumi convert --from yaml --generate-only --language typescript --out ./generated-program
```
> NOTE: after converting to another language you need to remove or rename the `Pulumi.yaml` file, otherwise it will still be treated as the main application
6. **Preview** the Pulumi program:
```bash
pulumi preview
```
## Tips for Running
- Always use `--` to separate Pulumi CLI arguments from plugin arguments
- The `--assembly` flag expects a directory path (typically `cdk.out`), not a file
- When converting specific stacks, use comma-separated names without spaces: `--stacks Stack1,Stack2`
- For multi-stage CDK apps, use `--stage <name>` to target nested assemblies
- The tool outputs to `Pulumi.yaml` by default; use `--out` to specify a different location
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |