Describe the bug
Claude Code supports a custom location for settings instead of ~/.claude, via the CLAUDE_CONFIG_DIR environment variable. When installing a skill, gh skill ignores that variable and hardcodes ~/.claude instead for user-level installation, which results in the installed skills being ignored by Claude Code.
Affected version
gh version 2.91.0 (2026-04-22)
https://github.com/cli/cli/releases/tag/v2.91.0
Steps to reproduce the behavior
-
Install a skill
gh skill install anthropics/skills \
algorithmic-art@b9e19e6f44773509fbdd7001d77ff41a49a486c1 \
--agent claude-code --scope user
-
Try to use the skill
$ claude -p '/algorithmic-art'
Unknown command: /algorithmic-art
Expected vs actual behavior
I expect the skill to be installed in $CLAUDE_CONFIG_DIR/skills, which defaults to ~/.claude/skills if $CLAUDE_CONFIG_DIR is not set.
Actual behaviour: skills are always installed in ~/.claude/skills.
Logs
$ env | grep CLAUDE_CONFIG_DIR
CLAUDE_CONFIG_DIR=/home/benjamin/.config/claude
$ GH_DEBUG=true gh skill install anthropics/skills algorithmic-art@b9e19e6f44773509fbdd7001d77ff41a49a486c1 --agent claude-code --scope user
Resolving version ⣾* Request at 2026-04-22 11:27:09.484835979 -0700 PDT m=+0.025141067
-->8-- snip
✓ Installed algorithmic-art (from anthropics/skills@b9e19e6f44773509fbdd7001d77ff41a49a486c1) in .claude/skills
-->8-- snip
Describe the bug
Claude Code supports a custom location for settings instead of
~/.claude, via theCLAUDE_CONFIG_DIRenvironment variable. When installing a skill,gh skillignores that variable and hardcodes~/.claudeinstead for user-level installation, which results in the installed skills being ignored by Claude Code.Affected version
Steps to reproduce the behavior
Install a skill
gh skill install anthropics/skills \ algorithmic-art@b9e19e6f44773509fbdd7001d77ff41a49a486c1 \ --agent claude-code --scope userTry to use the skill
Expected vs actual behavior
I expect the skill to be installed in
$CLAUDE_CONFIG_DIR/skills, which defaults to~/.claude/skillsif$CLAUDE_CONFIG_DIRis not set.Actual behaviour: skills are always installed in
~/.claude/skills.Logs