Skip to content

feat(claudecode): discover nested .claude/skills directories on import - #2555

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2497-claudecode-nested-skills
Aug 1, 2026
Merged

feat(claudecode): discover nested .claude/skills directories on import#2555
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2497-claudecode-nested-skills

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Resolves #2497 (its import half, which the issue itself calls the stronger one): Claude Code v2.1.178+ loads skills from nested .claude/skills/ directories below the working directory, but rulesync import --targets claudecode --features skills scanned only the fixed root — an existing apps/web/.claude/skills/deploy/SKILL.md was silently invisible.

  • ClaudecodeSkill.getConfiguredImportRoots now globs for nested .claude/skills directories (project scope only; symlinks not followed; hidden-dir, dependency-tree and root build/vendor exclusions shared with the nested AGENTS.md scan) and feeds them into the existing configured-import-roots pipeline — which is import-only and lenient by construction (never managed for generation or orphan deletion, skip-and-warn on broken skills).
  • Name clash with a root skill: the root skill wins the import — rulesync's flat skill namespace cannot express Claude Code's directory-qualified apps/web:deploy variant. Documented.
  • Generation deliberately unchanged: the issue's own severity caveat notes the paths frontmatter already covers subtree-scoped activation, and --output-roots <subdir> covers physical co-location; the new docs note spells out both.

Testing

  • Processor-level test: nested skill imported, root-vs-nested name clash resolved to the root skill, node_modules skill never scanned; ClaudecodeSkill unit tests unaffected.
  • pnpm cicheck green.

Closes #2497

🤖 Generated with Claude Code

cm-dyoshikawa and others added 2 commits July 31, 2026 20:48
Claude Code v2.1.178 loads skills from nested .claude/skills/
directories below the working directory, but rulesync import scanned
only the fixed project root (plus .claude/scheduled-tasks), so an
existing apps/web/.claude/skills/deploy/SKILL.md was silently invisible
- lossy import against a documented upstream location, the stronger
half of #2497.

- ClaudecodeSkill.getConfiguredImportRoots globs for nested
  .claude/skills directories (project scope only, symlinks not
  followed, hidden dirs and the shared nested-scan exclusions applied)
  and feeds them into the existing configured-import-roots pipeline,
  which is import-only and lenient by construction. On a name clash the
  root skill wins (rulesync's flat namespace cannot express Claude
  Code's directory-qualified variant); a dependency-tree skill is never
  scanned.
- Generation deliberately stays targeted at the project-root
  .claude/skills/: the paths frontmatter covers subtree-scoped
  activation and --output-roots covers physical co-location, both
  documented in the new nested-skills docs note.

Closes #2497

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nistically

Review follow-ups on PR #2555: the nested-skill scan now passes
discovered roots through filterOutPathsInGitIgnoredDirectories (a
gitignored scratch checkout's skills are somebody else's project and
must not enter the shared .rulesync/skills namespace - true parity with
the nested AGENTS.md scan), and sorts them so a nested-vs-nested name
clash resolves deterministically. Test fixtures gain the depth-1 and
root-build-dir cases the glob semantics hinge on.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit 78166c3 into main Aug 1, 2026
9 checks passed
@dyoshikawa

Copy link
Copy Markdown
Owner Author

@dyoshikawa Thank you!

@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-2497-claudecode-nested-skills branch August 1, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow up Claude Code upstream updates: nested .claude/skills/ directories (v2.1.178) not generated or imported

2 participants