AGENT SKILL

pnpm-format

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

License 许可
MIT
所属仓库
microsoft/typespec
最近更新
2026-11-14
Stars
★ 5.9k
Forks
423

01 前言 Front Matter

name
pnpm-format
description
Format the codebase with pnpm and recover from common formatting failures.

02 资源文件 3

03 SKILL.md 正文

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.

04 同仓库更多 Skills

microsoft
microsoft/typespec

test-unbranded-emitter

Build and test the @typespec/http-client-python emitter. Use this skill whenever the user wants to test their local changes to the emitter, run the generator test suite, check if their http-client-python changes are passing, or validate a fix. Triggers on phrases like "test the emitter", "run tests", "check if my changes pass", "run test:generator", "run CI", or any mention of testing/validating changes in the emitter package.

测试与质量Skill与智能体开发
★ 5.9k
microsoft
microsoft/typespec

generate-from-typespec

Generate Python SDK code from a TypeSpec specification using the local emitter. Use this skill when the user wants to generate/regenerate a Python client from a TypeSpec spec, provides a GitHub URL or local path to a TypeSpec project, or says things like "generate from this spec", "emit Python from this tsp", "regenerate the SDK", or "compile this TypeSpec for Python".

Skill与智能体开发
★ 5.9k
microsoft
microsoft/typespec

diff-upstream

Regenerate the local emitter and diff the generated code against the upstream baseline checked into autorest.python. Use this skill when the user wants to see how their emitter changes affect generated code compared to what's currently in production, says things like "diff upstream", "compare to baseline", "what changed vs production", "show me the diff", "how does this affect generated code", or wants to validate their changes produce the expected output differences.

Skill与智能体开发
★ 5.9k
microsoft
microsoft/typespec

writing-python-sdk-spector-mock-api-tests

Writes TypeSpec http-client-python generator mock API tests (azure/unbranded/shared) from a Spector case. Use when given a Spector case link or a PR link that modifies Spector cases under http-specs/azure-http-specs.

开发工程师内容创作者后端与接口写作与文案
★ 5.9k
microsoft
microsoft/typespec

minimal-repro

Help create a minimal reproduction for a TypeSpec compiler or emitter bug. Use when a user provides TypeSpec source (pasted code or a GitHub URL) and describes an issue. Reproduces locally and reduces to a single-file repro.

★ 5.9k
microsoft
microsoft/typespec

http-client-python-bump-and-release

Create a PR to bump TypeSpec/Azure Tools dependencies, update peer dependencies, or release a new version of the http-client-python package.

★ 5.9k