cleanup-sprint — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cleanup-sprint (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
PARALLEL EXECUTION: Use the Agent tool to spawn cleanup specialists for independent categories.
You are an autonomous codebase cleanup agent. Do NOT ask questions — detect the stack, clean up everything aggressively, and verify nothing broke.
Before any cleanup, detect the project's language and tooling:
| Language | Lint Tool | Format Tool | Detection |
|---|---|---|---|
| TypeScript/JS | eslint | prettier | package.json, tsconfig.json |
| Rust | clippy | rustfmt | Cargo.toml |
| Go | golangci-lint | gofmt / goimports | go.mod |
| Python | ruff (preferred), flake8, pylint | ruff format, black | pyproject.toml, setup.py, requirements.txt |
| Ruby | rubocop | rubocop -a | Gemfile, .rubocop.yml |
| Java/Kotlin | checkstyle, ktlint | google-java-format, ktlint -F | pom.xml, build.gradle |
| Dart/Flutter | dart analyze, flutter analyze | dart format | pubspec.yaml |
| C/C++ | clang-tidy | clang-format | CMakeLists.txt, Makefile |
Use whatever tools are already configured in the project. If multiple are available, prefer the one with an existing config file (e.g., .eslintrc, ruff.toml, .clang-format).
Run the project's test suite once before making any changes to establish a green baseline. If tests fail before cleanup, note the failures and do not count them as regressions.
Find and remove code that is never executed:
return, throw, break, continue, sys.exit(), os.Exit().git log --diff-filter=M --since="6 months ago" -- <file> — if a file has zero imports AND zero recent modifications, it is dead.Verify after removals: run tests, run build.
Find and remove orphaned project artifacts:
devDependencies or the project (e.g., .babelrc when the project uses SWC, old .travis.yml when using GitHub Actions)..DS_Store, Thumbs.db, *.pyc, __pycache__/ not in .gitignore.Add any missing entries to .gitignore for generated file patterns found.
Scan all source files for TODO, FIXME, HACK, XXX, and WORKAROUND comments:
HACK / WORKAROUND comments where the workaround has been replaced with a proper implementation.Scan for and remove security hazards that should not be in production code:
console.log, print, log.debug calls that output tokens, passwords, user data, request bodies, or full error stacks. Remove or replace with sanitized logging./debug, /test, /admin/reset, or any endpoint guarded only by if (process.env.NODE_ENV !== 'production') that leaks internal state.password123, tokens, or secrets in source files (not .env). Replace with environment variable references.Access-Control-Allow-Origin: * in production config.// eslint-disable-next-line, # nosec, @SuppressWarnings for security rules.Do NOT remove legitimate debug tooling that is properly gated behind environment checks.
Fix all linter warnings and formatting issues using the tools detected in Phase 0:
eslint --fix, ruff check --fix, clippy --fix, rubocop -a, dart fix --apply).prettier --write, ruff format, rustfmt, gofmt, dart format, clang-format).If the project uses TypeScript, check tsconfig.json for strict mode gaps:
strict is not true, enable individual strict flags incrementally:noImplicitAny — add explicit types where any is inferred.strictNullChecks — add null guards and optional chaining.noUnusedLocals and noUnusedParameters — remove unused code or prefix with _.strictPropertyInitialization — add definite assignment assertions or initialize in constructor.as any or @ts-ignore as fixes — those defeat the purpose.strict: true would require 50+ changes, enable the flags one at a time and fix each batch. Report which flags were enabled and which remain.Clean up imports across all files:
goimports. For Python: use isort or ruff's import sorting. For Dart: use import_sorter or manual alphabetical ordering.package.json, Cargo.toml, pyproject.toml, Gemfile, pubspec.yaml, go.mod).Run the full verification suite:
If any test fails that passed in the baseline, revert the change that caused it and note it in the report.
Commit in focused, atomic batches with tagged prefixes:
chore(dead-code): remove N unused exports and orphaned fileschore(safe-delete): remove stale configs and orphaned fixtureschore(todo): remove N resolved TODO/FIXME commentschore(security): strip debug logging and hardcoded credentialschore(lint): fix N lint warnings and format all fileschore(types): enable strictNullChecks and fix type errorschore(imports): organize and deduplicate importschore(deps): remove N unused dependenciesEach commit must independently pass tests. Do not batch unrelated changes.
============================================================ SELF-HEALING VALIDATION (max 3 iterations) ============================================================
After completing all phases, validate the combined output:
STOP when:
IF STILL FAILING after 3 iterations:
Cleanup Sprint Report
=====================
Stack: <language> | Lint: <tool> | Format: <tool>
Dead Code:
- Files removed: <N>
- Unused exports removed: <N>
- Commented code blocks removed: <N>
- Unreachable code blocks removed: <N>
Safe Deletions:
- Orphaned files removed: <N>
- Stale config files removed: <N>
- Dead test fixtures/snapshots removed: <N>
TODOs:
- Resolved TODOs removed: <N>
- Unresolved TODOs remaining: <N> (see list below)
Security:
- Debug logging stripped: <N>
- Hardcoded credentials removed: <N>
- Other security fixes: <N>
Lint & Format:
- Warnings fixed: <N>
- Remaining: <N> (with reasons)
TypeScript Strict Mode:
- Flags enabled: <list>
- Type errors fixed: <N>
- Flags deferred: <list> (with reasons)
Imports:
- Files cleaned: <N>
- Unused imports removed: <N>
Dependencies:
- Unused removed: <N>
Verification: Tests <pass/fail> | Build <pass/fail> | Lint <pass/fail>
Lines removed: <N> net
Commits created: <N>
Unresolved TODOs:
- <file>:<line> — <TODO text>
- ...============================================================ SELF-EVOLUTION TELEMETRY ============================================================
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
~/.claude/projects/skill-telemetry.md in that memory directoryEntry format:
### /cleanup-sprint — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.