Scans codebase for debug artifacts (console.log, debugger), TODO/FIXME markers, and TypeScript `any` types. Optionally auto-fixes safe patterns. Useful before commits or during PR review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/universal-dev-standards:sweep [--fix] [--report] [--path <dir>] [--exclude <pattern>][--fix] [--report] [--path <dir>] [--exclude <pattern>]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Language**: English | 繁體中文
Language: English | 繁體中文
Scan the codebase for debug artifacts, code quality issues, and technical debt markers. Optionally auto-fix safe patterns (console.log, debugger statements).
| Pattern ID | Label | Auto-fixable | Description |
|---|---|---|---|
console-log | console.log / console.debug / console.trace | ✅ Yes | Debug output left in production code |
debugger | debugger statement | ✅ Yes | Debugger breakpoints left in code |
todo-fixme | TODO / FIXME / HACK / XXX | ❌ Report only | Technical debt markers |
ts-any | TypeScript any type | ❌ Report only | Type safety violations |
/sweep # Scan current directory, report findings
/sweep --fix # Scan and auto-fix fixable patterns
/sweep --report # Scan and save report to .uds/sweep-report.json
/sweep --path src/ # Scan specific directory
/sweep --exclude "**/*.test.ts" # Exclude patterns (glob)
Use Glob tool to find all source files under the target path.
Default excludes: node_modules/, dist/, .git/, *.min.js, coverage/.
For each pattern, use Grep to find matches across all files.
Collect findings: { file, line, column, pattern_id, label, fixable, content }.
Output a structured summary:
📊 Sweep Results
─────────────────────────────────────
console-log: 12 findings (auto-fixable)
debugger: 2 findings (auto-fixable)
todo-fixme: 28 findings (report only)
ts-any: 5 findings (report only)
─────────────────────────────────────
Total: 47 findings | Fixable: 14
If --fix flag is set AND total fixable findings exceed 20:
Pause and require explicit user confirmation before applying fixes.
Show the list of files that will be modified.
For each fixable finding:
console-log: Remove the line if it contains only the console statementdebugger: Remove the line if it contains only the debugger statementUse Edit tool to apply changes file by file. Report: "Fixed N findings in M files."
Write findings to .uds/sweep-report.json:
{
"timestamp": "<ISO8601>",
"total_findings": 47,
"fixable": 14,
"fixed": 14,
"findings_by_pattern": { "console-log": 12, "debugger": 2, "todo-fixme": 28, "ts-any": 5 },
"files_modified": ["src/auth.ts", "src/utils.ts"]
}
Configure via uds.project.yaml:
sweep:
default_path: "src/"
exclude_patterns:
- "**/*.test.ts"
- "**/*.spec.ts"
- "**/fixtures/**"
hitl_threshold: 20 # Require confirmation if fixable findings exceed this
patterns:
enabled:
- console-log
- debugger
- todo-fixme
- ts-any
After /sweep completes, suggest:
- Run
/checkinto verify overall code quality before committing- Run
/code-reviewto review the cleaned-up changes- Run
/committo commit the fixes
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-04-28 | Initial release — XSPEC-097 Phase 1 (從上游遷移) |
This skill is released under MIT License and CC BY 4.0.
npx claudepluginhub asiaostrich/universal-dev-standards --plugin universal-dev-standardsDetects and removes technical debt like unused imports, console.logs, debuggers, and TODOs in TypeScript codebases. Reports duplicates, any types, long functions, and deep nesting. Use before session end.
Runs parallel security and quality scans for hardcoded secrets, debug artifacts, and TODO/FIXME tracking. Produces structured JSON reports for security reviews, PR audits, and pre-deployment checks.
Detects and auto-fixes AI slop in code (debug leftovers, placeholders, hardcoded credentials) using a three-phase certainty scan, safely applying only deterministic HIGH fixes and verifying with tests.