dev-refactor
/dev-refactor
AI DevKit · Systematic structural or multi-file refactors across any stack while preserving behavior and public contracts. Use for reorganizing modules, boundaries, naming, APIs/contracts, staged refactor plans, or refactor risk review.
- Author
- codeaholicguy ↗
- Repository
- ai-devkit ↗
- Licence
- Apache-2.0
- Last repository change
- 25.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
AI DevKit · Systematic structural or multi-file refactors across any stack while preserving behavior and public contracts. Use for reorganizing modules, boundaries, naming, APIs/contracts, staged refactor plans, or refactor risk review.
Original author description
AI DevKit · Systematic structural or multi-file refactors across any stack while preserving behavior and public contracts. Use for reorganizing modules, boundaries, naming, APIs/contracts, staged refactor plans, or refactor risk review.
How it works
- Rules
- Workflow
- Stop
SKILL.md preview
--- name: dev-refactor description: AI DevKit · Systematic structural or multi-file refactors across any stack while preserving behavior and public contracts. Use for reorganizing modules, boundaries, naming, APIs/contracts, staged refactor plans, or refactor risk review. --- # Refactor Use for structural refactors. Use `dev-simplify` for local readability, dead code, or small logic cleanup. ## Rules - Preserve behavior and public contracts unless changes are explicit. - Classify first: small = local/no public movement; medium = multi-file/extraction/boundary/export touch; large = package/cross-package/staged migration/broad consumers. - For medium/large refactors, write a brief before editing: evidence, pressure, remaining delta, do/defer/avoid ranking, non-goals, contracts, target shape, validation, compatibility. - Do not propose target trees without current-code evidence: tree, file size/mixed concerns, imports/exports, consumers, validation commands. - Separate moves/renames from logic changes and design/API behavior questions. - Prefer existing conventions, provider locality, and the smallest structure that solves observed pressure. - Subtract before adding: remove dead wrappers, redundant validators, stale exports, and unused paths before introducing new structure. - Avoid taste refactors, premature abstractions, and thin one-file directories unless staged or conventional. - Validate with fresh command output. ## Workflow 1. Discover stack, configs, entry points, exact validation commands, and prior decisions when available. 2. Map contracts: exports, APIs, routes, CLI, config, schemas, events, files, docs, examples, consumers. 3. Map structure: directories, naming, boundaries, dependency direction, cycles, mixed concerns, duplication. 4. Check reader load: can a new reader find where key state comes from and what can change it quickly? Collapse pass-through layers that do not hide policy, adaptation, or real complexity. 5. If continuing work, compare current state and list only remaining delta. 6. Choose refactor type and shape: - extraction, reorganization, or design refactor - flat/internal, feature-first, domain-first, layer-first, core/adapters/entrypoints, service/repository - adapter-heavy: provider-specific stays provider-local; shared pure logic -> shared/core/formatting; SDK/client code -> adapter/entrypoint/delivery 7. Check boundary discipline: validate at CLI/config/network/external API edges; keep internal logic typed, domain-shaped, and pure where practical. 8. Prefer domain structure over repeated conditionals: state machine, typed model, registry/map, reducer, or ownership-focused module when it deletes branches or invalid states. 9. Rank moves as do now, defer, or avoid. 10. Stage: baseline (run `dev-smoke` on affected flows; keep the script until the last stage) -> delete dead paths -> move/rename -> imports/call sites -> split/merge -> simplify -> exports/docs/tests. 11. For internal API changes, inventory callers, migrate them, and delete the legacy API in the same wave when no external contract requires compatibility. 12. Preserve or explain compatibility re-exports/wrappers/barrels like `types.ts` plus `types/`. 13. Validate: tests, compile/typecheck, lint, build, `dev-smoke` rerun matching the baseline, diff review. ## Stop Pause when contracts are unclear, baseline cannot be checked and no narrower validation exists, breaking changes need migration decisions, ownership/product decisions are required, or the work is becoming a rewrite.
Files in this package (2)
- SKILL.md 3 KB
- agents/openai.yaml 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · codeaholicguy/ai-devkit | 100 | Apache-2.0 |
| nchandar/dev-kit | 100 | MIT |
| HarunRRayhan/RayStack | 100 | MIT |
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 8a2f5cc29ba8 (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
- 100refactor
Behavior-preserving structural refactors with verification gates. Use in conversation when surveying or applying structural refactors. Also the loop entry skill when automation supplies hints (duplication_block, oversized_unit). Interactive default is survey only; apply edits… - 100refactor
Behavior-preserving structural refactors with verification gates. Use in conversation when surveying or applying structural refactors. Also the loop entry skill when automation supplies hints (duplication_block, oversized_unit). Interactive default is survey only; apply edits… - 100refactor
Behavior-preserving code refactoring. Use when the user asks to simplify complex or duplicated code, improve naming, control flow, or module structure, extract code, or clean up an implementation without changing functionality. Preserve public APIs unless the user explicitly authorizes a change. - 90integra-refactor-agent
Refactor existing frontend components and application code while preserving observable behavior, public contracts and accessibility. Use for cleanup, type safety, maintainability and evidence-based performance work; never edit without authorization for the proposed source changes. - 90refactor-planner
Plan behavior-preserving refactors and migrations from actual dependencies, callers and tests. Use when decomposing modules, untangling coupling or sequencing a multi-file change; deliver a plan for planning requests and continue into authorized implementation when the user… - 90refactor
Use when refactoring code while preserving behavior — checkpoint, extract, test, audit