agentleFS
jacksoswagjacksoswag/ObsidAgent/.claude/skills/clean-project/SKILL.md

clean-project

Skill1 starsChanged 3 months agoMITView on GitHub

File and code clutter reduction; lower cognitive load in the repo and the file explorer. Sweep for temporary artifacts, throwaway verification, obsolete docs, and scratchpad files, then delete or merge them; also strips dead code, unused imports, and duplicate logic, and inlines or folds what one caller uses. Use when a big feature lands, when stabilizing the project, or when asked to "clean up the repo", "remove scaffolding", "reduce clutter", "tidy the repo". Cleaning up the notes or the vault is notes-heartbeat, not this.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Aggressively prune: Every file, document, test, and hardening has a high maintenance bill.

    line 15
  2. Very specific:

    Tests: Keep the ones guarding user-visible behavior.

    line 25
  3. Very specific:

    Docs: Delete non-standard docs on the spot.

    line 26
  4. Very specific:

    Read the project's priority from $VAULT/projects/<Name>.md before sweeping.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

clean-project

This skill is the sweep after building, for what accumulated: scratch scripts, dead branches, the instrumentation test-project spun up. Same priority posture, later application pass.

Perform an extremely comprehensive and thorough file sweep throughout the entire repo and /private/tmp/claude, applying General rules, File sweep guidelines, and Priority-aware intensity. Aggressively apply changes without hedging, then generate a Closing report.

General rules

  • Ignore sunk cost. Age protects nothing. The test: cloning this repo today, would I create this file? If no, delete it.
  • Aggressively prune. Every file, document, test, and hardening has a high maintenance bill. Keep it only when the benefit clearly beats that bill. Place any speculative manager, registry, provider, factory, builder, coordinator, adapter, or service under intense scrutiny until a multiple other callers prove otherwise.

File sweep guidelines

For each item, pick whatever reduces long-term complexity: delete, merge, rename, move, inline, split, document, or leave alone. Deletion is the default, not the goal.

  • Scratch and temp files. In-repo files (throwaway scripts, one-off verification, migration helpers, experiments, etc), generated artifacts, and session scratchpads at /private/tmp/claude-<uid>/<cwd-slug>/<session-id>/scratchpad (uid 501 locally, so /private/tmp/claude-501/...). tasks/ holds subagent output; clear any stale entries, then judge each artifact worth keeping (produced text/reports, photos, videos, etc). A formal result that stands alongside what output/ already holds goes there, named to match the convention already in use; anything one-off, redundant, or unorganized goes to output/misc/.
  • Dead code. Unused imports and functions, obsolete flags, abandoned implementations, unreachable branches, stale assets. Never leave code commented out; git remembers it.
  • Duplicate logic. Helpers, parsing, validation, constants, config. Merge when merging clarifies.
  • Versioned names. Replace implementations instead of cloning them. _final, _v2, _new, _old, _copy, _fixed, and _temp are all banned.
  • Tests. Keep the ones guarding user-visible behavior. Delete the ones whose only job was proving today's implementation ran once. The single runnable check from code-standards stays.
  • Docs. Delete non-standard docs on the spot. Accepted files are README.md at the root and technical-spec.md, market-analysis.md, masterdoc.html, branch-diff.md in docs/, per File structuring in code-standards. Scratch and planning notes belong in the session scratchpad above, never in the repo.

Priority-aware intensity

Read the project's priority from $VAULT/projects/<Name>.md before sweeping. No document defaults to the 1-2 row.

PriorityInstruction
0 (sandbox, research, hobby)Aggressive. Minimal files outweigh everything a dead experiment or hardening path might someday be worth. Delete freely.
1-2 (portfolio, research tools)Standard: temp artifacts, dead code, duplication, version-specific documents.
3 (business, commercial)Deliberate. Remove genuine cruft, and never strip hardening, error paths, validation, or edge-case handling as "complexity". When torn, justify and retain.

Closing report

Report what you removed, merged, and refactored, plus anything retained with the reason. The task is done once temporary artifacts and dead code are gone, duplicate logic is merged, regression tests still cover real behavior, and any increase in complexity has a stated and explicit justification.

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.