Skip to content

[Bug]: Claude Code cannot read globally installed skills from ~/.agents/skills #693

Description

@zhangxy-zju

Description

When installing skills globally with Claude Code selected, skills are installed to ~/.agents/skills (canonical location), but Claude Code cannot read them because it looks for skills in ~/.claude/skills.

Steps to Reproduce

  1. Install a skill globally: npx skills add <source> -g
  2. Select Claude Code as the agent
  3. The skill is installed to ~/.agents/skills/
  4. Claude Code cannot discover the skill because it reads from ~/.claude/skills/

Expected Behavior

Claude Code should be able to read globally installed skills from ~/.agents/skills, similar to other universal agents like Cline, Codex, Cursor, etc.

Actual Behavior

Skills installed to ~/.agents/skills are not discoverable by Claude Code.

Root Cause

The isUniversalAgent() function only checks if skillsDir === '.agents/skills' for project-level, but doesn't consider the global case where an agent's globalSkillsDir points to the canonical ~/.agents/skills.

Claude Code's configuration:

  • skillsDir: '.claude/skills' (project-level, non-universal)
  • globalSkillsDir: '~/.claude/skills' (was pointing to a different directory than canonical)

Solution

  1. Update claude-code's globalSkillsDir to ~/.agents/skills
  2. Modify isUniversalAgent() to accept a global parameter and check if globalSkillsDir === ~/.agents/skills
  3. Update related functions (getUniversalAgents, getNonUniversalAgents, etc.) to support the global context

Version

1.4.5

Operating System

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions