Skip to main content
skill CX Codex

package-usage — Claude Code skill: what it does, how to install

Scans Pulumi organization stacks to report which projects run a given package and flag versions that lag behind the latest release.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pulumi/agent-skills --skill package-usage -a claude-code
Open on GitHub

What package-usage does

The skill audits package adoption across an entire Pulumi Cloud organization. It calls the Pulumi Cloud API directly via pulumi api, authenticating with existing CLI credentials. The workflow pulls the newest package version from the registry, fetches stack records, and highlights version drift.

Results arrive in a markdown table listing project names, stacks, active versions, latest releases, and status flags like Outdated or Up-to-date. Running the query requires the target package name and an organization login, supplied through PULUMI_ORG, session context, or direct user input.

Upgrading code falls outside its scope. The skill will not touch package.json, go.mod, or Pulumi.yaml, nor will it run pulumi preview. For altering project manifests and applying changes, Pulumi routes users to the separate provider-upgrade skill.

What it helps with

  • track which stacks run an outdated version of a shared package
  • locate affected projects before publishing breaking changes to a component
  • plan coordinated dependency rollouts across multiple environments

Example prompts for the agent

  • Check which stacks across our Pulumi org are still running old versions of pulumi-aws.
  • List all projects using my-shared-component in the my-company organization.
  • Audit package usage for pulumi-kubernetes and show which stacks are outdated.

How to install package-usage

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/package-usage/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/package-usage/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about package-usage

How to install package-usage in Claude Code?

Run npx skills add pulumi/agent-skills --skill package-usage -a claude-code. The skill file will be placed at ~/.claude/skills/package-usage/SKILL.md.

What does package-usage do?

It queries the Pulumi Cloud API to identify which stacks in your organization use a specific package and reports whether their versions match the latest release.

Can package-usage update dependencies directly?

No, it only audits and reports version discrepancies. Applying updates to files like Pulumi.yaml, package.json, or go.mod requires the dedicated provider-upgrade skill.

Source text

SKILL.md · Apache-2.0
---
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.

© pulumi · Apache-2.0 · pulumi/agent-skills

Similar skills

All skills for DevOps and infrastructure →

From the same set13

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor