agentleFS
telefrektelefrek/vallorcine/skills/feature-cleanup/SKILL.md

feature-cleanup

Skill0 starsChanged 7 months agoMITView on GitHub

Interactive walkthrough to clean up stale feature directories

  • Deletes or force-pushes

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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. Very specific:

    Check that .feature/ exists.

    line 15
  2. Distinctive:

    If no feature directories found:

    line 48
  3. Distinctive:

    Wait for user response.

    line 86
  4. Very specific:

    Create .feature/_archive/ if it doesn't exist.

    line 91
  5. Very specific:

    Update .feature/CLAUDE.md if the feature is listed in Active Features (move to Completed/Archived section).

    line 92

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

/feature-cleanup

Interactive walkthrough of existing .feature/<slug>/ directories. For each: shows last activity date and stage, then asks the user to keep, archive, or delete. Addresses abandoned feature directory clutter for long-running projects.


Pre-flight guard

Check that .feature/ exists. If not:

No .feature/ directory found. Nothing to clean up.

Stop.

Display opening header:

───────────────────────────────────────────────
🧹 FEATURE CLEANUP
───────────────────────────────────────────────

Step 1 — Scan feature directories

List all directories under .feature/ excluding:

  • _archive/
  • project-config.md
  • CLAUDE.md

For each directory, read status.md and extract:

  • Stage and substage
  • Last updated timestamp
  • Automation mode
  • Brief description (from the feature: frontmatter field)

Calculate staleness: days since last_updated (or file modification date if last_updated is missing).

Sort by staleness (most stale first).

If no feature directories found:

No active feature directories. Nothing to clean up.

Stop.


Step 2 — Display summary

── Active feature directories ─────────────────
  <n> features found

  SLUG                     STAGE              LAST ACTIVITY    AGE
  ──────────────────────   ────────────────   ──────────────   ────
  old-auth-refactor        planning/stubs     2026-02-28       16d
  cache-layer              scoping/complete   2026-03-01       15d
  sql-query-support        domains/progress   2026-03-16       0d
  ──────────────────────────────────────────────────────────────────

Step 3 — Process each feature

Present each feature starting from the most stale:

── <slug> ─────────────────────────────────────
  Stage:        <stage> / <substage>
  Last activity: <date> (<n> days ago)
  Description:  <from frontmatter or brief.md first line>
  Files:        <n> files in .feature/<slug>/

  Type: keep · archive · delete

Wait for user response.

keep — no changes. Display ✓ Keeping <slug> and continue to next.

archive — move .feature/<slug>/ to .feature/_archive/<slug>/. Create .feature/_archive/ if it doesn't exist. Update .feature/CLAUDE.md if the feature is listed in Active Features (move to Completed/Archived section). Display:

  ✓ Archived: .feature/_archive/<slug>/

delete — confirm before deleting:

  ⚠ This will permanently delete .feature/<slug>/ and all its contents.
    Source code and tests in git are NOT affected — only the working state files.

Use AskUserQuestion with options:
    - "Delete"
    - "Keep"

If "Delete": `rm -rf .feature/<slug>/`. Remove from `.feature/CLAUDE.md` Active
Features table if present.
Display:

✓ Deleted: .feature/<slug>/


---

## Step 4 — Summary

─────────────────────────────────────────────── 🧹 FEATURE CLEANUP complete Kept: <n> Archived: <n> Deleted: <n> Active features remaining: <n> ───────────────────────────────────────────────

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.