gsp-housekeeping
Run this often — after adding/removing skills or agents, after architecture changes, after version bumps. Think of it as a linter, not a test suite.
Source layout reference:
gsp/skills/— skills (SKILL.md files)gsp/agents/— agents (gsp-*.md files)gsp/prompts/— system promptsgsp/templates/— config, state, brief, roadmap templatesgsp/references/— shared reference material.claude-plugin/plugin.json— plugin manifestbin/install.js— multi-runtime installerVERSION,package.json— version sourcesCLAUDE.md— project instructions (references counts)
Step 0: Parse mode
$ARGUMENTS:
checkor empty — dry run, report onlyfix— report and fix each issue (confirm before editing)
Step 1: Gather counts
Run in parallel:
# Actual counts from filesystem
SKILL_COUNT=$(ls -d gsp/skills/gsp-*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
AGENT_COUNT=$(ls gsp/agents/gsp-*.md 2>/dev/null | wc -l | tr -d ' ')
PROMPT_COUNT=$(ls gsp/prompts/*.md 2>/dev/null | wc -l | tr -d ' ')
echo "skills=$SKILL_COUNT agents=$AGENT_COUNT prompts=$PROMPT_COUNT"
# Versions from all sources
cat VERSION
node -e "process.stdout.write(require('./package.json').version)"
echo
node -e "process.stdout.write(require('./.claude-plugin/plugin.json').version)"
echo
node -e "process.stdout.write(require('./gsp/templates/projects/config.json').version)"
echo
node -e "process.stdout.write(require('./gsp/templates/branding/config.json').version)"
Step 2: Version sync
Check that all 5 version sources agree: VERSION, package.json, plugin.json, projects/config.json, branding/config.json.
Any mismatch → drift issue. The VERSION file is the source of truth.
Fix: update the mismatched files to match VERSION.
Step 2.5: Changelog health
Check CHANGELOG.md for common issues:
- Unreleased section exists —
## [Unreleased]must be present at the top. If missing, flag it. - Unreleased is not empty — if there are commits since the last versioned entry but Unreleased has no content, flag: "Unreleased section is empty but there are new commits. Run
/gsp-changelog updateto populate." - Current version coverage — if VERSION matches the latest versioned section in CHANGELOG.md, that's fine (post-release state). If VERSION is ahead of the changelog (no versioned section for it), Unreleased should have content.
This check is informational — don't auto-fix. Suggest /gsp-changelog update or /gsp-changelog release as appropriate.
Fix: not auto-fixable. Report only.
Step 3: Count drift in CLAUDE.md
Grep CLAUDE.md for counts like "21 skills", "15 agents", "12 prompts". Compare against actual filesystem counts from Step 1.
Any mismatch → drift issue.
Fix: update the numbers in CLAUDE.md. Also check the installer table row counts if they reference specific numbers.
Step 4: Stale terminology
Grep across gsp/skills/, gsp/agents/, gsp/prompts/, gsp/templates/, and bin/install.js comments for:
# Stale "commands" references (should be "skills")
pattern: "commands/" or "command " (in context of GSP structure, not generic English)
files: gsp/**/*.md, bin/install.js (comments only)
# Old phase count (5 phases → 4 phases for branding)
pattern: "5 phases" or "five phases" near "brand" context
files: gsp/**/*.md
# Old invocation syntax in source
pattern: /gsp- (hyphen, not colon) in gsp/ source files
files: gsp/**/*.md (should be /gsp: in source, runtimes convert)
Be careful with false positives:
- "commands" in generic English context is fine
/gsp-is correct in OpenCode/Gemini context (runtime conversion)- "5" near branding that isn't about phase count is fine
Fix: replace stale terms with current equivalents.
Step 5: Installer comment drift
Check bin/install.js for comments that reference outdated structure:
- References to "commands/" directory
- Outdated count comments
- Stale function descriptions
Only check comments (lines starting with // or inside /* */), not code logic — code correctness is /gsp-audit's job.
Fix: update the comments.
Step 6: Working tree hygiene
git status --short
# Recent commits for context on what's already been committed
git log --oneline -10
Flag:
- Modified files that look like they belong to a previous chore session
- Untracked files in
dev/that should be committed or gitignored - Modified files outside the expected working area
If there are uncommitted changes (staged or unstaged), propose commits:
- Group related changed files into logical commits (e.g. "version bumps", "new skill", "installer fixes")
- For each proposed commit, show the files and a draft commit message
- In
fixmode, ask the user to confirm each proposed commit before creating it - In
checkmode, list the proposed commits in the report under a "Proposed commits" subsection
Step 7: Report
Output a compact report:
/gsp-housekeeping check
═══════════════════════════════════════
Versions
✓ VERSION, package.json, plugin.json 0.5.0
✗ projects/config.json 0.4.2 → 0.5.0
✗ branding/config.json 0.4.3 → 0.5.0
Counts
✓ skills 21 (CLAUDE.md says 21)
✗ agents 16 (CLAUDE.md says 15)
✓ prompts 12 (CLAUDE.md says 12)
Stale references
✗ gsp-start/SKILL.md:18 "5 phases" → "4 phases"
✗ gsp-update/SKILL.md:63 "commands/gsp/*" → "skills/gsp-*"
✗ bin/install.js:1017 comment references "commands/"
Working tree
M bin/install.js (modified, unstaged)
?? dev/skills/gsp-dev/ (untracked)
Proposed commits
1. "fix: update version refs in config templates"
→ gsp/templates/projects/config.json
→ gsp/templates/branding/config.json
2. "chore: add gsp-dev skill"
→ dev/skills/gsp-dev/
─────────────────────────────────────
5 issues found, 2 commits proposed. Run /gsp-housekeeping fix to apply.
In fix mode, after the report, walk through each fixable issue:
- Show the exact change (old → new, with file and line)
- Apply the edit
- Confirm it was applied
After all fixes, re-run the checks to confirm clean state.
Important notes
- Fast — no network calls, no issue fetching, no deep analysis. Pure filesystem checks.
- Safe — in
checkmode, reads only. Infixmode, edits only the specific drift patterns. - Complementary to audit — this catches the 80% of drift that happens day-to-day. Run
/gsp-auditfor the full picture before releases. - Don't fix code logic — only fix metadata, comments, counts, and references. Code correctness is out of scope.
More from jubscodes/get-shit-pretty
get-shit-pretty
Design engineering for AI coding tools. Full pipeline: brand research, strategy, identity, guidelines, UI design, critique, accessibility audit, build, and review. Expertise skills (color, typography, visuals) serve the entire pipeline. 14 specialized agents with Apple HIG, Nielsen's heuristics, WCAG 2.2 AA, and design token standards.
15gsp-start
Start the GSP pipeline — use when starting a new feature, I want to build X, help me design, let's work on, or kicking off any new work
13gsp-icons
Design icon systems — library selection, sizing, containers, custom SVG direction
12gspdev-prompt-audit
AI-driven semantic analysis of GSP skills and agents — finds dead weight, contradictions, vagueness, and over-prompting that automated checks can't catch.
12brand-strategy
Define positioning, voice, and messaging
1typescale
Generate a mathematical type scale — standalone or as a building block for identity
1