From super-gsd
Use this to archive accumulated phase directories from completed milestones — delegates to gsd-cleanup, then displays a table of what was archived.
How this skill is triggered — by the user, by Claude, or both
Slash command
/super-gsd:sg-cleanup (none)(none)The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<language>
<execution_context>
Self-contained. Snapshots .planning/phases/ before and after, delegates archival to the gsd-cleanup Skill, then diffs the two snapshots to build the summary table. Writes nothing to planning files itself.
</execution_context>
Delegate archival to gsd-cleanup. Invoke the gsd-cleanup Skill, which identifies completed milestones without a -phases archive, shows its own dry-run summary, asks for confirmation, moves the directories into .planning/milestones/v{X.Y}-phases/, and commits. Let it run to completion — control returns here afterward (this is NOT a terminal handoff; the table step below runs after gsd-cleanup finishes):
Skill(skill="gsd-cleanup", args="")
Snapshot the AFTER state and compute what was archived. Once gsd-cleanup returns, diff the snapshots to find phase directories that were present BEFORE but are now gone from .planning/phases/, and locate which milestone -phases archive each one landed in:
SG_CLEANUP_BEFORE="${TMPDIR:-/tmp}/sg-cleanup-before.txt"
SG_CLEANUP_AFTER="${TMPDIR:-/tmp}/sg-cleanup-after.txt"
ls -d .planning/phases/*/ 2>/dev/null | xargs -n1 basename 2>/dev/null | sort > "$SG_CLEANUP_AFTER"
# Archived = present before, absent after
comm -23 "$SG_CLEANUP_BEFORE" "$SG_CLEANUP_AFTER" > "${TMPDIR:-/tmp}/sg-cleanup-archived.txt"
if [ ! -s "${TMPDIR:-/tmp}/sg-cleanup-archived.txt" ]; then
echo "NOTHING_ARCHIVED"
else
# For each archived dir, find which milestone -phases archive now holds it: emit "version|slug|destination"
while IFS= read -r d; do
[ -z "$d" ] && continue
dest=$(ls -d .planning/milestones/v*-phases/"$d" 2>/dev/null | head -1)
ver=$(printf '%s' "$dest" | sed -E 's#.*/milestones/(v[0-9.]+)-phases/.*#\1#')
echo "${ver:-unknown}|$d|${dest:-(destination not found)}"
done < "${TMPDIR:-/tmp}/sg-cleanup-archived.txt"
fi
rm -f "$SG_CLEANUP_BEFORE" "$SG_CLEANUP_AFTER" "${TMPDIR:-/tmp}/sg-cleanup-archived.txt"
Render the result (final output):
If the bash output is NOTHING_ARCHIVED — gsd-cleanup found nothing eligible, or the user cancelled its confirmation: print a single line stating nothing was archived. Do NOT fabricate a table.
Otherwise: render a table grouped by milestone version. Each version|slug|destination line is one archived phase directory; aggregate all slugs that share the same version into one row. Table headers and surrounding prose are written in the user's language (per the <language> directive); machine tokens — milestone version IDs (vX.Y), phase directory slugs, and destination paths — stay verbatim:
| Milestone | Archived phases | Count | Destination |
|---|---|---|---|
| v2.6 | 33-npx-installer, 34-sg-setup-skill, 35-doc-improvement | 3 | .planning/milestones/v2.6-phases/ |
<success_criteria>
.planning/phases/ diff, grouped by milestone version, listing the archived phase slugs, their count, and the destination path.npx claudepluginhub gyuha/super-gsd --plugin super-gsdGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.