Automated summary
Runs the project's linters, structural tests, and doc-drift scans, classifies the violations, then proposes the three highest-leverage cleanups as draft pull requests.
Strengths
- Chains baseline capture, violation classification, and deterministic scoring through an auditable side-car script (risk/cost/benefit)
- Deliberately caps output at 3 proposals so it stays workable for a solo developer
- Appends each run to .harness/gc-history.json so debt trends surface over time
- Clearly separates what it fixes directly (dead imports, layer violations) from what it only proposes
Limitations
- Assumes the repo already exposes the harness:check scripts, the configured linters, and the gc-classify.mjs side-car script
- Never merges anything — review and merge stay fully manual
- Proposed fixes are limited to the enumerated categories (duplicates, dead imports, doc drift, hand-rolled helpers)
Use it on Fridays, before tagging a release, or whenever the user mentions cleanup, tech debt, AI slop, or garbage collection.
Avoid it on repos without a test harness or configured linters, or when you expect automatic fixes merged without human review.
Security analysis
SafeNo destructive, exfiltration, or obfuscation patterns are present: git commands are read-only (status/diff/log), lint/test commands are local, and the only network action is opening draft PRs, which the skill explicitly forbids merging and caps at three. Bash usage is scoped to narrow command prefixes rather than a blanket shell, and the side-car classify script replaces free-form LLM scoring with a deterministic, auditable rubric. Residual risk is limited to repo-defined npm/pytest scripts and the checked-in .mjs script executing with agent privileges, which is normal for a lint-oriented dev workflow.
- •`Bash(npm run:*)` and `Bash(pytest:*)` wildcards permit any package/pytest script, including arbitrary pre/post-install hooks defined in the repo — trust depends on the target repo being sane.
- •`Bash(node .claude/skills/garbage-collection/scripts/gc-classify.mjs:*)` executes a checked-in script; a compromised or malicious variant of that file would run with the agent's privileges.
- •`gh pr create` has outward-facing side effects (creates remote PRs, requires auth) and consumes network/API quota, though the skill explicitly restricts it to `--draft --label gc` and forbids merging.
- •Writes artifacts to `.harness/gc-<date>.json` and `.harness/gc-history.json` (expected, but it does mutate working-tree state).
- •`{{#if isPython}}` template conditionals and the `doc-drift-scan` sub-skill are external dependencies; behavior is undefined if the harness templating or that skill is absent.
Examples
It's Friday — run the garbage collection pass on this repo and show me the top 3 cleanups.Before I tag v1.4.0, run GC: check the suite, lint, and doc drift, then open draft PRs for the highest-leverage fixes.We've accumulated a lot of tech debt and AI slop in src/. Run garbage collection and tell me what's worth fixing first.name: garbage-collection description: Use this skill on Fridays, before tagging a release, or when the user mentions "cleanup", "tech debt", "AI slop", "GC", or "garbage collection". Runs the deterministic linters, structural tests, and doc-drift scans, then proposes the top-3 highest-leverage cleanups (with risk/cost/benefit) — does NOT auto-merge. This is the solo-dev shrunk version of OpenAI's Friday garbage-collection ritual. allowed-tools: Read, Glob, Grep, Bash(npm run:), Bash(pytest:), Bash(ruff:), Bash(git status:), Bash(git diff:), Bash(git log:), Bash(gh pr create:), Bash(node .claude/skills/garbage-collection/scripts/gc-classify.mjs:) suggested-turns: 15
Steps
-
Capture baseline. Run the full suite and save the output:
- {{#if isPython}}
python -m harness.structural_test{{else}}npm run harness:check{{/if}} - {{#if isPython}}
ruff check . --output-format json{{else}}npm run lint -- --format json{{/if}} - Save to
.harness/gc-<date>.json.
- {{#if isPython}}
-
Classify violations. For each finding:
- Layer violation → fix.
- Duplicate utility (same function body in 2+ places) → propose
extraction to
src/shared/. - Dead import → remove.
- Doc drift (a path in
.harness/docs/architecture.mdno longer exists) → invokedoc-drift-scanskill. - Hand-rolled helper matching a shared utility → propose replacement.
-
Score each candidate fix on three 1–5 dimensions via the side-car script (replaces the previous LLM-scored turn — deterministic and auditable):
node .claude/skills/garbage-collection/scripts/gc-classify.mjs \ --baseline .harness/gc-<date>.json \ --history .harness/gc-history.jsonThe script applies the mechanical rubric:
risk = 1 + ceil(touched/3),cost = 1 + ceil(lines/30),benefit = recurrenceCount(class). Read the JSONcandidates[]sorted by(benefit desc, cost asc, risk asc). -
Propose ONLY the top 3 cleanups (solo-dev cap; OpenAI does dozens, you do 3). Open them as separate PRs with
gh pr create --label gc --draft. -
Append a row to
.harness/gc-history.json:{ "date": "...", "violations_found": N, "fixes_opened": M, "total_tokens": K }. -
Stop. Do not merge anything. Human review required at solo scale.
Output contract
### GC run: <date>
### Violations found: <N>
### Top 3 fixes proposed:
1. <slug> — risk:<1-5> cost:<1-5> benefit:<1-5> — PR #<n>
2. ...
3. ...
### Fixes deferred (not in top 3): <count>
Anti-patterns
- Don't open more than 3 PRs in one run. The cap is a feature, not a bug.
- Don't auto-merge — the entire point of solo-scale GC is human review.
- Don't suppress findings that score low; record them in
.harness/gc-history.jsonso trends surface over time.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/automated-code-cleanup-gc-mrwakavo/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/automated-code-cleanup-gc-mrwakavo' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/automated-code-cleanup-gc-mrwakavo/download' --output '.skill-downloads/automated-code-cleanup-gc-mrwakavo/SKILL.md.part' && mv '.skill-downloads/automated-code-cleanup-gc-mrwakavo/SKILL.md.part' '.skill-downloads/automated-code-cleanup-gc-mrwakavo/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Glob, Grep, Bash(npm run:*), Bash(pytest:*), Bash(ruff:*), Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(gh pr create:*), Bash(node .claude/skills/garbage-collection/scripts/gc-classify.mjs:*)
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/automated-code-cleanup-gc-mrwakavo/SKILL.md' && test -s '.skill-downloads/automated-code-cleanup-gc-mrwakavo/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/garbage-collection' && cp -R '.skill-downloads/automated-code-cleanup-gc-mrwakavo' '.claude/skills/garbage-collection'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/automated-code-cleanup-gc-mrwakavo'openskills read 'automated-code-cleanup-gc-mrwakavo'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/automated-code-cleanup-gc-mrwakavo/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.