Skip to content

Skill files generated for other AI hosts pollute Claude Code's skill scanner #1694

@vschoener

Description

@vschoener

Problem

When gstack is installed at ~/.claude/skills/gstack/, Claude Code recursively scans the entire directory tree for SKILL.md files. The host-specific skills generated for other AI assistants (Hermes, Cursor, Kiro, OpenCode, Slate, Factory, Agents, OpenClaw) are picked up by this scanner, causing 513 SKILL.md files to be discovered instead of the expected ~49 in my situation.

Impact

Claude Code reports "N skill descriptions dropped" at session start (the exact number varies depending on which host integrations are installed — in my case it was 49–51). This happens because Claude Code hits its context window limit trying to load all the discovered skill descriptions, meaning some skills may not be properly available in the preamble.

Root cause

After installation/update, the following directories are generated inside ~/.claude/skills/gstack/:

~/.claude/skills/gstack/
├── .agents/skills/        ← 46 SKILL.md (for Agents)
├── .cursor/skills/        ← 46 SKILL.md (for Cursor)
├── .factory/skills/       ← 46 SKILL.md (for Factory)
├── .gbrain/skills/        ← 46 SKILL.md (for GBrain)
├── .hermes/skills/        ← 46 SKILL.md (for Hermes)
├── .kiro/skills/          ← 46 SKILL.md (for Kiro)
├── .openclaw/skills/      ← 46 SKILL.md (for OpenClaw)
├── .opencode/skills/      ← 46 SKILL.md (for OpenCode)
├── .slate/skills/         ← 46 SKILL.md (for Slate)
└── openclaw/skills/       ←  4 SKILL.md

These are all gitignored (correctly), but Claude Code doesn't know to ignore them.

Workaround

Manually deleting these directories reduces the count from 513 to ~95:

for dir in .agents .cursor .factory .gbrain .hermes .kiro .openclaw .opencode .slate; do
  rm -rf ~/.claude/skills/gstack/$dir/skills/
done

However, these directories are recreated on the next gstack update.

Suggested fix

One of:

  1. Move the generated host skills outside ~/.claude/skills/ — e.g., generate Hermes skills at ~/.hermes/skills/gstack/ (matching globalRoot in hermes.ts) rather than inside the gstack repo itself when it's installed under ~/.claude/skills/.

  2. Add a marker file (e.g., .claudeskillsignore or NOSKILL) in each host subdirectory so Claude Code can be taught to skip them — though this would require a Claude Code change too.

  3. Generate host-specific skills to a path outside ~/.claude/ unconditionally, regardless of where gstack is installed.

Environment

  • gstack version: v1.26.3.0
  • Claude Code version: 2.1.142
  • gstack install path: ~/.claude/skills/gstack/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions