refactor-checklisted
Install: claude install-skill n24q02m/claude-plugins
# Refactor Check
Analyze whether a refactoring is safe BEFORE making changes. Produces a verdict with specific risks and mitigation steps.
**Command surface:** run the local CLI through the coding harness shell. Examples
use the installed `better-code-review-graph` command; from a source checkout,
prefix it with `uv run`. No MCP mapping is required.
## Steps
1. **Get the full dependency graph** for the target:
- `better-code-review-graph graph build --base HEAD --repo-root "<path>"` to index current working changes
- `better-code-review-graph query query --pattern callers_of --target "<name>" --repo-root "<path>"` -- who calls this
- use `--pattern callees_of` to see what this calls
- use `--pattern imports_of` to see what this imports
- If it is a class, also query `--pattern inheritors_of` and `--pattern children_of`
2. **Identify test coverage**:
- `better-code-review-graph query query --pattern tests_for --target "<name>" --repo-root "<path>"` -- direct tests
- For each caller, also query `tests_for` to see if callers have integration tests covering this function indirectly
- Record: number of direct tests, number of callers with tests, number of callers without tests
3. **Flag public API exposure**:
- Check if the target is exported from a package `__init__.py`, `index.ts`, or similar
- Check if the target is referenced from outside its own module/package
- Check if the target appears in documentation or type stubs
- Public API =