agentleFS
TangleMLTangleML/tangle-ui/.claude/skills/gardening/SKILL.md

gardening

Skill104 starsChanged 3 days agoApache-2.0View on GitHub

Weekly codebase groundskeeping. Sweeps the codebase for one or more hygiene pillars — hygiene (Prettier/import-sort/knip dead code), comments (low-value/commented-out), dry (dedup/reuse), refactor (leaner code), consistency (converge divergent implementations onto the canonical one), react (UI primitives + React Compiler), tests (coverage + e2e + stale-test repair) — applies only gate-verified fixes, and opens a DRAFT PR per pillar plus a queue issue (bot-owned carry-over + human decisions). Use for the weekly gardening run or when invoked as /gardening [pillars].

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .claude/skills/gardening/pillars/<pillar>.md for that pillar's spec block (PILLAR_ID, CATEGORY_IDS, CONVENTION_SKILLS, SIGNALS, …

    line 51
  2. Very specific:

    Run engine steps E3–E9 for that pillar (worklist → MAP → REDUCE → gate → apply/validate/revert → draft PR → self-review → queue update).

    line 54
  3. Distinctive:

    Carry the claimed-files set forward: after a pillar opens a PR, add the files it touched to the claimed-files set so a later pillar in the …

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Codebase Gardening

Weekly groundskeeping for the Tangle-UI codebase. Sweep the tree for hygiene issues, apply only fixes a validation gate can prove safe, self-review each PR against the review skill's criteria, and open draft PRs for human review. The goal is a codebase that stays free of AI slop without depending on per-PR hand polish.

Work is organized into pillars, each a bounded scan run one at a time so a single run is unlikely to exhaust the token budget or time out:

PillarWhat it doesConvention skill(s)
hygieneFix Prettier/import-sort violations; remove knip dead code (runs first)project-conventions, typescript-standards
commentsRemove/refine low-value & commented-out comments; keep the whyproject-conventions
dryConsolidate duplicated logic; adopt an existing helper before extractproject-conventions, typescript-standards
refactorSimplify verbose code; integrate with existing abstractionstypescript-standards, project-conventions
consistencyConverge divergent implementations of one concept onto the canonical form (per canon-registry.md or a measured supermajority)react-patterns, project-conventions, typescript-standards
reactRaw HTML → UI primitives + tone; flag React Compiler adoption gapsui-primitives, react-patterns
testsAdd missing tests, author e2e specs, repair stale tests (runs last)vitest-testing, e2e-testing

Arguments

Positional pillar names select what runs; flags modify the run.

  • Pillars — any subset of hygiene, comments, dry, refactor, consistency, react, tests, space-separated (e.g. /gardening comments dry). all (or no pillar given) runs all seven in priority order. Unknown names → list the valid pillars and stop.
  • --dry-run — analyze and print each selected pillar's worklist + findings table; create no branches, edits, commits, or PRs.
  • --max-files N — override caps.maxFilesPerPR for this run.
  • --promote-compiler — allow the react pillar to enable ready dirs in react-compiler.config.js (otherwise React Compiler findings are flag-only). Ignored by other pillars.

How to run

  1. Parse arguments into SELECTED_PILLARS (default: all seven, in config priority order — hygiene, comments, dry, refactor, consistency, react, tests per .github/gardening-config.json) and the flag set.
  2. Read the shared engine once: .claude/skills/gardening/engine.md. It defines steps E0–E10, the state model, fingerprints, and schemas.
  3. Run the engine's shared preamble once (E0 config, E1 fork protection, E2 ISO-week + suppression/in-flight/file-claim scan). If E1 fails the repo check, stop for the whole run.
  4. For each pillar in SELECTED_PILLARS, in order:
    • Read .claude/skills/gardening/pillars/<pillar>.md for that pillar's spec block (PILLAR_ID, CATEGORY_IDS, CONVENTION_SKILLS, SIGNALS, SPECIAL_HANDLING). If the doc is missing, print SKIPPED <pillar>: missing pillar doc and move to the next pillar — never improvise the spec.
    • Run engine steps E3–E9 for that pillar (worklist → MAP → REDUCE → gate → apply/validate/revert → draft PR → self-review → queue update). Each pillar produces its own branch automated-gardening/<pillar>/<week> and its own draft PR.
    • Carry the claimed-files set forward: after a pillar opens a PR, add the files it touched to the claimed-files set so a later pillar in the same run cannot edit them (prevents mid-run collisions, complementing E2's scan of already-open PRs).
    • Respect caps.maxPRsPerRun across the whole invocation, not per pillar.
  5. Run E10 cleanup once at the end (remove /tmp/gardening-<week>, return to the starting branch).

Under --dry-run, step 4 stops after E6 for each pillar (print the table, create nothing) and step 5 still cleans up the temp dir.

Notes

  • Loading is lazy by design: only the engine plus the selected pillar docs are read, so a single-pillar run stays small.
  • The convention skills are the source of truth for every rule — this skill and its pillar docs cite them, never restate them.
  • Everything this skill opens is a draft PR; nothing auto-merges.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.