$npx -y skills add mvanhorn/cli-printing-press --skill printing-press-publishPublish a generated CLI to the printing-press-library repo
| 1 | # /printing-press publish |
| 2 | |
| 3 | Publish a generated CLI from your local library to the [printing-press-library](https://github.com/mvanhorn/printing-press-library) repo as a pull request. |
| 4 | |
| 5 | ```bash |
| 6 | /printing-press publish notion-pp-cli |
| 7 | /printing-press publish notion |
| 8 | /printing-press publish notion --from-polish |
| 9 | /printing-press publish notion --skip-live-test=auth-unavailable |
| 10 | /printing-press publish notion --blocked-api-journal notion |
| 11 | /printing-press publish |
| 12 | ``` |
| 13 | |
| 14 | ## PR shape guard |
| 15 | |
| 16 | This skill opens only a generated CLI publish PR or, with |
| 17 | `--blocked-api-journal`, a `blocked-apis.json` journal PR. It never opens a |
| 18 | docs-only, plan, proposal, or spec PR as a substitute for a CLI that is not |
| 19 | ready to publish. If generation, validation, or live testing is blocked, report |
| 20 | the exact blocker and stop. |
| 21 | |
| 22 | ## Direct User Invocation Required |
| 23 | |
| 24 | Publishing can fork `mvanhorn/printing-press-library`, push a branch, and open or |
| 25 | update a PR. Before setup or validation, check the invocation context. If this |
| 26 | skill was invoked as a chained continuation from `printing-press-polish`'s |
| 27 | Publish Offer, including an `AskUserQuestion` answer or auto-resolved polish |
| 28 | recommendation, stop immediately and tell the user to send |
| 29 | `/printing-press-publish <cli-name> --from-polish` in a fresh message. A fresh |
| 30 | user-authored request that explicitly asks to publish is sufficient; do not add |
| 31 | another confirmation prompt on top of a direct publish request. |
| 32 | |
| 33 | If the fresh user-authored request includes `--from-polish`, record |
| 34 | `POLISH_HANDOFF=true` for the terminal-state step and ignore that marker when |
| 35 | resolving the CLI name. The marker is not a second confirmation and is not |
| 36 | passed to `cli-printing-press`; it only preserves standalone polish's old |
| 37 | post-publish retro offer after the fresh-turn publish completes. |
| 38 | |
| 39 | If the request includes `--blocked-api-journal`, enter **Blocked API Journal |
| 40 | Mode** below instead of the normal printed-CLI publish flow. This mode may be |
| 41 | invoked from `/printing-press`'s hold-path menu after the user explicitly chose |
| 42 | "Add to blocked-API journal"; that parent menu choice is sufficient user |
| 43 | authorization for the public-library journal write. Do not require a second |
| 44 | fresh-turn invocation for this journal-only mode. |
| 45 | |
| 46 | If the fresh user-authored request includes `--skip-live-test=<reason>`, record |
| 47 | the exact non-empty reason as `SKIP_LIVE_TEST_REASON` and remove the flag before |
| 48 | resolving the CLI name. This is the only supported escape valve for the |
| 49 | publish-time live test gate. Use it only for auth-unavailable, known upstream |
| 50 | outage, LAN-unreachable hardware APIs, or similarly concrete operator-approved |
| 51 | cases; never infer a skip from ordinary latency or from the presence of an |
| 52 | older Phase 5 marker. |
| 53 | |
| 54 | The public library treats `library/<category>/<api-slug>/.printing-press.json` |
| 55 | and `manifest.json` as the source of truth for registry-display fields. Do not |
| 56 | edit `registry.json`, README catalog cells, or `cli-skills/pp-<api-slug>/SKILL.md` |
| 57 | in publish PRs; all three are bot-regenerated post-merge by the library's own |
| 58 | workflows. The library's `Fail on changes to generated artifacts` check in |
| 59 | `verify-library-conventions.yml` hard-fails any PR — fork or same-repo — whose |
| 60 | diff against base touches `registry.json` or `cli-skills/pp-*/SKILL.md`, so a |
| 61 | publish that includes either is pre-rejected before review. |
| 62 | |
| 63 | The public library also owns per-CLI release accounting. Do not manually bump |
| 64 | `CHANGELOG.md`, `.printing-press-release.json`, or runtime `var version = ...` |
| 65 | for a publish PR. Fresh printed CLIs may include blank release-ledger skeletons; |
| 66 | the library's post-merge workflow assigns the final `YYYY.M.N` release and |
| 67 | stamps the runtime version after merge. When replacing an existing public |
| 68 | library CLI, preserve its existing release-ledger files so changelog history is |
| 69 | not lost in the reprint PR. |
| 70 | |
| 71 | `blocked-apis.json` is different: it is a hand-maintained public-library journal, |
| 72 | not a generated registry surface. Journal-only PRs may edit `blocked-apis.json` |
| 73 | and must not stage `library/`, `registry.json`, README catalog cells, or |
| 74 | `cli-skills/`. |
| 75 | |
| 76 | ## Blocked API Journal Mode |
| 77 | |
| 78 | Use this mode only when the invocation includes `--blocked-api-journal`. It |
| 79 | records a held `/printing-press` attempt whose blocker is likely to repeat for |
| 80 | other users until a machine or upstream issue changes. |
| 81 | |
| 82 | Required fields from the caller: |
| 83 | |
| 84 | - `slug`: canonical API slug, not the CLI binary name. |
| 85 | - `attempted_at`: `YYYY-MM-DD`. |
| 86 | - `verdict`: `hold`. |
| 87 | - `reason`: concise blocker reason, with no secrets, local paths, cookies, |
| 88 | tokens, or account-specific details. |
| 89 | - `blocking_issue`: Printing Press issue number if known, otherwise `null`. |
| 90 | - `permanent`: boolean. |
| 91 | |
| 92 | If the caller did not provide one of these fields, infer only safe val |