michaelhazza

Cleanfiles — Security skill for Claude Code

Security community

Sweep the repo's accumulating working files: audit first, apply only after operator confirmation, one reviewable commit.

How to install Cleanfiles

Installs to ~/.claude/commands/michaelhazza-claude-code-framework-cleanfiles.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/michaelhazza/claude-code-framework/HEAD/.claude/commands/cleanfiles.md -o ~/.claude/commands/michaelhazza-claude-code-framework-cleanfiles.md

Restart Claude Code, or start a new session, for it to be picked up.

What Cleanfiles does


description: "Sweep the repo's accumulating working files: audit first, apply only after operator confirmation, one reviewable commit."

/cleanfiles

Tidy the repo's "working memory" files. These accumulate by design (KNOWLEDGE.md is append-only, todo.md collects items, every build leaves artifacts) and gradually bloat the context every session loads. This command reclaims that space WITHOUT destroying knowledge: every removal is either an archival-with-pointer or covered by git histor

Alternatives in Security

  • Memory Self Review — Mine recent agent history (claude-mem + usage stats) for recurring failures and repeated patterns, audit MEMOR 297 ★
  • Commit Hook Checklist — Audit commit-hook automation as gates against AI slop and broken commits (Node.js, Go, polyglot) 168 ★
  • Vuln Scan — Multi-agent security vulnerability sweep — fans out region-scoped hunters, verifies findings, and reports 107 ★

Full documentation available on GitHub

View Source Repository