oioio-space/unpixel / .claude/skills/repo-janitor
repo-janitor
VerifiedUse BEFORE committing and whenever tidying the repo — removes regenerable build/scan artifacts (dist/, coverage.out, sbom.cdx.json, junit.xml, binaries) and prevents them from being committed. Pairs with the deterministic clean gate in the pre-commit hook.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.8 KB |
SKILL.md
View on GitHub---
name: repo-janitor
description: Use BEFORE committing and whenever tidying the repo — removes regenerable build/scan artifacts (dist/, coverage.out, sbom.cdx.json, junit.xml, binaries) and prevents them from being committed. Pairs with the deterministic clean gate in the pre-commit hook.
---
# Repo Janitor
Goal: **keep regenerable artifacts out of the repo.** Two layers:
- **Deterministic, pre-commit** — `mise run clean:check` (`scripts/clean-artifacts.sh --check`)
runs FIRST in the git `pre-commit` hook: it removes known untracked artifacts from the
worktree, then BLOCKS the commit if any staged file is a build/scan artifact.
- **AI review (this skill)** — before you (Claude) `git commit`, the PreToolUse hook injects this
checklist so you double-check that nothing regenerable or stray is being committed.
## What counts as a removable / never-commit artifact
- Build output: `dist/`, the `unpixel` binary, `*.exe`, `*.test`
- Test/scan output: `coverage.out` / `coverage.*`, `junit.xml`, `sbom.cdx.json`, `*.out`
- Editor/OS junk: `.DS_Store`, swap files
- Local-only config that slipped in: `mise.local.toml`, `.env*`
All of these are gitignored and regenerated by `mise run …`; they must never be tracked.
## How to act
1. Before committing, run `mise run clean` (full clean) or let the pre-commit gate auto-tidy.
2. If the gate blocks a staged artifact: `git restore --staged <file>`, confirm it is in
`.gitignore`, and re-commit.
3. If a NEW kind of generated file appears, add it to `.gitignore` AND to the `artifacts`/
`glob_artifacts` lists in `scripts/clean-artifacts.sh` so the janitor knows about it.
4. Never delete tracked source — the script only removes untracked paths.
## Notes
- The janitor only deletes paths git does not track, so it is safe.
- Tasks: `mise run clean` (full), `mise run clean:check` (gate behavior).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |