agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/pulumi-cli/SKILL.md

pulumi-cli

Skill4 starsChanged 6 months agoMITView on GitHub

Execute Pulumi CLI commands for stack management, infrastructure deployments, and API interactions. You MUST load this skill when working with the pulumi command.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    JSON Output: Use --output=json where supported (especially with pulumi api) for stable and parsable outputs that agents can easily consume.

    line 27
  2. Very specific:

    Preview Changes: Always run a preview before deploying to understand the impact.

    line 34
  3. Distinctive:

    Avoid modifying Pulumi state directly unless absolutely necessary.

    line 63
  4. Very specific:

    Do not use interactive commands in agent scripts.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pulumi CLI

<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->

When to Use

  • Executing core Pulumi commands like pulumi up, pulumi preview, or pulumi destroy.
  • Managing Pulumi stacks with pulumi stack and configuration with pulumi config.
  • Interacting directly with the Pulumi Cloud REST API using pulumi api.

When Not to Use

  • Writing or refactoring Pulumi infrastructure code (use language-specific skills like python or typescript).
  • Fetching documentation or schemas (use pulumi-docs instead).

Core Principles

  • Non-Interactive Execution: Autonomous agents MUST always use the --non-interactive flag to prevent the CLI from hanging while waiting for human input.
  • JSON Output: Use --output=json where supported (especially with pulumi api) for stable and parsable outputs that agents can easily consume.
  • Stable Exit Codes: Rely on Pulumi CLI's exit codes for stable error handling in automation scripts.

Step-by-Step Workflows

Deploying Infrastructure

  1. Preview Changes: Always run a preview before deploying to understand the impact. pulumi preview --non-interactive
  2. Deploy Changes: Deploy the infrastructure changes automatically. pulumi up --non-interactive --yes
  3. Destroy Infrastructure: Tear down the stack entirely when instructed. pulumi destroy --non-interactive --yes

Managing Stacks

  1. List Stacks: pulumi stack ls
  2. Select Stack: pulumi stack select <stack-name>
  3. Show Fully Qualified Stack Names: pulumi stack ls -Q

Interacting with Pulumi API (Agent Workflow)

  1. List API Endpoints: pulumi api list --output=json
  2. Call API Endpoint: pulumi api /api/user

Common Pitfalls

  • Interactive Hangs: Running pulumi up or pulumi destroy without --non-interactive and --yes will cause the agent session to hang waiting for user confirmation.

What to Avoid

  • Avoid modifying Pulumi state directly unless absolutely necessary. Rely on standard deployments where possible.
  • Do not use interactive commands in agent scripts. Always supply all required flags and use --non-interactive.

Related Skills

  • pulumi-docs: You MUST load this skill when retrieving Pulumi documentation or schemas.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.