Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tamnguyendinh/Anvien --skill refactoringgit clone --depth 1 https://github.com/tamnguyendinh/AnvienWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tamnguyendinh/anvien/refactoring)<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/refactoring"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/refactoring/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/refactoring"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/refactoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.00596 |
| Opus 5 | $0.00006 | $0.00298 |
| Sonnet 5 | $0.00003 | $0.00119 |
| Haiku 4.5 | $0.00001 | $0.00060 |
Grade A, and why
refactoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
- Refresh the graph with
anvien analyze --forcebefore graph-based refactoring. - Use
contextto inspect the exact target. If multiple candidates exist, use UID/file disambiguation. - Run upstream impact and report the blast radius. HIGH/CRITICAL means proceed carefully, not stop automatically.
- For renames, start with a graph-guided dry run. Do not use find-and-replace for symbols.
- Make behavior-preserving changes first. Defer unrelated cleanup unless required.
- Run focused tests, broader tests when shared contracts are touched, and
detect-changes.
Rename Flow
anvien rename oldName newName --repo <repo> --json- Inspect files, edit counts, graph edits, text-search edits, and ambiguity warnings.
- Use
--uidor--fileif the dry run is ambiguous. - Apply with
--applyonly when the edit list matches the intended scope.
Extract, Split, Or Move Flow
- Use
contextto identify callers/callees and nearby contracts. - Use
impactto 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.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 49 lines · 13 tokens per session scan A 0a597e52fbd8
refactoring is a skill published in the GitHub repository tamnguyendinh/Anvien (9 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 596 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
blast-radius-review
Review a change by its blast radius, using Kin's graph to find what downstream code the change can reach. Use when reviewing a diff or pull request, deciding whether an edit is safe, or answering "what else breaks if I change this" in a repository admitted to Kin.
qartez
Semantic code intelligence skill for qartez MCP. Use qartez tools for code exploration, impact analysis, and guarded refactors; treat built-in code-tool denials as routing signals and recover via qartez replacements.
security-review
Perform a focused security review of pending git changes to identify high-confidence security vulnerabilities with real exploitation potential. Use this skill when the user asks for a security review, security audit, vulnerability scan, or wants to check pending changes on a branch for security issues before merging.…
huggingface-llm-trainer
Train or fine-tune language models with TRL or Unsloth on Hugging Face Jobs, including SFT, DPO, GRPO, reward models, and GGUF conversion. Use for cloud LLM training; use huggingface-vision-trainer for vision tasks.
feature-dev
Guide a feature implementation through a structured seven-phase workflow with deep codebase understanding, clarifying questions, parallel architecture design, and quality review. Use this skill when the user asks to build a new feature, add functionality, or wants a methodical approach to implementation rather than…
review
Validate plans, execution, or PRs against wish criteria — returns SHIP / FIX-FIRST / BLOCKED with severity-tagged gaps.