claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Skills Created in Project Directory Instead of User Directory (WSL)

Open GoldenG177 opened this issue 11 months ago • 1 comments

Claude Code Supplementary Report: Skills Created in Project Directory Instead of User Directory

Date: 2026-01-03 Product: Claude Code (CLI) Related Issues: #15993, #16162, #15950


Summary

Claude Code creates skills in the project-level directory (.claude/skills/) instead of the user-level directory (~/.claude/skills/), despite documentation indicating user-level skills have higher priority and are intended for cross-project reuse.

This is part of a broader pattern of context/resource handling issues in WSL environments.


Environment

  • Claude Code version: CLI (latest as of 2026-01-03)
  • OS: Windows 11 + WSL2 (Ubuntu)
  • Working directory: WSL path mounted from Windows

Expected Behavior (Per Documentation)

Skills resolution hierarchy (highest to lowest priority):

  1. Enterprise (organization-wide)
  2. Personal/User (~/.claude/skills/)
  3. Project (.claude/skills/)
  4. Plugin (bundled with plugins)

User-level skills are documented as:

  • Available across all projects
  • Higher priority than project skills
  • Intended for personal, reusable skills

Actual Behavior

When Claude Code creates skills:

  • Skills are created in .claude/skills/ (project directory)
  • No ~/.claude/skills/ directory is created
  • User is not prompted for preferred location
  • Skills remain project-scoped instead of cross-project available

Observed state:

~/.claude/skills/          # Did not exist until manually created
~/.claude/agents/          # Exists with 21 user-level agents
.claude/skills/            # Contains 5 skills (project-level)
.claude/agents/            # Contains project-specific agents

Inconsistency with Agents

Resource User-Level Created? Project-Level Created?
Agents Yes (~/.claude/agents/) Yes (.claude/agents/)
Skills No Yes (.claude/skills/)

Agents correctly use both locations. Skills only use project location.


Relationship to Other Issues

Issue Problem Connection
#15993 Spawned agents don't inherit protocol context Skills also not inherited by subagents
#16162 Model overrides protocols when context IS present Resource location affects context availability
#15950 Claude violates CLAUDE.md rules May be exacerbated by fragmented resource locations

Common thread: Resources (context, skills, protocols) are not consistently available where expected, whether due to inheritance issues or storage location issues.


WSL-Specific Consideration

In WSL environments:

  • ~/.claude/ resolves to /home/username/.claude/ (Linux filesystem)
  • Project .claude/ may resolve to /mnt/c/.../.claude/ (Windows filesystem via mount)

Claude Code may be defaulting to the Windows-mounted project path instead of the native Linux user path for skill creation.


Workaround Applied

mkdir -p ~/.claude/skills
cp -r /project/.claude/skills/* ~/.claude/skills/

After manual copy, skills exist in both locations and user-level takes precedence per documented hierarchy.


Suggested Fix

  1. Prompt user when creating skills: "Create as personal skill (~/.claude/skills/) or project skill (.claude/skills/)?"
  2. Default to user-level for skills that aren't explicitly project-specific
  3. Ensure WSL path handling correctly resolves ~ to Linux home, not Windows mount
  4. Mirror agent behavior - if agents create both user and project locations, skills should too

Additional Finding: Skill Inheritance

Per documentation: "Subagents do NOT automatically inherit your Skills from the main conversation."

This means even if skills are correctly located, they won't be available to Task agents unless explicitly passed. This compounds the context inheritance issue reported in #15993.


Report Prepared By: Claude Code (at user request) Related Documentation: Claude Code Skills documentation confirms user-level should have higher priority

GoldenG177 avatar Jan 03 '26 14:01 GoldenG177

This is NOT a duplicate of the flagged issues.

#8059, #2901, #7777 = MODEL ignoring instructions in CLAUDE.md (behavioral issue)

#16165 (this issue) = CLAUDE CODE CLI storing skills in wrong filesystem location (application file handling)

This issue is about:

  • Skills created in project directory instead of user directory
  • Inconsistent with how agents are handled (agents use both locations correctly)
  • WSL path resolution - tilde should resolve to Linux home not Windows mount
  • The documented skill hierarchy shows user-level should have higher priority

Different category entirely: Application file storage vs Model instruction compliance.

GoldenG177 avatar Jan 03 '26 15:01 GoldenG177

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Feb 04 '26 10:02 github-actions[bot]

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Feb 18 '26 10:02 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Feb 26 '26 14:02 github-actions[bot]