Skip to content

gh skill ignores CLAUDE_CONFIG_DIR #13262

Description

@bewuethr

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

  1. Install a skill

    gh skill install anthropics/skills \
        algorithmic-art@b9e19e6f44773509fbdd7001d77ff41a49a486c1 \
        --agent claude-code --scope user
  2. 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

Metadata

Metadata

Assignees

Labels

enhancementa request to improve CLIgh-skillrelating to the gh skill command

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions