Skip to content

Claude install exposes full repo under skill discovery root #1202

Closed

Description

@ofnullable

Problem

Claude installs currently document and support cloning the full gstack repo into ~/.claude/skills/gstack.

That path is also under Claude's skill discovery tree. Because the full repo contains generated/source skill artifacts for multiple hosts, Claude can recursively discover host-specific nested SKILL.md files that were never meant to be Claude skills, for example openclaw/skills/*/SKILL.md.

This is the same class of problem fixed for Codex in #235 / #346: the host skill discovery root should not contain the full source checkout.

Expected behavior

Claude's skill root should contain only Claude-discoverable skills plus a minimal gstack/ runtime sidecar for shared assets.

Desired layout:

~/.gstack/repos/gstack/          # full gstack checkout
~/.claude/skills/<skill>/        # top-level Claude skills only
~/.claude/skills/gstack/         # runtime assets only, no nested host SKILL.md files

Why it matters

Users invoking a normal Claude skill like /office-hours should not see OpenClaw/Hermes/Codex host setup behavior leak into Claude skill discovery. The current layout mixes source checkout, generated host artifacts, and runtime sidecar files in one recursive discovery tree.

Proposed fix

  • Migrate direct Claude installs from ~/.claude/skills/gstack to ~/.gstack/repos/gstack.
  • Recreate ~/.claude/skills/gstack as a runtime-only sidecar with bin/, browse/, design/, review/, qa/, and ETHOS.md symlinks.
  • Keep actual Claude skills as top-level ~/.claude/skills/<skill>/SKILL.md entries.
  • Update install docs and team-mode instructions to clone/run setup from ~/.gstack/repos/gstack.
  • Add regression coverage proving the Claude sidecar exposes no nested SKILL.md files.

Activity

  1. skyzer commented on May 31, 2026

    @skyzer

    I hit this from the Cursor side and implemented the exact layout proposed here on a real machine (global Claude install, gstack v1.44 → relocated to ~/.gstack/repos/gstack). Sharing confirmation + a few implementation notes, and offering to send the PR.

    The proposed layout works end-to-end. Moving the checkout to ~/.gstack/repos/gstack and keeping only top-level ~/.claude/skills/<skill>/ aliases dropped the recursively-scanned catalog from 613 → 77 SKILL.md under ~/.claude/skills. 477 of the removed entries were exactly the gitignored host mirrors (.cursor/.hermes/.kiro/.openclaw/.opencode/.slate/.factory/.gbrain/.agents) — i.e. this is the same root cause as #1694. The top-level aliases and the Codex runtime all re-resolved cleanly to the new path.

    A few notes for whoever implements it (happy to be that person):

    1. The Codex relocation is a drop-in template. migrate_direct_codex_install() (setup, ~L225) already does precisely this for Codex, so a migrate_direct_claude_install() mirror is the natural shape.

    2. /gstack-upgrade already handles the relocated layout for free. Its detection (gstack-upgrade/SKILL.md L89–94) checks ~/.claude/skills/gstack/.git first, then ~/.gstack/repos/gstack/.git. Because the relocated sidecar has no .git, upgrade resolves to the moved repo automatically — no upgrade changes needed. One constraint: the sidecar must keep its bin/ symlink, since /gstack-upgrade and ~9 bin/ scripts hard-code ~/.claude/skills/gstack/bin/….

    3. "Zero nested SKILL.md" needs care — the Codex sidecar doesn't fully meet it today. The Codex runtime root curates browse/, review/, qa/, design/ to exclude their SKILL.md, but still exposes two: gstack/SKILL.md and gstack/gstack-upgrade/SKILL.md. Worth making the Claude sidecar truly zero and asserting that in the regression test this issue asks for.

    4. This and #1694 are really one fix, and it has to span every host runtime root. Per Cursor's skills docs, Cursor "walks the skills root recursively" across ~/.cursor/skills, ~/.agents/skills, and (for compatibility) ~/.claude/skills + ~/.codex/skills — with no .cursorignore/exclude mechanism for discovery. So even after relocating the Claude tree, Cursor (and the cursor-agent CLI noted in #1694, which hard-freezes with NGHTTP2_ENHANCE_YOUR_CALM rather than degrading gracefully) still recursively scans the Codex and other host runtimes. A shared "runtime sidecar with no nested SKILL.md" builder + one regression test applied across all host roots would close #1202 and #1694 together.

    I have this working locally and can open a PR mirroring migrate_direct_codex_install unless someone's already on it.

  2. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej — recommend closing this issue. The checkout is still exposed under a discovery root, and #1819 only partially addresses the problem. It should close only after a corrected #1819 lands with safe sidecar migration, complete runtime behavior, and tests. Please retain the scanner-exposure and runtime-read requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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