refactor(skills): align Claude Code paths field order with schema and add tests - #1792
Merged
Merged
Conversation
… add tests Address review findings from PR #1604 for Claude Code skill paths support. - [mid] In ClaudecodeSkill.toRulesyncSkill, emit scheduled-task before paths so the generated claudecode frontmatter matches the canonical RulesyncSkill schema order (disable-model-invocation, scheduled-task, paths) and the documented examples. - [low] Add fromDir tests that parse paths from SKILL.md frontmatter in both YAML list and comma-separated string forms. - [low] Add round-trip tests covering empty-string and empty-array paths values. - [low] Document the comma-separated string form of paths in file-formats.md (synced to skills/rulesync/). Closes #1618 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Addresses the review findings tracked in #1618 for the
pathsfield support in Claude Code skills (PR #1604).Changes
ClaudecodeSkill.toRulesyncSkillemittedpathsbeforescheduled-task, while the canonicalRulesyncSkillclaudecode schema (rulesync-skill.ts) and the documented examples order themdisable-model-invocation→scheduled-task→paths. The generator now emitsscheduled-taskbeforepaths, so the produced frontmatter matches the schema and docs.fromDirtest gap. AddedfromDirtests that parsepathsfrom aSKILL.mdfile in both the YAML list and the comma-separated string forms."") and empty-array ([])pathsvalues.pathsindocs/reference/file-formats.md(synced toskills/rulesync/file-formats.md).Findings #5 (glob syntax validation) and #6 (per-field length limit) were intentionally left out: both are low-priority, behavior-affecting "consider" items not specific to this change, and
pathsvalues are not used in any filesystem or command-execution path within rulesync.Verification
pnpm cicheckpasses (format, lint, typecheck, tests, content + skill-docs sync).Closes #1618
🤖 Generated with Claude Code