scheduled-tasks/refactor-scout/SKILL.md
--- name: refactor-scout description: Weekly code quality patrol: review target repositories and report refactoring candidates as GitHub issues --- Review repositories and report areas for improvement as GitHub issues. ## Target Repositories | Repository | Branch | |-----------|---------| | thkt/kagami | main | | thkt/recall | main | ## Procedure Execute the following for each repository: ### 1. Clone Repository ```bash gh repo clone {repo} /tmp/refactor-scout-{repo_name} -- --depth 1 --b
npx skillsauth add thkt/dotclaude scheduled-tasks/refactor-scoutInstall 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.
Review repositories and report areas for improvement as GitHub issues.
| Repository | Branch | |-----------|---------| | thkt/kagami | main | | thkt/recall | main |
Execute the following for each repository:
gh repo clone {repo} /tmp/refactor-scout-{repo_name} -- --depth 1 --branch {branch}
Delete .claude/ directory in the clone if present (prevents behavioral side effects).
Read the following in order to understand project intent:
docs/PURPOSE.md (required — skip this repo if missing)CLAUDE.md (if present)docs/adr/ or adr/ (if present)README.md (if present)No need to read the entire repo. Explore efficiently:
git log --oneline -5 -- {file} for change rationaleWhen a candidate is found, verify:
If any apply, do not create an issue.
gh issue list --repo {repo} --label "refactor-scout" --state open --json number,title,body
Do not create issues for the same file and same concern.
gh issue create --repo {repo} --label "refactor-scout" --title "[refactor-scout] {concern}: {target}" --body "..."
Body format:
## Detection Criteria
{What criteria triggered detection}
## Current State
{Relevant code excerpts, metrics}
## Context Verification
{Intent read from git log / ADR / tests}
{Rationale for concluding this is not intentional design}
## Improvement Proposal
{Concrete refactoring approach}
## Priority: {P1/P2/P3}
{Rationale: change frequency, impact scope, test coverage, etc.}
Priority criteria:
rm -rf /tmp/refactor-scout-*
tools
Internal helper for /think Step 11. Renders SOW.md + Spec.md as an integrated Astro view and returns a dev server URL.
development
Extract repository spec while detecting bugs, spec gaps, and consistency drift via dual-purpose documentation. OUTCOME.md-axis question-driven exploration with ephemeral output. Do NOT use for code review (use /audit or /polish), feature implementation (use /code), planning only (use /think), or single-bug fix (use /fix).
development
Discover undocumented design decisions and challenge each candidate via critic-design before promotion. Rank by impact and reversibility, produce ADR promotion candidates. Treat each candidate as a position arguing for ADR status, not a fact to be filed. Pairs with audit-adr-drift, which scans existing ADRs for drift against code.
development
Scan ADR Decision sections against current code and report drift with modification direction and priority. Do NOT use for repos without ADRs (use audit-adr-gaps instead).