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/claude-config 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-*
documentation
Generates and updates .claude/OUTCOME.md interactively. When the file is absent or empty (no Behavior / all sections TBD), collects content via AskUserQuestion and writes the stub; when present, shows the current state and applies updates.
development
Judge a SKILL.md against craft axes (single responsibility, description distinctiveness, imperative voice, verifiable completion, calibration, progressive disclosure) and apply the fixes the audit surfaces. Do not use for format-presence-only checks (use reviewer-prompt) or reproducibility loops (use /tuning).
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).