Skip to content

fix: use $HOME instead of ~ for browse/design binary paths#843

Open
mvanhorn wants to merge 1 commit intogarrytan:mainfrom
mvanhorn:fix/785-use-home-instead-of-tilde
Open

fix: use $HOME instead of ~ for browse/design binary paths#843
mvanhorn wants to merge 1 commit intogarrytan:mainfrom
mvanhorn:fix/785-use-home-instead-of-tilde

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Apr 5, 2026

Summary

Changes browseDir and designDir in buildHostPaths() (scripts/resolvers/types.ts:40-41) to use $HOME instead of ~. Regenerates all 16 affected SKILL.md files.

Problem

Claude Code's bash safety heuristic fires a permission prompt on every browse/design command:

Tilde in assignment value — bash may expand at assignment time

This triggers on the generated pattern B=~/.claude/skills/gstack/browse/dist/browse in every SKILL.md that uses the browser. Frequent interruptions during /browse, /qa, /design-review, and 14 other skills.

Changes

One source change in scripts/resolvers/types.ts:

-        browseDir: `${root}/browse/dist`,
-        designDir: `${root}/design/dist`,
+        browseDir: `$HOME/${config.globalRoot}/browse/dist`,
+        designDir: `$HOME/${config.globalRoot}/design/dist`,

skillRoot and binDir stay with ~ because they appear in command substitution and prose contexts that don't trigger the heuristic.

Testing

337/338 gen-skill-docs tests pass. The 1 failure is a pre-existing VERSION/package.json mismatch (#399), unrelated to this change. Verified:

  • Zero B=~/ or D=~/ patterns remain in generated SKILL.md files
  • skillRoot paths still use ~ (test expectations at gen-skill-docs.test.ts:1742/1750 preserved)
  • Only Claude host affected (other hosts use usesEnvVars: true, unaffected by this path)

Fixes #785

This contribution was developed with AI assistance (Codex).

Claude Code's bash safety heuristic fires a permission prompt on every
browse/design command because tilde in variable assignments triggers
"Tilde in assignment value" warnings.

Change browseDir and designDir in buildHostPaths() to use $HOME instead
of ~. Keep skillRoot and binDir with tilde since they appear in command
substitution and prose contexts that don't trigger the heuristic.

Fixes garrytan#785
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.

Use $HOME instead of ~ in SKILL.md browse binary assignment

1 participant