Skip to content

feat(setup): honor CLAUDE_CONFIG_DIR for Claude install path#1276

Open
ramarivera wants to merge 2 commits intogarrytan:mainfrom
ramarivera:ramarivera/claude-config-dir
Open

feat(setup): honor CLAUDE_CONFIG_DIR for Claude install path#1276
ramarivera wants to merge 2 commits intogarrytan:mainfrom
ramarivera:ramarivera/claude-config-dir

Conversation

@ramarivera
Copy link
Copy Markdown

@ramarivera ramarivera commented Apr 29, 2026

Resolve a CLAUDE_HOME helper as ${CLAUDE_CONFIG_DIR:-$HOME/.claude} in both setup and gstack-uninstall, and use it for the fallback Claude skills directory. Default behavior is unchanged (~/.claude/skills).

When CLAUDE_CONFIG_DIR is set (e.g. ~/.config/claude), skills are installed where Claude Code actually reads them from instead of the hardcoded ~/.claude location, which is invisible to the CLI under the override. Uninstall picks them back up the same way.

Adds a short note in the Install section pointing CLAUDE_CONFIG_DIR users at the same env var.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

- setup
- bin/gstack-uninstall
- README.md

Resolve a CLAUDE_HOME helper as ${CLAUDE_CONFIG_DIR:-$HOME/.claude} in
both setup and gstack-uninstall, and use it for the fallback Claude
skills directory. Default behavior is unchanged (~/.claude/skills).

When CLAUDE_CONFIG_DIR is set (e.g. ~/.config/claude), skills are
installed where Claude Code actually reads them from instead of the
hardcoded ~/.claude location, which is invisible to the CLI under the
override. Uninstall picks them back up the same way.

Adds a short note in the Install section pointing CLAUDE_CONFIG_DIR
users at the same env var.
Copilot AI review requested due to automatic review settings April 29, 2026 17:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the install/uninstall flow to respect Claude Code’s relocated config directory via CLAUDE_CONFIG_DIR, so gstack’s Claude skills can be installed/removed from the same place Claude Code reads them.

Changes:

  • Add CLAUDE_HOME="${CLAUDE_CONFIG_DIR:-$HOME/.claude}" to setup and use it for the fallback Claude skills symlink target.
  • Add the same CLAUDE_HOME resolution to bin/gstack-uninstall and use it for removal/confirmation paths.
  • Document CLAUDE_CONFIG_DIR usage in the README install section.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
setup Introduces CLAUDE_HOME and uses it for the fallback install path when not run from a skills/ directory.
bin/gstack-uninstall Uses CLAUDE_HOME so uninstall targets the same Claude config root as setup under CLAUDE_CONFIG_DIR.
README.md Adds an install note for users who override Claude’s config directory via CLAUDE_CONFIG_DIR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup
Comment on lines 19 to +23
INSTALL_SKILLS_DIR="$(dirname "$INSTALL_GSTACK_DIR")"
BROWSE_BIN="$SOURCE_GSTACK_DIR/browse/dist/browse"
# Honor CLAUDE_CONFIG_DIR for users who relocate Claude Code's config (e.g. ~/.config/claude).
# Falls back to ~/.claude when unset, preserving the default install layout.
CLAUDE_HOME="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
Comment thread README.md Outdated
> Install gstack: run **`git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup`** then add a "gstack" section to CLAUDE.md that says to use the /browse skill from gstack for all web browsing, never use mcp\_\_claude-in-chrome\_\_\* tools, and lists the available skills: /office-hours, /plan-ceo-review, /plan-eng-review, /plan-design-review, /design-consultation, /design-shotgun, /design-html, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /connect-chrome, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /setup-gbrain, /retro, /investigate, /document-release, /codex, /cso, /autoplan, /plan-devex-review, /devex-review, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade, /learn. Then ask the user if they also want to add gstack to the current project so teammates get it.

> [!NOTE]
> **Custom `CLAUDE_CONFIG_DIR`?** If you've moved Claude Code's config (e.g. `export CLAUDE_CONFIG_DIR=~/.config/claude`), substitute that for `~/.claude` everywhere in the install/uninstall commands below. `./setup` and `gstack-uninstall` honor `CLAUDE_CONFIG_DIR` automatically — they only need the clone in the right place.
- README.md
- setup

Move the CLAUDE_CONFIG_DIR note above the install one-liner so users
read it before pasting, and reword "below" → "in this section" for
clarity (Copilot review on README.md:54).

Add a setup warning when CLAUDE_CONFIG_DIR is set but the script is
running from a clone outside $CLAUDE_HOME/skills (e.g. legacy
~/.claude/skills/gstack). Without this, the auto-detect branch happily
installs into the wrong skills dir and Claude Code never sees the
result. Skip the warning for --local and CODEX_REPO_LOCAL since those
intentionally target a different directory (Copilot review on setup:23).
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.

2 participants