config/codex/skills/quality-sweep/SKILL.md
Full-codebase quality sweep across 8 concern-focused lanes: deduplication/DRY, shared types, dead code, circular dependencies, weak types, defensive programming, legacy fallbacks, and AI slop/comment hygiene. Use when the user asks to "quality sweep", "clean up the codebase", "remove slop", "kill dead code", "fix weak types everywhere", or wants a broad cross-cutting cleanup executed rather than a per-package refactor audit.
npx skillsauth add cryptofish7/dotfiles quality-sweepInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive codebase cleanup partitioned by concern, not by package. Each concern gets its own lane for research, critique, and high-confidence fixes.
Use refactor-audit instead when the user wants a ranked refactor plan or approval gate before edits. Use quality-sweep when they want the cleanup executed.
Default to parallel execution when the runtime supports worker delegation and the user has asked for this sweep. Spawn one worker per concern with disjoint ownership. If delegation is unavailable, execute the same lanes locally one at a time and keep the concern boundaries explicit in the report.
Workers should be worker agents for implementation. If you need a quick read-only pass first, you may use explorer agents to identify hotspots before dispatching workers, but do not duplicate the same analysis twice.
Before dispatching work:
AGENTS.md, CLAUDE.md, package.json, pyproject.toml, Cargo.toml, Makefile, or equivalent.knip, madge, ts-unused-exports, depcheck, tsc --noEmit, eslintruff, vulture, pyflakes, mypy, pyrightcargo check, cargo clippy, cargo +nightly udepsReport the detected toolset in the final summary. If a key tool is missing, proceed with native code search plus the available verifiers unless the missing tool blocks safe execution.
Create eight concern lanes in parallel when possible. Each worker owns one concern and must not fix issues in another lane.
Use this shared prompt core for each worker:
You own ONE quality concern in a larger cleanup. Other workers own other concerns. Do not revert or overwrite their edits, and do not fix issues outside your concern.
Work in two passes:
- Research and critical assessment: read the code, identify issues, and record concrete findings with file paths and line numbers.
- Implement high-confidence fixes only: apply the changes you are confident about, then run the narrowest relevant verification for your edits.
Do not:
- Make behavior changes unless the concern explicitly requires removing obsolete behavior
- Reformat or restructure beyond what the concern needs
- Delete anything that might be dynamically referenced or part of a public API without cross-checking first
Output format:
## Findings - `path/file.ts:42` — issue and why it matters ## Applied fixes - `path/file.ts:42` — what changed ## Deferred - `path/file.ts:99` — issue and why it is uncertain
any, unknown, loose dictionaries, object, interface{}-style placeholders, and similarly weak typing. Infer the real shape from usage and replace with stronger types where justified. Re-run the relevant typechecker after changes.After the lanes finish:
Present the result as:
## Quality Sweep Report
### Applied
- grouped by concern, with file references
### Deferred
- grouped by concern, with why each item was deferred
### Verification
- commands run and pass/fail status
### Tooling detected
- relevant analyzers and type/test commands discovered
Do not auto-commit unless the user explicitly asks.
testing
Generate and maintain a local deploy script (scripts/deploy.sh). Discovers project services, deploys them locally, and health-checks each one. Use when the user asks to "smoke test", "deploy locally", "test local deploy", "update deploy script", "run deploy", or "run smoke test".
testing
Audit installed skills and agents for bloat, overlap, and improvement opportunities. Use when the user wants to review, audit, list, or improve their skills and agents. Triggers on "review skills", "audit skills", "list skills", "skill review", "improve skills".
development
Set up the autonomous post-task workflow for a project. Injects the standard development pipeline into AGENTS.md and installs all required skills and agents (docs-consolidator, ci-cd-pipeline, smoke-test, bug-bash-update, code-reviewer, debugger). Use at the start of a new project. Triggers on "setup workflow", "init workflow", "add workflow", or "set up project workflow".
tools
Analyze the current conversation for learnings and persist approved insights. Triggers on "reflect", "retrospective", "session review", "what did we learn", "conversation review".