safe-refactoring-extract-method-composition
/safe-refactoring-extract-method-composition
Use this skill when refactor complex code safely using small step-by-step transformations and composition.
- Author
- nextboxis ↗
- Repository
- library-skill-agents ↗
- Licence
- MIT
- Last repository change
- 28.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 28.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use this skill when refactor complex code safely using small step-by-step transformations and composition.
Original author description
Use this skill when refactor complex code safely using small step-by-step transformations and composition.
How it works
- When to use
- Core principles
- Step-by-step workflow
- Specifics & examples
- Common mistakes & pitfalls
- Verification checklist
- Related skills
SKILL.md preview
--- name: safe-refactoring-extract-method-composition description: Use this skill when refactor complex code safely using small step-by-step transformations and composition. --- # Safe Refactoring Extract Method Composition ## When to use Use this skill when refactor complex code safely using small step-by-step transformations and composition. This applies across software engineering lifecycles, team code reviews, production debugging, prompt design, and architectural documentation. ## Core principles - **Clarity Over Cleverness**: Code, prompts, and technical documentation must prioritize clarity, predictability, and long-term maintainability over obscure shortcuts. - **Evidence-Based Engineering**: Every decision, bug resolution, and architectural choice must be supported by empirical data, minimal reproductions, or benchmark traces. - **Cognitive Load Minimization**: Design interfaces, APIs, and documents to minimize mental parsing overhead for future engineers and autonomous agents. - **Continuous Feedback Loops**: Incorporate automated verification, peer reviews, and post-task retrospectives to drive iterative improvement. ## Step-by-step workflow 1. **Define the objective and constraints**: State the exact technical outcome, acceptance criteria, and operational boundaries. 2. **Gather baseline telemetry and context**: Inspect relevant codebases, stack traces, system architecture diagrams, or log files. 3. **Execute structured analysis or implementation**: Apply domain-specific techniques (e.g., minimal reproduction, refactoring transforms, prompt templates). 4. **Validate against automated test assertions**: Run unit tests, linters, or schema validation parsers to verify behavioral correctness. 5. **Document rationale and trade-offs**: Record the 'why' behind choices, documenting rejected alternatives and operational considerations. 6. **Conduct retrospective review**: Share findings with stakeholders or record lessons learned in the team knowledge base. ## Specifics & examples - **Standard Engineering Artifact**: - Scope: Safe Refactoring Extract Method Composition - Core Deliverable: Actionable, verifiable engineering guidance aligned with Code review & refactoring. - Verification Rule: Tested against production workflows and peer-reviewed standards. - **Primary Focus Area**: Code review & refactoring principles designed to elevate engineering precision and team psychological safety. ## Common mistakes & pitfalls - Jumping directly into speculative fixes or complex rewrites before isolating the root cause. - Introducing premature abstractions that increase indirection and cognitive complexity. - Failing to document context and architectural trade-offs for subsequent maintainers. ## Verification checklist [ ] The technical deliverable or fix is validated with reproducible test assertions. [ ] Changes preserve backwards compatibility and maintain existing contract invariants. [ ] Documentation or commit logs clearly explain the rationale and trade-offs. ## Related skills - pull-request-review-comprehensive-checklist - constructive-code-review-feedback-empathy - solid-principles-code-review-compliance - technical-debt-identification-backlog-prioritization
Versions
The database has no other skills named safe-refactoring-extract-method-composition.
Database snapshot: 13.11.2026 · package version 1a2a14f7b70a (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
- 100code-refactoring
Simplify and refactor code while preserving behavior, improving clarity, and reducing complexity. Use when simplifying complex code, removing duplication, or applying design patterns. Handles Extract Method, DRY principle, SOLID principles, behavior validation, and refactoring patterns. - 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. - 100refactor
Safe refactoring with test guard — improve code quality without changing behavior. Use when: refactor, cleanup, restructure, simplify, extract function, improve code quality. - 100fai-refactor-complexity
Reduce code complexity with cyclomatic analysis, extract method patterns, and incremental refactoring strategies. Use when code has high complexity scores or is difficult to understand and test. - 100refactoring-patterns
Apply named refactoring transformations to improve code structure without changing behavior. Use when the user mentions "refactor this", "code smells", "extract method", "replace conditional", or "technical debt". Covers smell-driven refactoring, safe transformation sequences,… - 95ts-refactoring
ACTIVATE when refactoring TypeScript code. ACTIVATE for 'refactor', 'extract', 'redesign', 'simplify', or 'clean up' in a TypeScript / Node / NestJS context. This skill provides TS-specific examples for the cross-language refactoring rules defined in…