Skip to content

skill.md still rejects Homebrew python@3.x shebang (@ allowlist) — incomplete fix vs #473 / #1392 #1586

Description

@SUDARSHANCHAUDHARI

graphify: v0.9.4 (branch v8) · macOS · graphify installed into Homebrew Python (/opt/homebrew/opt/python@3.13/bin/python3.13), not uv tool

Summary

The generated Claude Code skill resolves the Python interpreter to bare python3 (Xcode Command Line Tools), which lacks graphify, so every step fails with ModuleNotFoundError: graphify. Root cause is the @-rejecting allowlist at graphify/skill.md:80 and :632:

case "$_SHEBANG" in
    *[!a-zA-Z0-9/_.-]*) ;;      # rejects /opt/homebrew/opt/python@3.13/...
    *) "$_SHEBANG" -c "import graphify" 2>/dev/null && PYTHON="$_SHEBANG" ;;
esac

Homebrew installs versioned Python under python@3.13, so the interpreter shebang legitimately contains @. The guard treats @ as unsafe, skips the valid interpreter, and falls through to python3.

Why the existing fixes don't cover this

So this is an incomplete-fix / gap rather than a fresh discovery: the @ allowlist was fixed for hooks (#473) but the same pattern still ships in the skill template in v0.9.4.

Repro

  1. "$(brew --prefix python@3.13)/bin/python3.13" -m pip install graphifyy (so which graphify's shebang contains @)
  2. Run /graphify . in Claude Code
  3. Step 1 writes python3 into graphify-out/.graphify_python; all subsequent steps fail with ModuleNotFoundError: graphify

Fix

Allow @ in both guards (skill.md:80, :632), matching the intent of #473:

-        *[!a-zA-Z0-9/_.-]*) ;;
+        *[!a-zA-Z0-9/_.@-]*) ;;
-        case "$PYTHON" in *[!a-zA-Z0-9/_.-]*) PYTHON="python3" ;; esac
+        case "$PYTHON" in *[!a-zA-Z0-9/_.@-]*) PYTHON="python3" ;; esac

Verified locally: after this change detection resolves to /opt/homebrew/opt/python@3.13/bin/python3.13 and import graphify succeeds. The root fix belongs in the skill generator/template so it isn't regenerated away on the next graphify claude install. @ is safe in a filesystem path used only as an exec target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions