← back to Cli Printing Press
fix(skills): auto-install printing-press binary in setup contract (#46)
ca675212935979f34e5b4b9f9e9f79b14299141c · 2026-03-29 11:18:59 -0700 · Matt Van Horn
* fix(skills): auto-install printing-press binary in setup contract
Instead of dumping install instructions and bailing when the binary
isn't found, the setup contract now:
1. If binary exists at ~/go/bin but not on PATH → adds to PATH
2. If Go is installed but binary missing → runs go install automatically
3. Only fails if Go itself isn't installed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(skills): skip API key gate for public/unauthenticated APIs
The API Key Gate now checks whether the API actually requires auth
before asking for a key. Public APIs (ESPN, weather, public data)
skip the gate entirely instead of asking a nonsensical question.
Signals used: spec security section, known public APIs, community
docs describing "no auth required", absence of matching env vars.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Matt Van Horn <mvanhorn@MacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Files touched
M skills/printing-press/SKILL.md
Diff
commit ca675212935979f34e5b4b9f9e9f79b14299141c
Author: Matt Van Horn <mvanhorn@users.noreply.github.com>
Date: Sun Mar 29 11:18:59 2026 -0700
fix(skills): auto-install printing-press binary in setup contract (#46)
* fix(skills): auto-install printing-press binary in setup contract
Instead of dumping install instructions and bailing when the binary
isn't found, the setup contract now:
1. If binary exists at ~/go/bin but not on PATH → adds to PATH
2. If Go is installed but binary missing → runs go install automatically
3. Only fails if Go itself isn't installed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(skills): skip API key gate for public/unauthenticated APIs
The API Key Gate now checks whether the API actually requires auth
before asking for a key. Public APIs (ESPN, weather, public data)
skip the gate entirely instead of asking a nonsensical question.
Signals used: spec security section, known public APIs, community
docs describing "no auth required", absence of matching env vars.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Matt Van Horn <mvanhorn@MacBook-Pro.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---
skills/printing-press/SKILL.md | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/skills/printing-press/SKILL.md b/skills/printing-press/SKILL.md
index 428e2134..80f38142 100644
--- a/skills/printing-press/SKILL.md
+++ b/skills/printing-press/SKILL.md
@@ -115,13 +115,17 @@ Before doing anything else:
# min-binary-version: 0.2.0
if ! command -v printing-press >/dev/null 2>&1; then
if [ -x "$HOME/go/bin/printing-press" ]; then
- echo "printing-press found at ~/go/bin/printing-press but not on PATH."
- echo "Add GOPATH/bin to your PATH: export PATH=\"\$HOME/go/bin:\$PATH\""
+ export PATH="$HOME/go/bin:$PATH"
+ echo "Added ~/go/bin to PATH"
+ elif command -v go >/dev/null 2>&1; then
+ echo "printing-press not found. Installing..."
+ GOPRIVATE=github.com/mvanhorn/* go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest
+ export PATH="$HOME/go/bin:$PATH"
else
- echo "printing-press binary not found."
- echo "Install with: go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest"
+ echo "printing-press binary not found and Go is not installed."
+ echo "Install Go first, then run: go install github.com/mvanhorn/cli-printing-press/cmd/printing-press@latest"
+ return 1 2>/dev/null || exit 1
fi
- return 1 2>/dev/null || exit 1
fi
# Derive scope: prefer git repo root, fall back to CWD
@@ -202,7 +206,17 @@ Before new research:
- `$PRESS_MANUSCRIPTS/<api>/*/research/*`
- `$REPO_ROOT/docs/plans/*<api>*` (legacy fallback)
3. Reuse good prior work instead of redoing it.
-4. **API Key Gate (MANDATORY STOP)** — Check for an API key and get explicit user consent before proceeding to Phase 1.
+4. **API Key Gate** — Check whether this API requires authentication, then handle accordingly.
+
+**First, determine if the API needs auth.** Use these signals:
+- The spec has no `security` or `securityDefinitions` section → likely no auth needed
+- The API is known to be public/unauthenticated (e.g., ESPN, weather APIs, public data APIs)
+- No env var matching the API name exists AND no known token pattern applies
+- Community docs or npm/PyPI wrappers describe the API as "no auth required"
+
+**If the API does NOT require auth** (public/unauthenticated), skip the key gate entirely. Proceed silently — do not ask the user about API keys for a public API. Live smoke testing in Phase 5 will work without a key.
+
+**If the API DOES require auth**, run the key gate:
Token detection order:
- GitHub: `GITHUB_TOKEN`, `GH_TOKEN`, or `gh auth token`
@@ -226,7 +240,7 @@ Token detection order:
- If the user provides a key → proceed with the key available for Phase 5.
- If the user declines → proceed without the key and display: "Live smoke testing (Phase 5) will be skipped. The CLI will still be generated and verified against mock responses."
-Always resolve the API key gate before moving to Phase 1.
+Resolve the API key gate (or skip it for public APIs) before moving to Phase 1.
## Phase 1: Research Brief
← b2b47320 feat(skills): offer to install capture tools when sniff gate
·
back to Cli Printing Press
·
fix(skills): strengthen sniff gate and add absorb gate optio 66cbbc98 →