# Unity Package Management

Adds, removes, upgrades, and discovers Unity (UPM) packages from outside the Editor...

- Repository: https://github.com/Unity-Technologies/skills (1197 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Unity-Technologies/skills --skill unity-package-management -g -a claude-code -y`
Codex: `npx skills add Unity-Technologies/skills --skill unity-package-management -g -a codex -y`
Cursor: `npx skills add Unity-Technologies/skills --skill unity-package-management -g -a cursor -y`
Gemini CLI: `npx skills add Unity-Technologies/skills --skill unity-package-management -g -a gemini-cli -y`

## Description

Adds, removes, upgrades, and discovers Unity (UPM) packages from outside the Editor, with the Pipeline package commands first and a C# script as the fallback. Use for package installs, verifying package IDs and versions, or choosing which packages a game needs.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Unity Package Management (Pipeline commands first, C# script as the fallback)

Add, remove, upgrade, and discover UPM (Unity Package Manager) packages with the `package`
commands of the project's Pipeline package, run through `unity command`. Only when no Editor can
answer those commands, fall back to `UnityEditor.PackageManager.Client` driven headless from a
script (see [Fallback](#fallback-no-editor-to-ask-the-c-client-api)). Do **not** hand-edit
`Packages/manifest.json`: the Package Manager resolves dependencies and compatible versions
correctly, whereas manual edits routinely break resolution.

This complements the **`unity-cli`** skill (editor install, project creation, build/test), which
documents `unity command`, `unity status` and `unity pipeline install`.

## Use the package commands first

The Pipeline package registers a `package` command group: `add`, `remove`, `list`, `resolve`,
`search` and `status`. They need a running Editor whose project has `com.unity.pipeline` (add it
with `unity pipeline install`, then `unity open`, then wait with `unity status --until-ready`).
Each command's parameters come from the Editor, so read them before the first call. Don't guess
a parameter name.

```bash
unity status --until-ready --project-path "<project-path>"
unity command package --project-path "<project-path>"                  # the package commands this Editor has
unity command --query package --format json --project-path "<project-path>"   # each command's parameter schema
unity command package search --project-path "<project-path>"           # then pass the parameters the schema lists
unity command package add --project-path "<project-path>"              # add one or more packages by id
unity command package list --project-path "<project-path>"             # confirm what is installed
```

The rest: https://github.com/Unity-Technologies/skills/blob/HEAD/skills/unity-package-management/SKILL.md
