Programming · Building & coding
refactoring
/refactoring
Use when the user asks to refactor code.
- Author
- tamnguyendinh ↗
- Repository
- Anvien ↗
- Licence
- MIT
- Last repository change
- 25.10.2026
Assessment and security
86/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
Deprecation
No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.
Licence
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when the user asks to refactor code.
Original author description
Use when the user asks to refactor code.
How it works
- Command Choices
- Workflow
- Rename Flow
- Extract, Split, Or Move Flow
- Current Limitations
Original SKILL.md headings · 45 lines, 378 words
SKILL.md preview
--- name: refactoring description: Use when the user asks to refactor code. --- # Refactoring With Anvien Use this skill for behavior-preserving renames, extractions, moves, splits, and shared-code cleanup. This skill is a workflow gate for refactoring work. It is not a command router. When a concrete Anvien command is needed, choose it directly from the generated Command Selection Guide. ## Command Choices | Need | Use | |---|---| | Understand current ownership | MCP/CLI `context`; prefer `context file` or `context symbol` once target type is known | | Check callers and flows before editing | MCP/CLI `impact --direction upstream`; prefer `impact file` or `impact symbol` once target type is known | | Rename a symbol | MCP `rename` or CLI `anvien rename <symbol> <newName> --repo <repo>` | | Check API route/contract consumers | MCP `api_impact` or CLI `anvien api impact [route] --repo <repo>` | | Check route/tool blast radius | `anvien impact route <route> --repo <repo>` or `anvien impact tool <tool> --repo <repo>` | | Verify changed scope before commit | MCP `detect_changes` or CLI `anvien detect-changes --repo <repo> --scope all` | ## Workflow 1. Refresh the graph with `anvien analyze --force` before graph-based refactoring. 2. Use `context` to inspect the exact target. If multiple candidates exist, use UID/file disambiguation. 3. Run upstream impact and report the blast radius. HIGH/CRITICAL means proceed carefully, not stop automatically. 4. For renames, start with a graph-guided dry run. Do not use find-and-replace for symbols. 5. Make behavior-preserving changes first. Defer unrelated cleanup unless required. 6. Run focused tests, broader tests when shared contracts are touched, and `detect-changes`. ## Rename Flow 1. `anvien rename oldName newName --repo <repo> --json` 2. Inspect files, edit counts, graph edits, text-search edits, and ambiguity warnings. 3. Use `--uid` or `--file` if the dry run is ambiguous. 4. Apply with `--apply` only when the edit list matches the intended scope. ## Extract, Split, Or Move Flow - Use `context` to identify callers/callees and nearby contracts. - Use `impact` to identify consumers that must remain compatible. - Move code in a small slice, update imports deliberately, and preserve behavior. - Re-run tests that cover affected flows and any API shape tests if contracts moved. ## Current Limitations Graph-guided rename is safer than text replacement, but generated files, dynamic references, string-based APIs, and external integrations still need source review and tests.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · tamnguyendinh/Anvien | 86 | MIT |
| gabrieldulolmarques/refactoring-skill | 100 | CC-BY-4.0 |
| 4typen/skills | 100 | MIT |
| t8jwscc7qy-sketch/foma-skills | 100 | Apache-2.0 |
| mtwuser/zero-cloud-gravity | 100 | MIT |
| krzysztofsurdy/code-virtuoso | 100 | MIT |
| sagargupta16/claude-skills | 100 | MIT |
| nimadorostkar/Claude-Skills-collection | 100 | MIT |
| DariuszDusza/agentic-workflow-foundry | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version d57c836048e1 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100refactoring-specialist
Code refactoring expert for improving code structure, readability, and maintainability. Use when user asks to refactor, clean up, or improve code quality. - 96code-refactoring-context-restore
Use when working with code refactoring context restore - 86code-refactoring
Expert code refactoring and optimization with analysis, improvements, and documentation. Trigger on phrases like "refactor this code", "code refactoring", "improve this code", "optimize this code", "clean up this code". - 90refactor
Use when refactoring code while preserving behavior — checkpoint, extract, test, audit - 100refactor-team
Team-based code refactoring with analysis and user-approved changes. Use when: "refactor this code", "リファクタリング", "コード整理", "refactor team", "リファクタチーム". - 100code-review
Review changed code for quality, security, and architecture compliance. Use only when the user explicitly requests local review or a PR finding requires it.