# Pulumi migrate from discovered stack

> Pulumi migrate from discovered stack is an open-source agent skill for cloud and infrastructure. Guides an agent to import a discovered CloudFormation or ARM stack into Pulumi. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/pulumi/agent-skills/tree/main/migration/skills/pulumi-migrate-from-discovered-stack
- **Repository:** https://github.com/pulumi/agent-skills
- **GitHub stars:** 82
- **License:** Apache-2.0
- **Skill name:** pulumi-migrate-from-discovered-stack
- **Collection:** https://github.com/pulumi/agent-skills
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through moving a CloudFormation or ARM stack that Pulumi Cloud's Discovery feature has already scanned into a Pulumi stack. It reads the discovered resource list from the discovered-stacks API, checks each resource's migration status, and uses those statuses to decide what to import, what to verify and what to annotate as handled.

The workflow is cloud-state-first: resources are imported with generated code, then a preview is run repeatedly until it shows no changes. Annotations are written back through the same API so progress stays visible in Pulumi Cloud. An optional refactoring phase replaces hardcoded values with resource references and config, and a final pull request carries the code and a migration report.

The agent needs a Pulumi Cloud organization with the discovered stack, a target Git repository, and Pulumi credentials, ideally supplied through ESC. Helper Python scripts handle triage and build the import file. The skill is meant for existing discovered stacks, not greenfield Pulumi projects or Terraform migrations.

## When your agent uses it

> Migrate a CloudFormation or ARM stack into a Pulumi stack, sourced from a stack that Pulumi Cloud's Discovery feature has already found and exposed via the discovered-stacks API. Load this skill when the user has a discovered stack in Pulumi Cloud and wants to bring its resources under Pulumi management. Do NOT load for greenfield Pulumi authoring, raw template conversion with no discovered-stack counterpart (i.e. no matching entry from the discovered-stacks API), or Terraform migration.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/pulumi/agent-skills/tree/HEAD/migration/skills/pulumi-migrate-from-discovered-stack)
- [No network calls found in its scripts](https://github.com/pulumi/agent-skills/tree/HEAD/migration/skills/pulumi-migrate-from-discovered-stack)
- [License: Apache-2.0](https://github.com/pulumi/agent-skills/tree/HEAD/migration/skills/pulumi-migrate-from-discovered-stack)

## Features

- **Discovered resource triage:** Fetches discovered resources and sorts them by migration status so the agent knows what is ready, missing or unmappable.
- **Import file generation:** Builds a Pulumi import file from the discovered resource list, mapping types and provider IDs for batch imports.
- **Zero-diff reconciliation:** Guides repeated preview rounds until generated code matches the cloud state without changing the cloud.
- **Migration annotations:** Records notes and status overrides through the Pulumi Cloud API so progress and decisions persist.
- **Optional refactoring pass:** Replaces hardcoded values with cross-resource references and config after the import is verified.
- **Migration report and PR:** Produces a resource mapping table, gaps list and pull request description for review.

## Good for

- Bring a CloudFormation stack discovered in Pulumi Cloud under Pulumi management
- Import the resources of an Azure ARM deployment into a new Pulumi stack
- Track which discovered resources are already migrated and which still need attention
- Resolve resources that were deleted or have no Pulumi mapping and annotate them
- Open a pull request containing the migrated Pulumi code and a migration report

## Install

### Claude Code

This skill ships in the `pulumi-migration` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add pulumi/agent-skills
/plugin install pulumi-migration@pulumi-agent-skills
```

Or copy only this skill to `~/.claude/skills/pulumi-migrate-from-discovered-stack`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/pulumi-migrate-from-discovered-stack &&
cp -R "$tmp/migration/skills/pulumi-migrate-from-discovered-stack" ~/.claude/skills/pulumi-migrate-from-discovered-stack &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/pulumi-migrate-from-discovered-stack` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/pulumi-migrate-from-discovered-stack` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/pulumi-migrate-from-discovered-stack &&
cp -R "$tmp/migration/skills/pulumi-migrate-from-discovered-stack" ~/.agents/skills/pulumi-migrate-from-discovered-stack &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/pulumi-migrate-from-discovered-stack` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/pulumi-migrate-from-discovered-stack` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/pulumi-migrate-from-discovered-stack &&
cp -R "$tmp/migration/skills/pulumi-migrate-from-discovered-stack" ~/.cursor/skills/pulumi-migrate-from-discovered-stack &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/pulumi-migrate-from-discovered-stack` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/pulumi/agent-skills.git --path migration/skills/pulumi-migrate-from-discovered-stack
```

Or copy the folder to `~/.gemini/skills/pulumi-migrate-from-discovered-stack` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/pulumi-migrate-from-discovered-stack`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pulumi/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/pulumi-migrate-from-discovered-stack &&
cp -R "$tmp/migration/skills/pulumi-migrate-from-discovered-stack" ~/.copilot/skills/pulumi-migrate-from-discovered-stack &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/pulumi-migrate-from-discovered-stack` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/pulumi/agent-skills.git
```

Then copy `agent-skills/migration/skills/pulumi-migrate-from-discovered-stack` into your agent's skills folder as `pulumi-migrate-from-discovered-stack`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Pulumi migrate from discovered stack not be loaded?

It does not apply to greenfield Pulumi authoring, raw template conversion without a matching discovered-stack entry, or Terraform migration.

### What does the agent need before starting?

The org name, discovered project and stack names, region, a target Git repository, target project and stack names, the target language and cloud credentials, ideally via ESC. The skill asks for these rather than guessing.

### Does the skill run pulumi up on the cloud?

No. It explicitly forbids running pulumi up to resolve diffs, relying on pulumi import and preview to reach zero diff.

### Which languages and scripts are involved?

The default target language is TypeScript, and the skill ships Python helper scripts for triage and building the import file.

### How do I install Pulumi migrate from discovered stack in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/pulumi-migrate-from-discovered-stack to use it in all your projects, or to .claude/skills/pulumi-migrate-from-discovered-stack in one project. Or install the pulumi-migration plugin, which includes it: /plugin marketplace add pulumi/agent-skills, then /plugin install pulumi-migration@pulumi-agent-skills.

### Does Pulumi migrate from discovered stack run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Pulumi migrate from discovered stack?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Pulumi migrate from discovered stack?

The closest alternatives to Pulumi migrate from discovered stack are Cloudformation to pulumi, Pulumi terraform to pulumi, Pulumi cdk to pulumi, Pulumi arm to pulumi and Pulumi overview.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Cloudformation to pulumi](https://ai-powered.com/skills/cloudformation-to-pulumi): Cloudformation to pulumi is an open-source agent skill for cloud and infrastructure.
- [Pulumi terraform to pulumi](https://ai-powered.com/skills/pulumi-terraform-to-pulumi): Pulumi terraform to pulumi is an open-source agent skill for cloud and infrastructure.
- [Pulumi cdk to pulumi](https://ai-powered.com/skills/pulumi-cdk-to-pulumi): Pulumi cdk to pulumi is an open-source agent skill for cloud and infrastructure.
- [Pulumi arm to pulumi](https://ai-powered.com/skills/pulumi-arm-to-pulumi): Pulumi arm to pulumi is an open-source agent skill for cloud and infrastructure.
- [Pulumi overview](https://ai-powered.com/skills/pulumi-overview): Pulumi overview is an open-source agent skill for cloud and infrastructure.
- [Pulumi automation API](https://ai-powered.com/skills/pulumi-automation-api): Pulumi automation API is an open-source agent skill for cloud and infrastructure.
- [Pulumi create agent](https://ai-powered.com/skills/pulumi-create-agent): Pulumi create agent is an open-source agent skill for cloud and infrastructure.
- [Pulumi esc](https://ai-powered.com/skills/pulumi-esc): Pulumi esc is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/pulumi-migrate-from-discovered-stack
