Skip to content

fix: hook printf + plugin.json homepage#4

Merged
sahrizvi merged 1 commit into
mainfrom
fix/hook-printf-and-homepage
Jul 17, 2026
Merged

fix: hook printf + plugin.json homepage#4
sahrizvi merged 1 commit into
mainfrom
fix/hook-printf-and-homepage

Conversation

@sahrizvi

Copy link
Copy Markdown
Collaborator

Follow-up to #2. Three cleanup items surfaced during review of the sibling altimate-codex-plugin PR #2 that also apply here but weren't included in this repo's earlier PR.

What changed

  • plugins/altimate-code/hooks-handlers/session-start.sh: replaced cat <<'EOF' here-doc with printf lines. The here-doc form can fail in restricted sandboxes that refuse to create the temporary file a here-doc needs (cannot create temp file for here document: Operation not permitted). printf has no such dependency. Output is byte-identical when parsed as JSON.
  • Same file: dropped the redundant trailing exit 0 — bash exits with the status of the last command by default.
  • plugins/altimate-code/.claude-plugin/plugin.json: homepage moved from https://altimate.ai to the repo URL. The previous value was redundant with author.url and hid the direct source link a marketplace browser would expect.

Verification

  • bash -n clean on the hook.
  • Running the hook produces valid JSON, hookSpecificOutput.hookEventName == "SessionStart".
  • The "Claude" reference in additionalContext is preserved intentionally — this IS the Claude plugin, so the reference is factually correct here. On the sibling codex and opencode plugins the same reference was factually wrong (agent-facing content in a non-Claude host) and had to be scrubbed.

What's explicitly NOT changed

  • SKILL.md and commands/altimate.md — already fixed in the merged #2 (heredoc-quoted user task + mktemp for output).
  • The description or body language — no scope changes; this is a mechanical hardening pass.

Three cleanup items surfaced during review of the sibling
altimate-codex-plugin (PR #2) that also apply here but weren't
included in this repo's PR #2:

- **Hook script: `cat <<'EOF'` → `printf` lines.** The here-doc form
  can fail in restricted sandboxes that refuse to create the temporary
  file a here-doc needs (`cannot create temp file for here document:
  Operation not permitted`). `printf` has no such dependency. Output
  is byte-identical when parsed as JSON.
- **Hook script: drop the redundant trailing `exit 0`.** Bash exits
  with the status of the last command by default; the explicit `exit`
  adds no signal.
- **plugin.json: `homepage` → repo URL.** The previous value
  (`https://altimate.ai`) was redundant with `author.url` and hid the
  direct source link a marketplace browser would expect.

Verified: `bash -n` clean; running the hook produces valid JSON whose
`hookSpecificOutput.hookEventName == "SessionStart"` and preserves the
"Claude" reference in `additionalContext` (this IS the Claude plugin,
so the reference is factually correct here — unlike the sibling codex
and opencode plugins where the same reference was factually wrong and
had to be scrubbed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sahrizvi
sahrizvi merged commit f81c9b2 into main Jul 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant