Skip to content

fix(sync): correct skill directory tracking in state#11

Merged
christso merged 1 commit intomainfrom
fix/skill-directory-tracking
Jan 24, 2026
Merged

fix(sync): correct skill directory tracking in state#11
christso merged 1 commit intomainfrom
fix/skill-directory-tracking

Conversation

@christso
Copy link
Copy Markdown
Contributor

Summary

  • Fix dead code in collectSyncedPaths that never tracked skill directories correctly
  • The condition !relativePath.includes('/') was never true for skill paths like .claude/skills/my-skill
  • Now correctly extracts skill name and checks if it's a directory (no nested /)

Changes

File Change
src/core/sync.ts Fix skill directory detection logic
tests/unit/core/sync.test.ts Add 2 tests for skill tracking

Test Plan

  • Verify skill directories tracked with trailing / in state
  • Verify skill directory purged when plugin removed
  • All existing tests pass (133 total)

🤖 Generated with Claude Code

The condition `!relativePath.includes('/')` was never true for skill
paths like `.claude/skills/my-skill` because they always contain `/`.

Fix: Extract the skill name after the skillsPath prefix and check if
that portion contains `/` to distinguish skill directories from files.

This enables efficient `rm -rf` on skill directories during purge
instead of deleting individual files.

Added tests:
- Verify skill directories tracked with trailing `/` in state
- Verify skill directory purged when plugin removed
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying allagents with  Cloudflare Pages  Cloudflare Pages

Latest commit: 414c235
Status: ✅  Deploy successful!
Preview URL: https://75e99e75.allagents.pages.dev
Branch Preview URL: https://fix-skill-directory-tracking.allagents.pages.dev

View logs

@christso christso merged commit ad2e73d into main Jan 24, 2026
1 check passed
@christso christso deleted the fix/skill-directory-tracking branch January 24, 2026 22:59
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.

1 participant