refactoring
/refactoring
Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.
- Author
- RainingDaemons ↗
- Repository
- agents ↗
- Licence
- MIT
- Last repository change
- 09.11.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 09.11.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
Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.
Original author description
Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.
How it works
- 1. Load repository context first
- 2. Establish the safety net
- 3. Refactor in small, verified steps
- 4. Prove and finish
SKILL.md preview
--- name: refactoring description: Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits. license: MIT metadata: author: rainingdaemons/agents version: "1.0" --- # Refactoring Define the behavior-preservation boundary and establish verification before any structural edit. Align every change with the repository's own coding standards. ## 1. Load repository context first Before touching code, look for `CODING_STANDARDS.md`: - Search the repo root first, then `docs/`, `.github/`, and any directory that contains the code being refactored (nested standards files override the root one for their subtree). - If found, read it fully and treat it as the authority on naming, structure, error handling, testing, dependencies, and architectural boundaries. - Note any rule that constrains the refactor (e.g. layering, public API conventions, forbidden patterns, test requirements) and follow it in every edit. - If it is not found, say so briefly, infer conventions from the surrounding code (style, tests, lint/format config), and continue. Do not invent standards or create the file unless asked. - If the standards conflict with the requested refactor, or the existing code violates them, stop and flag it rather than silently choosing. Do not widen scope to fix unrelated violations. ## 2. Establish the safety net - Identify the behavior that must not change: public interfaces, failure behavior, ordering, side effects, and compatibility. - Find the existing verification (tests, type checks, linters, build) and run it before editing to record the baseline. - If coverage of the affected code is missing, add characterization tests that capture current behavior before restructuring, following the testing rules in `CODING_STANDARDS.md`. ## 3. Refactor in small, verified steps - Keep feature changes and bug fixes outside the refactor; report them instead of folding them in. - Move one ownership boundary at a time. - Preserve public interfaces, failure behavior, ordering, and compatibility unless explicitly scoped otherwise. - Keep every intermediate state buildable and testable; re-run verification after each step. - Avoid dependency or configuration growth unless correctness requires it, and respect any dependency policy in `CODING_STANDARDS.md`. - Follow the repo's conventions for naming, file layout, and comments in all new or moved code. ## 4. Prove and finish Run the same proof used for the baseline after the change. Stop when behavior matches and the requested structure is achieved. Summarize: what moved, which standards from `CODING_STANDARDS.md` applied, verification results, and any out-of-scope issues noticed but left untouched.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · RainingDaemons/agents | 90 | MIT |
| gabrieldulolmarques/refactoring-skill | 100 | CC-BY-4.0 |
| 4typen/skills | 100 | MIT |
| t8jwscc7qy-sketch/foma-skills | 100 | Apache-2.0 |
| mtwuser/zero-cloud-gravity | 100 | MIT |
| krzysztofsurdy/code-virtuoso | 100 | MIT |
| sagargupta16/claude-skills | 100 | MIT |
| nimadorostkar/Claude-Skills-collection | 100 | MIT |
| DariuszDusza/agentic-workflow-foundry | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version aa2fca641c8a (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
- 100fec-refactoring
Use when restructuring existing frontend code while preserving observable behavior, including responsibility extraction, module movement, conditional simplification, API cleanup, or data organization. Do not use for new feature behavior, behavior-changing bug fixes, dependency… - 90refactor
Use when refactoring code while preserving behavior — checkpoint, extract, test, audit - 100refactoring-expert
Expert safe, incremental, behavior-preserving refactoring. Trigger keywords: refactor, code smell, cleanup, technical debt, extract function, rename, inline, decouple, simplify, guard clause, legacy code, duplication, god class. Use to restructure code without changing behavior,… - 100refactoring-specialist
Use when you need to transform poorly structured, complex, or duplicated code into clean, maintainable systems while preserving all existing behavior. - 100oma-refactor
Restructure existing code while preserving observable behavior. Use for targeted technical debt or hotspot work with characterization tests. - 100code-simplifier
Code simplification skill for improving clarity, consistency, and maintainability while preserving exact behavior. Use when simplifying code, reducing complexity, cleaning up recent changes, applying refactoring patterns, or improving readability. Triggers on tasks involving…