feat(setup): honor CLAUDE_CONFIG_DIR for Claude install path#1276
Open
ramarivera wants to merge 2 commits intogarrytan:mainfrom
Open
feat(setup): honor CLAUDE_CONFIG_DIR for Claude install path#1276ramarivera wants to merge 2 commits intogarrytan:mainfrom
ramarivera wants to merge 2 commits intogarrytan:mainfrom
Conversation
- 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.
There was a problem hiding this comment.
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}"tosetupand use it for the fallback Claude skills symlink target. - Add the same
CLAUDE_HOMEresolution tobin/gstack-uninstalland use it for removal/confirmation paths. - Document
CLAUDE_CONFIG_DIRusage 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 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}" |
| > 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Need help on this PR? Tag
@codesmithwith what you need.