← back to Cli Printing Press
fix(skills): correct publish package flag name and staging workflow
776d433ca94b32af8be25fbc3694ce3ff0dea1e4 · 2026-04-09 13:56:25 -0700 · Trevin Chow
The publish skill referenced --dest but the binary uses --target. It also
instructed writing directly into the publish repo, but the command expects
a new staging directory and fails if it exists. Fixed to use a temp staging
dir with explicit copy into the publish repo, matching the actual binary
behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Files touched
M skills/printing-press-publish/SKILL.md
Diff
commit 776d433ca94b32af8be25fbc3694ce3ff0dea1e4
Author: Trevin Chow <trevin@trevinchow.com>
Date: Thu Apr 9 13:56:25 2026 -0700
fix(skills): correct publish package flag name and staging workflow
The publish skill referenced --dest but the binary uses --target. It also
instructed writing directly into the publish repo, but the command expects
a new staging directory and fails if it exists. Fixed to use a temp staging
dir with explicit copy into the publish repo, matching the actual binary
behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---
skills/printing-press-publish/SKILL.md | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/skills/printing-press-publish/SKILL.md b/skills/printing-press-publish/SKILL.md
index 8b2d1e61..c83429aa 100644
--- a/skills/printing-press-publish/SKILL.md
+++ b/skills/printing-press-publish/SKILL.md
@@ -318,21 +318,40 @@ MODULE_PATH="<module_path_base>/<category>/<api-slug>"
For example: `github.com/mvanhorn/printing-press-library/library/productivity/notion`
-Run `publish package` with `--dest` to write directly into the publish repo:
+Run `publish package` with `--target` to stage the CLI into a temporary directory, then copy it into the publish repo:
```bash
+STAGING_DIR="/tmp/publish-staging-<api-slug>"
+rm -rf "$STAGING_DIR"
+
printing-press publish package \
--dir <cli-dir> \
--category <category> \
- --dest "$PUBLISH_REPO_DIR" \
+ --target "$STAGING_DIR" \
--module-path "$MODULE_PATH" \
--json
```
-This removes any existing version of the CLI (handling category changes), copies the CLI source and `.manuscripts` directly into `$PUBLISH_REPO_DIR/library/<category>/<api-slug>/`, and rewrites the Go module path.
-
Parse the JSON result. Note the `staged_dir`, `module_path`, `manuscripts_included`, and `run_id`. The `module_path` field confirms the Go module path that was set in the packaged CLI's `go.mod` and import paths.
+Then copy the staged CLI into the publish repo, replacing any existing version:
+
+```bash
+# Remove existing version (handles category changes)
+rm -rf "$PUBLISH_REPO_DIR/library"/*/"<api-slug>"
+
+# Copy staged CLI into publish repo (slug-keyed directory)
+cp -r "$STAGING_DIR/library/<category>/<cli-name>" "$PUBLISH_REPO_DIR/library/<category>/<api-slug>"
+
+# Remove binaries (should not be committed)
+rm -f "$PUBLISH_REPO_DIR/library/<category>/<api-slug>/<api-slug>" "$PUBLISH_REPO_DIR/library/<category>/<api-slug>/<cli-name>"
+
+# Verify it builds from the publish repo
+cd "$PUBLISH_REPO_DIR/library/<category>/<api-slug>" && go build ./...
+```
+
+Note: `staged_dir` uses the CLI name (e.g., `espn-pp-cli`) but the publish repo uses the API slug (e.g., `espn`). The copy step handles this rename.
+
## Step 7: Collision Detection & Resolution
After the managed clone is freshened, check for name collisions before creating a branch or PR. This replaces the previous "Check for Existing PR" step.
@@ -479,7 +498,7 @@ If a suggestion collides, skip it or increment the numeric suffix.
**4. Rename the CLI in the publish repo:**
-Since Step 6 wrote the CLI directly into `$PUBLISH_REPO_DIR` via `--dest`, the rename operates on that directory. Note: `--old-name`/`--new-name` still use CLI-name format (e.g., `dub-pp-cli`) because `RenameCLI` does content replacement — bare slugs would cause collateral damage. The `--dir` path uses the slug-keyed directory.
+Since Step 6 copied the staged CLI into `$PUBLISH_REPO_DIR`, the rename operates on that directory. Note: `--old-name`/`--new-name` still use CLI-name format (e.g., `dub-pp-cli`) because `RenameCLI` does content replacement — bare slugs would cause collateral damage. The `--dir` path uses the slug-keyed directory.
```bash
printing-press publish rename \
← 49148b43 feat(cli): add --dates sync flag and wrapper-object list det
·
back to Cli Printing Press
·
feat(cli): apply PostHog agent-first learnings to MCP server 8354f528 →