> ## Documentation Index
> Fetch the complete documentation index at: https://docs.masterskills.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# masterskills publish-draft

> Upload and publish a previously prepared — and approved — draft.

```bash theme={"dark"}
masterskills publish-draft <draftId>
```

The second half of the two-phase publish: uploads the draft created by [`prepare`](/cli/prepare) and publishes it. Run only after the user approved that exact manifest.

## Safety properties

* **What was approved is what ships.** The package is rebuilt and compared against the draft's manifest; if any file changed since `prepare`, the publish fails with `manifest_mismatch` instead of uploading bytes nobody reviewed.
* **The server has the last word.** Its authoritative secret scan runs on the uploaded package; findings reject the publish with a `422` and are shown — no version is created.
* Drafts are bound to their creator and expire; a stale `draftId` fails cleanly and a fresh `prepare` restarts the flow.

On success, the CLI reports the published name and version. If the source folder was inside an agent's global skills directory, it is adopted into the central store and linked back — mentioned in the output when it happens.
