Skip to content

Long skill paths break git clone on Windows (MAX_PATH 260) — shorten .cyberstrike/skill/** directory names #108

Description

@badchars

Summary

Some skill files under .cyberstrike/skill/** have paths long enough to break git clone on Windows, which enforces a 260-character MAX_PATH by default. Users on Windows get Filename too long and cannot check the repo out.

Measurements (origin/main, 11,090 files)

Repo-relative path length Affected skills
> 260 chars 1 (breaks on any Windows clone — C:\ + 267 > 260)
> 240 4
> 200 9
> 180 24
> 150 540

Longest path: 267 chars.

The practical danger threshold is well below 260, because the full path on checkout is <clone-dir>\<repo-relative-path> and the clone-dir prefix (e.g. C:\Users\<user>\...\CyberStrike\) already consumes ~40–60 chars. So repo-relative paths above ~200 fail in typical clone locations, and the count grows toward 540 for deeper clone directories.

Where the long paths are (paths > 150)

  • CIS_benchmarks/Cloud_Providers — 441 (largest source)
  • NIST/SP800-171_rev3 — ~32
  • CIS_benchmarks/Server_Software — 26
  • NIST/SP800-53_rev5 — 19
  • NIST/SP800-218_SSDF — 18
  • NIST/CSF_v2.0 — 4

The long component is the leaf skill directory name, which uses the full human-readable control title (up to ~150 chars), on top of deep nesting.

Key fact that makes this safe to fix

Skills are identified by their frontmatter name and discovered by globbing SKILL.md (see packages/cyberstrike/src/skill/skill.tsname is parsed from frontmatter; skill load <name> / skill search use the name). The directory name is just storage. So directories can be renamed/shortened without changing skill identity, search, or loading — as long as the SKILL.md frontmatter name is preserved.

Proposed shortening strategy

Target: keep every repo-relative path under ~120–150 chars, so the repo clones on Windows regardless of clone location.

  1. Abbreviate intermediate directory names (mechanical, whole-tree savings):
    • PW_produce-well-secured-softwarePW
    • SP800-218_SSDFSSDF, SP800-171_rev3800-171
    • 03.13_system-and-communications-protection03-13
    • shorten the CIS_benchmarks/Cloud_Providers/... intermediate levels
  2. Cap the leaf skill directory name at a fixed max (e.g. 60–80 chars) via a deterministic slug built from the control ID + a truncated title, e.g.
    Configure the Compilation, Interpreter, and Build Processes to Improve Executable Securityconfigure-build-processes (or PW-6-configure-build).
    The full title stays in SKILL.md name/description frontmatter, so nothing is lost and search still works.
  3. Automate with a one-time script that git mvs the affected directories using the deterministic slug; SKILL.md contents are untouched.
  4. Verify no code/docs reference skills by directory path (the loader uses the frontmatter name; confirm no path-based references remain).

Scope options:

  • Minimum: shorten the 9 skills > 200 (the guaranteed breakers).
  • Recommended: shorten everything > ~150 (≈540 skills, dominated by CIS Cloud Providers) so clones succeed from any Windows directory.

Stopgap for users (until the repo fix lands)

  • git config --global core.longpaths true (requires Windows long-path support / may need admin), or clone into a very short directory (e.g. C:\cs). Note: the single 267-char path exceeds 260 even at a drive root, so these workarounds are partial — the repo-side shortening is the real fix.

Impact

Windows users cannot reliably git clone the repository. Since a large share of the long paths are auto-generated benchmark skills (CIS Cloud Providers), a scripted rename can fix all of them at once.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions