refactor-check
FeaturedSafety analysis before refactoring -- dependency graph, test coverage, public API exposure, blast radius verdict.
AI & Automation 66 stars
9 forks Updated 1 weeks ago Apache-2.0
Install
Quality Score: 88/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 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 =...
Details
- Author
- n24q02m
- Repository
- n24q02m/better-code-review-graph
- Created
- 5 months ago
- Last Updated
- 1 weeks ago
- Language
- Python
- License
- Apache-2.0
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
refactor-check
Safety analysis before refactoring -- dependency graph, test coverage, public API exposure, blast radius verdict.
3 Updated 1 months ago
n24q02m AI & Automation Listed
refactor-safely
Plan and execute safe refactoring using dependency analysis
0 Updated today
apodal-cherry334 Code & Development Featured
refactor-safely
Plan and execute safe refactoring using dependency analysis
31,329 Updated yesterday
tirth8205