Repository navigation
fix(anthropic-subscription): rewrite skill_roots entries to Claude skill dirs - #4566
Merged
Merged
Conversation
code-yeongyu
marked this pull request as ready for review
October 28, 2026 00:14
…-skill-roots-rewrite
…-skill-roots-rewrite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4518
What
rewriteSkillsLocations(Claude subscription lane,preset-append) rewrites the<rN>entries of the catalog's<skill_roots>table again:~/.claude/skills[/<sub>], one at or under the project skills root becomes.claude/skills[/<sub>]; every other root is untouched;rNthrough the same table;<location>rewrite for a catalog without the table is kept;path.relative), so a sibling directory such as<agent>/skills-extrais no longer treated as insideskills(the oldstartsWithcheck had no boundary).Tests
RED -> GREEN
test/suite/regressions/4518-subscription-skill-roots-rewrite.test.ts(renders a real catalog withformatSkillsForPrompt, runs it throughbuildAnthropicSubscriptionQueryOptions, reads the appended<skill_roots>):XML catalog with a roots table: global and project roots rewritten, unrelated roots untouched: RED on main (roots kept as<agent>/skills,<cwd>/.senpi/skills) -> GREENone-line catalog: ...(101 skills): RED on main -> GREENlegacy XML catalog with absolute locations: ...: green before and after (kept behavior)Rows cover the global root, a nested global root (
skills/team), the project root, an unrelated plugin root, and theskills-extrasibling.Push gates (each its own process via gated-push, all rc=0 at this head):
git diff --check origin/main...HEAD;bun run check; the new test plustest/anthropic-subscription-options.test.tsandtest/anthropic-subscription-project-instructions.test.ts(3 files, 67 tests);node scripts/check-pr-changelog.mjs --base origin/main.Summary by cubic
Fixes the Claude subscription lane's skill-roots rewrite so catalogs that list their roots in the
<skill_roots>table—both the XML and the one-line format—point at~/.claude/skillsand.claude/skillsagain. The old rewrite only touched absolute<location>paths, so these catalogs kept senpi's own skill paths (#4518).<rN>entries for roots at or under the global or project skills root, keeping the path below the root; all other roots are untouched.skills-extrais no longer treated as insideskills.<location>rewrite for catalogs without the table.Written for commit 7ff70b7. Summary will update on new commits.