Fix reflect skill: remove $() substitution that fails permission checks

The !`command` blocks in SKILL.md go through Claude Code's Bash permission
checker, which rejects $() command substitution. Simplified the git log
command, replaced dynamic verify script path with a Read tool instruction,
and narrowed allowed-tools to specific command patterns. Also documented
the constraints in CLAUDE.md for future skill development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul O'Reilly
2026-03-11 20:06:52 +13:00
parent 5ff98763cd
commit 85dfa2ef2e
2 changed files with 14 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ description: >
Run a milestone reflection after completing a milestone. Reviews the full conversation history,
git log, and current project docs to produce structured reflection artifacts. Use when a milestone
is complete and verified. Invoke with the milestone number, e.g. /reflect M8
allowed-tools: Read, Edit, Write, Grep, Glob, Bash(git *)
allowed-tools: Read, Edit, Write, Grep, Glob, Bash(git log *), Bash(git diff *), Bash(git show *), Bash(cat *), Bash(sed *), Bash(ls *)
---
# Milestone Reflection Skill
@@ -19,8 +19,8 @@ detour, every wrong assumption, every backtrack — and distill it into structur
## Pre-gathered context
### Git log for this milestone
!`git log --oneline --since="$(git log --all --oneline --grep="[Mm]$(echo '$ARGUMENTS' | tr -d 'Mm' | awk '{print $1-1}').*[Vv]erif\|[Mm]$(echo '$ARGUMENTS' | tr -d 'Mm' | awk '{print $1-1}').*[Rr]eflect\|[Mm]$(echo '$ARGUMENTS' | tr -d 'Mm' | awk '{print $1-1}').*[Cc]omplete" --format='%aI' | head -1 || echo '3 months ago')" 2>/dev/null || git log --oneline -30`
### Git log (last 50 commits)
!`git log --oneline -50`
### Current MEMORY.md
!`cat MEMORY.md 2>/dev/null || echo "No MEMORY.md found"`
@@ -35,7 +35,7 @@ detour, every wrong assumption, every backtrack — and distill it into structur
!`ls -1 scripts/ 2>/dev/null || echo "No scripts directory"`
### Verify script for this milestone
!`cat scripts/verify-m$(echo '$ARGUMENTS' | tr -d 'Mm' | awk '{print $1}').sh 2>/dev/null || echo "No verify script found for this milestone"`
(Read the verify script manually using the Read tool: `scripts/verify-m<N>.sh` where N is the milestone number from $ARGUMENTS)
## Instructions