
Rust Refactor
This teaches you to look at working Rust code and see unnecessary complexity. It's built around four diagnostic questions you run before touching anything: Is this parameter just being forwarded? Is this feature flag still needed? Is this file doing too many things? Does this struct have mutually exclusive optional fields? Then it gives you six transformation patterns with actual coordination sequences: how to remove forwarded parameters from the bottom up, how to split a 950-line file by domain instead of layer, how to migrate types incrementally with From bridges instead of big-bang rewrites. The crate extraction section includes before-and-after compile time measurements, which is rare and useful. It's opinionated about when to add abstraction versus when to delete it.
- skills.sh installs
- 322
- GitHub stars
- 222
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pproenca/dot-skills --skill rust-refactor --agent claude-codeInstalls into .claude/skills of the current project.
Files
Rust Refactoring Frameworks
This skill teaches you to look at working Rust code and see unnecessary complexity. Every refactoring starts with a diagnostic question, follows a transformation pattern, and ends with a self-review checklist.
The Two Refactoring Philosophies
Before touching code, decide which mode you are in.
Defensive mode: Add abstraction for safety. Split types. Create From bridges. Audit every consumer. Use when: security-critical code, type evolution, multi-crate dependencies.
Offensive mode: Delete indirection. Remove forwarded parameters. Collapse layers. Use when: the abstraction adds complexity without adding safety, the mediator just forwards, the parameter is always None.
Know which mode you are in. Do not add abstraction when you should be deleting, and do not delete safety layers when you should be adding them.
The 4 Diagnostic Questions
Run these BEFORE touching any code. They determine WHAT to refactor.
1. "Is this parameter just being forwarded?"
Sponsors
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Code Review & Quality, Productivity & Planning, Rust
- First seen
- Jun 3, 2026
More from pproenca/dot-skills
All 100- Ios Design System319
- 12 Factor App318
- Js Google317
- Tailwind Refactor314
- Pulumi310
- Harness Engineering305
- Ios Hig303
- Rails Testing301
- Think301
- Ruby Refactor299
- Ios Xcode298
- Restful Hateoas298
- Rails Dev293
- Ios Ui Refactor291
- Ruby Optimise286
- Swift Optimise285
- Ios Testing281
- Swift Refactor281
- Dev Rfc279
- Swift Ui Architect273
- Ios Taste272
- Ios Storyboard270
- Rails Design System270
- Swift Data268