Skip to content

Skill-frontmatter PreToolUse hooks broken on Claude Code 2.1.162 (${CLAUDE_SKILL_DIR} not populated) #1871

Closed

Description

@omariani-howdy

gstack skill-frontmatter PreToolUse hooks (guard, freeze, careful) use ${CLAUDE_SKILL_DIR}, which Claude Code 2.1.162 does not populate in the skill-hook execution env — it expands to empty, so e.g. guard's Edit hook runs bash /../freeze/bin/check-freeze.sh and errors on every Edit/Write (Bash for careful). Fix: use an absolute/$HOME-anchored path, or a variable CC actually provides to skill hooks, instead of ${CLAUDE_SKILL_DIR}.

Activity

  1. garrytan commented on Jun 8, 2026

    @garrytan
    Owner

    Fixed in #1911 (v1.57.6.0). The guard/freeze/careful PreToolUse hooks no longer rely on ${CLAUDE_SKILL_DIR} (unset on Claude Code 2.1.162); they're anchored to the installed checkout path so Edit/Write/Bash stop erroring. Thanks @omariani-howdy. Auto-closes on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions