Borrowing it
Nothing to install: this file belongs to nizovtsevnv/outline-mcp-rs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/nizovtsevnv/outline-mcp-rs/main/.claude/skills/refactor/SKILL.mdgit clone --depth 1 https://github.com/nizovtsevnv/outline-mcp-rsWrote 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/nizovtsevnv/outline-mcp-rs/refactor)<a href="https://agentmods.dev/skills/nizovtsevnv/outline-mcp-rs/refactor"><img src="https://agentmods.dev/badge/skills/nizovtsevnv/outline-mcp-rs/refactor/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/nizovtsevnv/outline-mcp-rs/refactor"><img src="https://agentmods.dev/badge/skills/nizovtsevnv/outline-mcp-rs/refactor.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.00011 | $0.01193 |
| Opus 5 | $0.00005 | $0.00596 |
| Sonnet 5 | $0.00002 | $0.00239 |
| Haiku 4.5 | $0.00001 | $0.00119 |
Grade A, and why
refactor 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 11d 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 — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor
Code quality analysis and incremental refactoring with continuous validation.
Arguments (optional):
- Path or crate:
/refactor crates/app— limit scope - No arguments — analyze the entire project
Process
Phase 1: Exploration
- Read CLAUDE.md and doc/ru/PRD.md for project rules and conventions
- Collect baseline metrics (in parallel):
cargo clippy --workspace --all-targets 2>&1— warnings count- Glob + wc — LOC per crate, files >400 lines
cargo test --workspace 2>&1— baseline: all tests passing?
- If tests fail or code doesn't compile — report and stop
Phase 2: Diagnosis
Analyze code across 8 dimensions. For large scope, use parallel Task agents (subagent_type=Explore) — one per category or group of categories.
Analysis checklist:
Architecture (SOLID)
- Files >400 LOC with multiple public types — splitting candidates
- Modules with >1 responsibility
- Hard dependencies between modules (concrete types instead of traits)
- Open/Closed violations: match on types that will be extended
Legitimate exceptions to "1 file = 1 type": Error+ErrorKind pairs, Builder+Target, small private helpers (<30 LOC), related DTO families (Request/Response), typestate marker types, newtype wrapper collections.
Module coupling / cohesion
- Crate dependency graph: unidirectional? (core ← mid ← app)
- Circular dependencies between modules within a crate
- Excessive
pubAPI — types/functions public without necessity - Crate knows implementation details of another crate (leaky abstraction)
- Changing one module cascades breakage into unrelated modules
Duplication (DRY)
- Repeated code blocks (>5 lines, >2 occurrences)
- Similar match patterns across different files
- Copy-pasted error handling
Dead code
- Unused
use, functions, types, constants - Commented-out code
- Unreachable branches
Performance
- Unnecessary
.clone()/.to_string()/.to_owned()where a reference suffices - O(n²) loops (nested iterations over collections)
- Repeated lookups in HashMap/Vec inside a loop
- Allocations in hot paths
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.
- 11d ago First seen · 143 lines · 11 tokens per session scan A 22f1edc0b0a1
refactor is a skill published in the GitHub repository nizovtsevnv/outline-mcp-rs (7 stars, last pushed 6mo ago), licensed MIT. It adds 11 tokens to every session and 1,193 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-08-31.
Other skills, from other repositories
architecture-audit
Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…
rust-review
A Rust code-review skill for services, checking for crashes, unsafe SQL construction, exposed credentials, ignored errors, and unfinished code.
compiler-frontend
Use when building a lexer, Pratt or recursive-descent parser, AST, symbol table, type checker, or LLVM IR emitter for a language or DSL. Not for optimizing IR: use llvm-passes.
custom-allocators
Use when implementing pool/slab/arena allocators, tuning jemalloc/mimalloc/tcmalloc, writing a Rust GlobalAlloc, or benchmarking allocator performance and fragmentation.
cargo-fuzz
Use when initializing, running, measuring coverage, or triaging a cargo-fuzz target in a Rust crate. Not for remote, credential, publish, deploy, or irreversible changes.
writing-rust
Idiomatic Rust development. Use when writing Rust code, Cargo crates/workspaces, Rust tests, or rustfmt/clippy/cargo workflows. Emphasizes ownership, Result errors, small APIs, stdlib-first dependencies, fast cargo feedback, and behavior tests. NOT for Go, Python, TypeScript, shell scripts, or infra-only work.