Skip to content

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

Closed

Description

@bradleylab

Problem

All SKILL.md files that reference the browse binary use this pattern:

[ -z "$B" ] && B=~/.claude/skills/gstack/browse/dist/browse

Claude Code's built-in bash safety checks flag this with a permission prompt:

Tilde in assignment value — bash may expand at assignment time

This fires on every browse command, which means frequent interruptions during any skill that uses the browser (browse, qa, design-review, etc.).

Fix

Replace ~ with $HOME in all 15+ SKILL.md files:

[ -z "$B" ] && B="$HOME/.claude/skills/gstack/browse/dist/browse"

This is functionally identical (both resolve to the user's home directory) but avoids the Claude Code heuristic warning.

Affected files

Every SKILL.md that sets B=~/.claude/skills/gstack/browse/dist/browse:

  • browse/SKILL.md
  • qa/SKILL.md
  • qa-only/SKILL.md
  • design-review/SKILL.md
  • design-consultation/SKILL.md
  • design-shotgun/SKILL.md
  • design-html/SKILL.md
  • canary/SKILL.md
  • benchmark/SKILL.md
  • land-and-deploy/SKILL.md
  • office-hours/SKILL.md
  • plan-design-review/SKILL.md
  • setup-browser-cookies/SKILL.md
  • connect-chrome/SKILL.md
  • SKILL.md (root)

Activity

  1. vincent067 commented on Apr 3, 2026

    @vincent067

    Hey there! 👋

    I'd love to help with this issue! I noticed the same annoying prompts while using Claude Code with gstack skills.

    I've prepared a fix script that replaces all instances of ~ with $HOME in the SKILL.md files:

    #!/bin/bash
    # Fix for issue #785: Replace ~ with $HOME in SKILL.md files
    
    find . -name "SKILL.md" -type f | while read -r file; do
        if grep -q 'B=~/.claude/skills/gstack/browse/dist/browse' "$file"; then
            echo "Fixing: $file"
            sed -i 's/B=~\/.claude\/skills\/gstack\/browse\/dist\/browse/B="$HOME\/.claude\/skills\/gstack\/browse\/dist\/browse"/g' "$file"
        fi
    done

    Alternatively, here's a one-liner that does the same:

    find . -name "SKILL.md" -type f -exec sed -i 's/B=~\/.claude\/skills\/gstack\/browse\/dist\/browse/B="$HOME\/.claude\/skills\/gstack\/browse\/dist\/browse"/g' {} +

    Affected files I found:

    • browse/SKILL.md
    • qa/SKILL.md
    • qa-only/SKILL.md
    • design-review/SKILL.md
    • design-consultation/SKILL.md
    • design-shotgun/SKILL.md
    • design-html/SKILL.md
    • canary/SKILL.md
    • benchmark/SKILL.md
    • land-and-deploy/SKILL.md
    • office-hours/SKILL.md
    • plan-design-review/SKILL.md
    • setup-browser-cookies/SKILL.md
    • connect-chrome/SKILL.md
    • SKILL.md (root)

    Happy to submit a PR if you'd prefer! Just let me know 😊

    Testing note: The $HOME variable is guaranteed to be set in POSIX-compliant shells, so this should work reliably across macOS and Linux.

  2. vincent067 commented on Apr 3, 2026

    @vincent067

    Hey there! 👋

    I'd love to help with this issue! I noticed the same annoying prompts while using Claude Code with gstack skills. The tilde warning is definitely disruptive to the flow.

    I've prepared a fix script that replaces all instances of ~ with $HOME in the SKILL.md files:

    #!/bin/bash
    # Fix for issue #785: Replace ~ with $HOME in SKILL.md files
    
    find . -name "SKILL.md" -type f | while read -r file; do
        if grep -q 'B=~/.claude/skills/gstack/browse/dist/browse' "$file"; then
            echo "Fixing: $file"
            sed -i 's/B=~\/.claude\/skills\/gstack\/browse\/dist\/browse/B="$HOME\/.claude\/skills\/gstack\/browse\/dist\/browse"/g' "$file"
        fi
    done

    Alternatively, here's a one-liner that does the same:

    find . -name "SKILL.md" -type f -exec sed -i 's/B=~\/.claude\/skills\/gstack\/browse\/dist\/browse/B="$HOME\/.claude\/skills\/gstack\/browse\/dist\/browse"/g' {} +

    Testing note: The $HOME variable is guaranteed to be set in POSIX-compliant shells, so this should work reliably across macOS and Linux. 🙏

    Happy to submit a PR if you'd prefer! Just let me know 😊

  3. added a commit that references this issue on Apr 5, 2026
    c685c49
  4. mvanhorn commented on Apr 5, 2026

    @mvanhorn
    Contributor

    Implemented in #843 - changes browseDir/designDir in buildHostPaths() to use $HOME instead of ~, then regenerates all SKILL.md files.

  5. garrytan commented on Apr 9, 2026

    @garrytan
    Owner

    Addressed by #843

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions