Move sync marker to EOF for better CLI preview#5
Conversation
Claude CLI uses the first line of command files as preview text. With the marker at the top, every skill showed "<!-- generated by CodeCanon/sync.sh..." instead of useful context. Moving it to EOF lets the invocation header show in the preview instead. Also adds backward compatibility: read_file_info detects markers at both positions (end=current, start=legacy) and forces regeneration of legacy files. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Review SummaryVerdict: REQUEST CHANGES Findings
|
The initial implementation set body_hash=None for legacy files, which caused them to be flagged as "customized" and skipped. Instead, compute the real body_hash and return a needs_migration flag so sync_skill can force a rewrite even when content hashes match. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Review SummaryVerdict: APPROVE Findings
No blocking issues found. The marker relocation is clean, the legacy-detection and auto-migration path is correct, and the regenerated command files are consistent with the new format. |
Move sync marker to EOF for better CLI preview
Claude CLI shows the first ~80 chars of each command file as preview text. With the sync marker on line 1, every skill previewed as
<!-- generated by CodeCanon/sync.sh | skill: ...— unhelpful. Moving the marker to the last line lets the invocation header show instead.Changes in
sync.sh:sync_skill(): marker appended to end of file instead of prependedread_file_info(): detects markers at both positions (end=current, start=legacy), forces regeneration of legacy-format filesAll generated command files regenerated with the new format.
Issue #4