/super-gsd:sg-lessons [phase] - optional. If provided, show only lessons for that phase number.from super-gsd
Use this when starting a new phase and you want to review prior lessons before planning — lists weighted lessons from .planning/lessons/ as context.
Ships in super-gsd. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
<execution_context> Self-contained. Reads .planning/lessons/ directory. Writes nothing. </execution_context>
0. **Milestone filter check.** If $ARGUMENTS matches the `--milestone=vX.Y` or `milestone=vX.Y` format, read the milestone archive file directly: ```bash MILESTONE_ARG=$(node -e " const args = process.argv[2] || ''; const m = args.match(/milestone=([^ ]+)/); process.stdout.write(m ? m[1] : ''); " -- "$ARGUMENTS" 2>/dev/null) if [ -n "$MILESTONE_ARG" ]; then if ! echo "$MILESTONE_ARG" | grep -qE '^[a-zA-Z0-9._-]+$'; then echo "Invalid milestone argument." exit 1 fi MILESTONE_FILE=".planning/milestones/${MILESTONE_ARG}-LESSONS.md" if [ ! -f "$MILESTONE_FILE" ]; then echo "No milestone archive found: $MILESTONE_FILE" echo "Run /super-gsd:sg-complete to create the archive when closing a milestone." exit 0 fi echo "--- $MILESTONE_FILE ---" cat "$MILESTONE_FILE" echo "" echo "Milestone lessons loaded: $MILESTONE_ARG" exit 0 fi ``` If no milestone filter, continue with the existing Step 1–4 flow.Collect file list via glob:
FILES=$(ls .planning/lessons/*.md 2>/dev/null | sort)
if [ -z "$FILES" ]; then
echo "No lessons recorded yet. Run /super-gsd:sg-learn after a review to capture lessons."
exit 0
fi
Apply phase filter from ARGUMENTS. If $ARGUMENTS is non-empty, keep only files starting with that phase number. Normalize various formats like phase-03, 03, 3 to a number:
if [ -n "$ARGUMENTS" ]; then
ARG_NUM=$(node -e "
const args = process.argv[2] || '';
const m = args.match(/([0-9]+)/);
process.stdout.write(m ? m[1] : '');
" -- "$ARGUMENTS" 2>/dev/null)
if [ -z "$ARG_NUM" ]; then
echo "Invalid phase argument: '$ARGUMENTS'. Use a number (e.g. 3 or 03 or phase-03)."
exit 1
fi
PADDED=$(printf "%02d" "$ARG_NUM")
FILES=$(echo "$FILES" | grep "/${PADDED}-")
if [ -z "$FILES" ]; then
echo "No lessons found for phase $ARGUMENTS."
exit 0
fi
fi
Print each file's content. Display filename as header then print content:
while IFS= read -r FILE; do
echo "--- $FILE ---"
cat "$FILE"
echo ""
done <<< "$FILES"
Print guidance message:
Lessons loaded. Run /super-gsd:sg-plan to start the next phase — prior lessons are auto-injected.
<success_criteria>
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gyuha/super-gsd --plugin super-gsd25 skills in this plugin
/sg-cleanupUse this to archive accumulated phase directories from completed milestones — delegates to gsd-cleanup, then displays a table of what was archived./sg-completeComplete a phase (bare number → delegates to sg-phase) or close a milestone (vX.Y, or the current milestone when no argument) via gsd-complete-milestone./sg-executeUse this when the phase plan is ready and implementation should begin — packages PLAN/REQ/SC and hands off to Superpowers via superpowers:executing-plans./sg-exploreUse this when you need a map of the current codebase structure — invokes gsd-map-codebase to analyse and document the project layout./sg-healthUse this when something feels broken or before onboarding — diagnoses GSD, Superpowers, hooks, HANDOFF.md, and STATE.md installation line by line./sg-learnUse this when a phase is complete and you want to extract patterns and lessons from the session — delegates to sg-retro for structured retrospective.