code-refactoring-small
/code-refactoring-small
Refactor code units whose size or mixed responsibilities impede understanding, testing, or change. Use when recent work makes a function, class, or module materially harder to reason about.
- Author
- aspiers ↗
- Repository
- ai-config ↗
- Licence
- GPL-3.0
- Last repository change
- 08.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.
GPL-3.0, otwarta.
What it does and when to use it
Refactor code units whose size or mixed responsibilities impede understanding, testing, or change. Use when recent work makes a function, class, or module materially harder to reason about.
Original author description
Refactor code units whose size or mixed responsibilities impede understanding, testing, or change. Use when recent work makes a function, class, or module materially harder to reason about.
How it works
- Workflow
SKILL.md preview
--- name: code-refactoring-small description: Refactor code units whose size or mixed responsibilities impede understanding, testing, or change. Use when recent work makes a function, class, or module materially harder to reason about. --- # Refactoring Large Code Units Improve cohesion and readability rather than optimizing for an arbitrary line count. ## Workflow 1. Read the whole unit and its important callers or tests. 2. Identify the concrete source of difficulty: mixed responsibilities, deep nesting, hidden state transitions, repeated setup, or an unstable boundary. 3. Choose extractions that have meaningful names and inputs. Follow existing repository structure rather than introducing layers solely to make units shorter. 4. Preserve behavior and public contracts unless the task explicitly changes them. 5. Verify with focused tests and the repository's normal quality gates. A long linear function may be clearer than many tiny helpers; a short function may still combine unrelated responsibilities. Use size as a prompt to inspect, not a pass/fail threshold. Keep the refactor scoped to what improves the current change. If a larger architectural split is justified, explain the trade-off and seek agreement before expanding scope.
Versions
The database has no other skills named code-refactoring-small.
Database snapshot: 13.11.2026 · package version 339776c92011 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100memory-refactoring
Use when the user wants to rename, extract, split, move, or restructure code safely. Examples: "rename this function", "extract this into a module", "split this class", "move this to a separate file", "refactor this service". - 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". - 85Refactoring
This skill should be used when the user asks to "refactor code", "rename function", "extract method", "reduce complexity", "migrate code", "code migration", "modernize code", "split class", "move code", or mentions code restructuring and refactoring operations. - 100class-refactoring
Use when refactor PHP classes to improve structure, readability, and maintainability while preserving behavior - 100code-refactoring
When the user says 'refactor this', 'rename class', or 'move method'. Safely refactors code in any language — finds all callers, updates downstream dependencies, verifies via quality tools. - 100vmcp-review
Reviews vMCP code changes for known anti-patterns that make the codebase harder to understand or more brittle. Use when reviewing PRs, planning features, or refactoring vMCP code.