Files
custom-claude-skills/skills/housekeeping/SKILL.md
Paul O'Reilly 12e4232cbd Fix housekeeping skill aborting on non-zero exit from info scripts
unreflected-logs, git-status-report, check-skills, and validate-skill
all exit 1 as a status signal when issues are found. The skill's bang-
command syntax treated this as a failure, aborting mid-run. Append
`|| true` so informational output is always captured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:08:21 +13:00

115 lines
4.3 KiB
Markdown

---
name: housekeeping
description: >
Cross-project health check. Runs git-status-report, unreflected-logs, and validate-skill
across all projects and skills. Reports findings and suggests actions including whether to
run /reflect-logs or /distill-best-practices. Information only - takes no action.
user_invocable: true
allowed-tools: Read, Glob, Grep, Bash(git-status-report *), Bash(unreflected-logs *), Bash(validate-skill *), Bash(check-skills *), Bash(cat *), Bash(ls *), Bash(date *), Bash(git -C *), Bash(wc *)
---
# /housekeeping Skill
<command-name>housekeeping</command-name>
You are running a cross-project health check. This skill is **information only** — gather data, report findings, and suggest actions. Do NOT make any changes.
## Step 1: Git Status Report
Run the git-status-report script across all projects:
!`git-status-report ~/dev/claude || true`
## Step 2: Unreflected Logs
Check for session logs that haven't been reflected on:
!`unreflected-logs ~/dev/claude || true`
## Step 3: Validate All Skills
Run validate-skill against all skill directories:
!`validate-skill ~/dev/claude/projects/custom-claude-skills/skills || true`
## Step 4: Check Skill Installation
Verify all skills from the source repo are linked in the active Claude profile:
!`check-skills ~/dev/claude/projects/custom-claude-skills/skills || true`
If any skills are MISSING or STALE, include them in the report with a recommendation to run `install.sh` from the custom-claude-skills repo.
## Step 5: Check Knowledge Pipeline State
### Reflection state per project
For each project that has unreflected logs (from Step 2), note the count. This determines whether `/reflect-logs` is worthwhile.
### Distill state
!`cat ~/dev/claude/projects/claude-foundations/best-practices/.distill-state.json 2>/dev/null || echo "No distill state file found"`
For each project listed in the distill config, compare the stored SHA in `.distill-state.json` against the current HEAD of that project's repo. If any project has new commits since the last distill, note it.
Use these commands to check current HEADs (run only for projects that are git repos):
!`git -C ~/dev/claude/projects/claude-foundations rev-parse --short HEAD 2>/dev/null || echo "not a git repo"`
For each tracked project, use the Read tool to check `git -C <path> rev-parse --short HEAD` and compare against the stored SHA.
## Step 6: Report
Present a structured report with these sections:
### Git Status Summary
For each repo reported dirty in Step 1, summarise:
- Repo name
- Uncommitted changes (files modified/added/deleted with rough change size)
- Remote sync status (ahead/behind)
For clean repos, just list them as clean in a single line.
### Unreflected Logs
For each project with unreflected logs:
- Project name
- Number of unreflected logs
- Date range of unreflected logs (oldest to newest)
### Skill Validation
For each skill checked:
- Skill name
- Status (pass/errors/warnings)
- Any specific errors or warnings found
### Skill Installation
Report the check-skills output. If all skills are linked, a single "All skills linked" line suffices. Otherwise list missing/stale/orphan entries.
### Knowledge Pipeline Status
- **`/reflect-logs` recommendation**: Recommend running if any project has 3+ unreflected logs, or if any unreflected logs are older than 7 days. State which project(s) to run it in.
- **`/distill-best-practices` recommendation**: Recommend running if any tracked project has new commits since the last distill. State which project(s) have changed.
## Step 7: Suggested Actions
Based on all findings, produce a prioritised list of suggested actions. Group by urgency:
**Should address soon:**
- Missing or stale skill symlinks (run `install.sh` from custom-claude-skills)
- Uncommitted changes that look like completed work (not work-in-progress)
- Skill validation errors
- Very old unreflected logs (14+ days)
**Worth doing when convenient:**
- Running `/reflect-logs` for projects with accumulated logs
- Running `/distill-best-practices` if memory files have changed
- Skill validation warnings
- Repos ahead of remote (unpushed commits)
**Informational only:**
- Work-in-progress changes (dirty repos that look like active development)
- Clean repos with no issues
Keep the report concise. Use tables where they help readability. The goal is a quick scan that tells the user what needs attention.