refactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Target: Design & content creation. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- Refactor
- Overview
- When to Use
- Refactoring Principles
- The Golden Rules
- When NOT to Refactor
- Common Code Smells & Fixes
- 1. Long Method/Function
Improve code structure and readability without changing external behavior. Refactoring is gradual evolution, not revolution. Use this for improving existing code, not rewriting from scratch. Use this skill when: Code is hard to understand or maintain Functions/classes are too large Code smells need addressing Adding features is difficult due to code structure User asks "clean up this code", "refactor this", "improve this" -- 1. Behavior is preserved - Refactoring doesn't change what the code does, only how 2. Small steps - Make tiny changes, test after each 3. Version control is your friend - Commit before and after each safe state 4. Tests are essential - Without tests, you're not refactoring, you're editing 5. One thing at a time - Don't mix refactoring with feature changes -- -- -- -- -- -- [ ] Functions are small (< 50 lines) [ ] Functions do one thing [ ] No duplicated code [ ] Descriptive names (variables, functions, classes) [ ] No magic numbers/strings [ ] Dead code removed [ ] Related code is together [ ] Clear module boundaries [ ] Dependencies flow in one direction [ ] No circular dependencies [ ] Types defined for all public APIs [ ] No any types without justification [
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- OKHP3/skillz
- Source file
- docs/archive/skill-redundancy-2026-09-19/browser-refactor/refactor/SKILL.md
- Fixed revision
- 7b187777d42ab7bc7bab1e5f2c940cd3139ecebf
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: OKHP3/skillz · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-10T10:00:54.850Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.