Skip to content
Back to skills

Package Usage

ASecurity

Track which stacks across a Pulumi organization use a specific package and at what versions. Use for cross-stack audits, identifying outdated or unmaintained package versions across many stacks, finding affected stacks before publishing breaking changes to a component package, or planning coordinated upgrade rollouts. Do NOT use for upgrading a cloud provider package (pulumi-aws, pulumi-azure-native, pulumi-gcp, pulumi-kubernetes, etc.) in a single project — use skill `provider-upgrade` inste...

  • 70 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added August 31, 2026
devopsgokubernetesawsgcpazureapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned August 31, 2026

npx -y skills add pulumi/agent-skills --skill package-usage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Package Usage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Package Usage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pulumi-package-usage/badge)](https://www.skillsdirectory.com/skills/pulumi-package-usage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: package-usage
description: Track which stacks across a Pulumi organization use a specific package and at what versions. Use for cross-stack audits, identifying outdated or unmaintained package versions across many stacks, finding affected stacks before publishing breaking changes to a component package, or planning coordinated upgrade rollouts. Do NOT use for upgrading a cloud provider package (pulumi-aws, pulumi-azure-native, pulumi-gcp, pulumi-kubernetes, etc.) in a single project — use skill `provider-upgrade` instead. Do NOT use for general infrastructure creation, resource provisioning, or how-to questions about a package.
---

## API Reference

Query the Pulumi Cloud API with the `pulumi api` CLI subcommand. It authenticates with your existing Pulumi credentials and returns JSON.

### Get the latest version of a package

```
pulumi api /api/registry/packages -F name={package_name} -F orgLogin={orgName}
```

Include `orgLogin` with the user's organization name. Omit `-F name=...` to list all packages visible to the organization (useful when the user has not named a specific package). The response contains a `packages` array. Each entry has a `version` field (the latest version), plus `name`, `publisher`, `source`, and `packageStatus`.

### Get stack usage for a package

```
pulumi api /api/orgs/{orgName}/packages/usage -F packageName={package_name}
```

Replace `{orgName}` with the org name from context, `PULUMI_ORG`, or ask the user. `packageName` is required; query one package at a time.

Response fields:
- `packageName`: The queried package
- `stacks`: Array of `{stackName, projectName, version, lastUpdate}`
- `totalStacks`: Total count

## Workflow: Find outdated stacks

Use when the user wants to know which stacks are using an outdated version of a package.

1. Get the latest version of the package
2. Get stack usage for the package
3. Compare each stack's `version` against the latest to identify outdated stacks
4. Present results using the output format below

## Output Format

Present results as a markdown table followed by a summary line:

```
| Project | Stack | Current Version | Latest Version | Status |
|---------|-------|-----------------|----------------|--------|
| my-app  | dev   | 6.40.0          | 6.52.0         | Outdated |
| my-app  | prod  | 6.52.0          | 6.52.0         | Up-to-date |

2 of 2 stacks checked. 1 outdated.
```

## Out of scope: upgrading a specific stack

This skill identifies outdated stacks. It does not perform the upgrade itself. For actually bumping a package version in a project — editing `package.json`, `requirements.txt`, `pyproject.toml`, `go.mod`, or `Pulumi.yaml`, running `pulumi preview`, and reconciling the diff — hand off to the `provider-upgrade` skill.

Files in this skill

  • SKILL.md2.7 KB
  • agents/openai.yaml239 B
  • use_cases.yaml920 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.