garrytan / garrytan/gstack

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

Open
#1,694 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133k
Forks
19.9k
Avg merge
18h 46m
Merged PRs (30d)
26

Description

## 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:

```bash
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/`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the host-specific skill generation and the globalRoot handling in hermes.ts, then reproduce installation with gstack under ~/.claude/skills/gstack/. Verify that generated non-Claude skills stay outside Claude Code's recursive scan and that the discovered SKILL.md count no longer includes those host directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.