Support custom CLAUDE_CONFIG_DIR in install#13523
Open
tommaso-moro wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Claude Code user-scope skill installation path resolution to honor CLAUDE_CONFIG_DIR, so user-scope operations (gh skill install/list/update) use $CLAUDE_CONFIG_DIR/skills when set and otherwise fall back to ~/.claude/skills.
Changes:
- Add
CLAUDE_CONFIG_DIRhandling in the shared agent registryInstallDirresolver forclaude-codeuser scope. - Add registry tests covering both default Claude Code user-scope path and the
CLAUDE_CONFIG_DIRoverride. - Add an install regression test ensuring user-scope installs for
claude-codewrite under$CLAUDE_CONFIG_DIR/skills(and not~/.claude/skills).
Show a summary per file
| File | Description |
|---|---|
internal/skills/registry/registry.go |
Reads CLAUDE_CONFIG_DIR for claude-code user-scope install dir resolution. |
internal/skills/registry/registry_test.go |
Adds test coverage for Claude Code user-scope dir default and env override. |
pkg/cmd/skills/install/install_test.go |
Adds regression test verifying install writes to $CLAUDE_CONFIG_DIR/skills for Claude Code user-scope. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
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.
Fixes #13262
Summary
This updates Claude Code user-scope skill directory resolution to honor
CLAUDE_CONFIG_DIRwhen it is set. User-scope installs for Claude Code now write to$CLAUDE_CONFIG_DIR/skills, falling back to the existing~/.claude/skillslocation when the environment variable is not present.The change lives in the shared agent registry path resolver so
gh skill install,gh skill list, andgh skill updateall use the same location for Claude Code user-scope skills.Tests
CLAUDE_CONFIG_DIRoverride.gh skill install --agent claude-code --scope userwrites under$CLAUDE_CONFIG_DIR/skillsand not~/.claude/skills.go test ./internal/skills/registry ./pkg/cmd/skills/....