fix(repo): stop gitignoring skills directories for non-claude tools#1405
Conversation
Skills should be checked in to version control for all tools, not just Claude. Previously, cursor/opencode/codex/copilot/kiro all had their skills directories (.cursor/skills/, .agents/skills/, .kiro/skills/) in the managed gitignore section, preventing users from committing them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The integration test expected .agents/skills/ to appear once in the gitignore; it should now expect zero occurrences since skills are no longer gitignored for any tool. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
Clean, well-scoped PR. The change correctly removes skills directories from gitignore — skills should be version-controlled across all tools, not just Claude. The implementation is sound:
- Legacy migration preserved:
migrateLegacyGitignorestill includes.cursor/skills/,.agents/skills/, and.kiro/skills/inswampPatterns(line ~1069-1077), so old gitignore files with those entries are correctly detected and migrated. Good. - DDD: Changes are properly scoped to the domain service (
RepoService) and its internal configuration constant. No aggregate or boundary violations. - Test coverage: Tests are thorough — both unit tests and integration tests updated to verify skills directories are not gitignored. The assertion pattern (
assertEquals(content.includes("skills/"), false)) is clear and correct. - No libswamp import boundary issues: Changes are entirely within the domain layer.
- No security concerns: The change actually improves the default posture by ensuring project-specific AI instructions are tracked in version control.
Blocking Issues
None.
Suggestions
- Minor test gap:
copilotis missing from thetoolsWithNoSkillsIgnorearray atsrc/domain/repo/repo_service_test.ts:998. It was in the oldGITIGNORE_TOOL_ENTRIESalongsideopencode/codex/kiro, and the multi-tool integration test at line 2338 does exercisecopilotindirectly, so this is very low risk. Adding it to the loop would make the unit test exhaustive.
There was a problem hiding this comment.
Adversarial Review
Critical / High
None.
Medium
src/domain/repo/repo_service_test.ts~line 1003: ThetoolsWithNoSkillsIgnorearray lists["cursor", "opencode", "codex", "kiro"]but omitscopilot, which was one of the five tools that previously had a skills gitignore entry. Thecopilottool does get partial coverage in the shared-dir dedup test at line 2338 (which testsopencode + codex + copilottogether), but there's no standalone test verifying that acopilot-only init produces noskills/in.gitignore. Minor gap — the logic is clearly correct sinceGITIGNORE_TOOL_ENTRIESno longer has acopilotkey, but adding"copilot"to that array would make the test suite more thorough.
Low
None.
Verdict
PASS — Clean, well-scoped change. The GITIGNORE_TOOL_ENTRIES removal is correct: skills directories for non-Claude tools are no longer gitignored, while legacy migration patterns in migrateLegacyGitignore still recognize the old entries (.cursor/skills/, .agents/skills/, .kiro/skills/) so users upgrading from older versions get a clean migration. The generateGitignoreSectionBody logic with seenEntries dedup still works correctly — it just has fewer entries to process (only claude). Tests are updated to assert the new behavior (skills directories absent from .gitignore). No logic errors, no resource leaks, no security concerns.
Summary
.cursor/skills/,.agents/skills/,.kiro/skills/) fromGITIGNORE_TOOL_ENTRIESso they are no longer gitignored duringrepo init/repo upgrade.claude/skills/)Test plan
deno check)deno lint)swamp repo init --tool cursorno longer includes.cursor/skills/in.gitignoreswamp repo upgradeon existing repo removes skills from managed gitignore section🤖 Generated with Claude Code