AI DevKit · Systematic structural or multi-file refactors across any stack while preserving behavior and public contracts.
SkillScore82Maintained
Automatic
◆Coding pack
Last verified 9/26/2026
What it changes
Passed 16 of 19 test cases with the skill, and 11 of 19 without it.
Without skill59%
With skill82%
Checks it passed that the model alone missed
Classifies the refactor scope as small.
Requires including current codebase evidence in the brief.
Requires including a do-defer-avoid action ranking in the brief.
and 5 more in the full report
6 fixed12 passed either way3 still failing1 broke
Pass-rate lift
+23 pp
Tokens
-1%
Agent turns
0%
Response time
-21%
Model gemini-3.6-flashMeasured 9/26/2026v218 of 22 cases passed with skill · 19 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
I am refactoring a 300-line function inside a single internal file `src/services/reportGenerator.ts` to break it down into three helper functions in the same file. No exports are changing and no files are being moved or created. How should this scope be categorized and handled?
What was checked, without and with the skill
Checked
Without skill
With skill
Classifies the refactor scope as small.
Missed
Passed
Omits the requirement for a formal refactor brief.
Passed
Passed
case-07 · gemini-3.6-flash · 9/26/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md38 linessingle file
Refactor
Use for structural refactors. Use simplify-implementation 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
Discover stack, configs, entry points, exact validation commands, and prior decisions when available.
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.
If continuing work, compare current state and list only remaining delta.
Check boundary discipline: validate at CLI/config/network/external API edges; keep internal logic typed, domain-shaped, and pure where practical.
Prefer domain structure over repeated conditionals: state machine, typed model, registry/map, reducer, or ownership-focused module when it deletes branches or invalid states.
For internal API changes, inventory callers, migrate them, and delete the legacy API in the same wave when no external contract requires compatibility.
Preserve or explain compatibility re-exports/wrappers/barrels like types.ts plus types/.
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.
Find code with Exa — API usage examples, error fixes, library docs, and GitHub repositories. Use when you need a working code snippet, to resolve an error, find an open-source implementation, or pull up official docs for a language/framework. Runs a local script against the Exa API; no MCP server required.