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-*
tools
Delegate implementation to codex (coder) via the herdr-agentchat plugin and drive a two-pane conversation to completion.
development
Extract recurring patterns from past closed PRs/issues and the research findings in workspace/research/, verify them against the latest code, and propose them to docs/wiki/ via PR.
development
Create Decision Records (DR) in MADR v4 format with auto-numbering.
development
Codex review + cleanup. Findings are challenged by critic-audit, not aggregated as facts, and fixes are applied directly. Do NOT use for internal multi-reviewer deep audits or findings reports (use /audit).