Repository navigation
DEV-1181: generalize reflect's copy steps to a <dest> path - #4
Merged
Merged
Conversation
Second review follow-up to #3. The copy steps take a <dest> placeholder for the global or project path, cover a project that has no copy yet (copy from the global link and keep it), use mktemp -d instead of a fixed temp path, refuse to mv onto an existing path, and verify test -d, test ! -L and SKILL.md before editing. Co-Authored-By: Claude Opus 5.5 <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.
Second follow-up for DEV-1181. Fixes the four findings from the blind review of #3 (APPROVE WITH NITS at b034fd0) in
skills/reflect/SKILL.md. Nothing else changes.Changes
rmso the global link stays, move the copy to the project path, and run the check. The text says to nevercp -rthe link itself.tmp=$(mktemp -d)replaces the fixed/tmp/<skill>-copy. Steps 2 to 5 run as one&&-joined shell command, so$tmpstays set even in harnesses that drop shell state between tool calls. If a step fails, the agent stops and tells the user, and never deletes or recreates a folder to make the step pass.test -d <dest> && test ! -L <dest> && test -f <dest>/SKILL.md. Step 4 is alsotest ! -e <dest> && mv "$tmp" <dest>. If the link were still there, a baremvwould drop the copy inside the shared checkout.<dest>placeholder (and<link>for the source) covers both~/.agents/skills/<skill>and the project's.agents/skills/<skill>, with a three-way case list: symlink, missing, plain folder.There is also one CHANGELOG line. No version or credit changes.
Verification
./scripts/check-skill-names.shprintsok: 55 skill names match their folders.git diff --checkis clean.rmskipped): thetest ! -eguard stopsmv, and the checkout is untouched.<dest>is still a link.$(mktemp -d)and$tmpare not tokens Claude Code rewrites in skill text: reflect declares noarguments:in its frontmatter, and neither is$ARGUMENTS, a$Nor a${CLAUDE_*}token. No bang-backtick sequences.🤖 Generated with Claude Code