OpenParable
Skip to content
← Back to skills

Pnpm Format

Development
pnpm-format

Pnpm Format is an Agent Skill for development published in the microsoft/typespec repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Format the codebase with pnpm and recover from common formatting failures.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/microsoft/typespec/blob/HEAD/.github/skills/pnpm-format/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pnpm-format, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Format code with pnpm

Use this skill any time formatting is required in the TypeSpec repo. Do not assume formatting happens automatically; always run pnpm format following this guidance.

Preconditions

  • Command must run from the repository root (where package.json and pnpm-workspace.yaml live).
  • Dependencies must be installed.

Steps

  1. Confirm you are at the repo root.
  2. If node_modules are missing or pnpm complains about missing packages, run:
    pnpm install
    
  3. Run the formatter:
    pnpm format
    
  4. If the command fails with ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND, you are not at the repo root. cd to the root and retry.
  5. If pnpm format exits with a non-zero code but prints a list of changed files, re-run pnpm format once to ensure a clean exit.

Notes

  • Do not cancel the command; formatting may take about a minute.