← ClaudeAtlas

refactor-recommenderlisted

sr:refactor-recommender — Scan the codebase for refactoring opportunities ranked by impact/effort ratio. Optionally creates GitHub Issues for tracking.
fjpulidop/specrails-core · ★ 9 · AI & Automation · score 76
Install: claude install-skill fjpulidop/specrails-core
Scan the codebase for refactoring opportunities, score each by impact/effort ratio and VPC persona value, and optionally create GitHub Issues for the top findings in the configured backlog provider (read from .specrails/backlog-config.json). **Input:** `$ARGUMENTS` — optional: comma-separated paths to scope the analysis. Flags: `--dry-run` (print findings without creating issues). --- ## Phase 0: Pre-flight Check whether the GitHub CLI is available: ```bash Read `.specrails/backlog-config.json` to determine `BACKLOG_PROVIDER` (default: `github`) and `BACKLOG_WRITE` (default: `true`). - If `BACKLOG_PROVIDER=github`: run `gh auth status`. If it fails, set `BACKLOG_WRITE=false` and warn the user that issues cannot be created. - If `BACKLOG_PROVIDER=local`: use `.specrails/local-tickets.json` for local issue storage. - If `BACKLOG_PROVIDER=none`: set `BACKLOG_WRITE=false`. ``` Set `GH_AVAILABLE=true` if the command succeeds, `GH_AVAILABLE=false` otherwise. Do not stop — analysis proceeds regardless. Parse `--dry-run` from `$ARGUMENTS` and set `DRY_RUN=true` if present. --- ## Phase 1: Scope Parse paths from `$ARGUMENTS` after stripping any flags. If no paths are provided, scan the entire repository. Always exclude the following from all analysis: - `node_modules/` - `.git/` - `.claude/` - `vendor/` - `dist/` - `build/` --- ## Phase 1.5: VPC Context Check whether persona files exist at `.claude/agents/personas/`. This path is present in any repo that has run `/specra