Skip to content
cccskills
FreePublished on GitHub

dev-refactor

Plan and guide structural refactors across files or modules while preserving behavior and public contracts. The skill maps dependencies and consumers, ranks changes by priority, and lays out staged moves with validation steps and compatibility considerations.

OriginalShow the original 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.

codeaholicguy/ai-devkit1,654 stars(GitHub 1,654 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Reorganizing modules across multiple files
  • Planning a staged package or boundary refactor
  • Reviewing API and compatibility risks
  • Mapping consumers before moving or renaming code

Files included (2)

  • SKILL.md3.5 KB
  • agents/openai.yaml291 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Find active Codex, Claude Code, and other AI agents, inspect their recent context, and exchange messages with them. Use it to locate an agent, share information, or send a request and wait for a reply through ai-devkit commands.

  • Finding an active agent by name or status
  • Checking an agent’s recent context before contacting it
  • Sending information or requesting a reply from another agent
codeaholicguy/ai-devkit1.7KUpdated Oct 25, 2026

agent-management

FreeSummary

Manage running AI agents with ai-devkit commands: identify sessions, list and inspect agents, start workers, assign or group tasks, resume sessions, and stop agents. The skill helps track assignments and verify completed work before reporting it.

  • List agents and identify the current session
  • Inspect an agent before assigning work
  • Start a worker and delegate a task
codeaholicguy/ai-devkit1.7KUpdated Oct 25, 2026

Coordinate ongoing work across multiple agents by checking progress, resolving dependencies, unblocking agents, relaying relevant results, and verifying completion. Use it to supervise a shared workflow across repeated check-ins.

  • Coordinating agents with dependent tasks
  • Unblocking an agent waiting for input
  • Relaying results between agents
codeaholicguy/ai-devkit1.7KUpdated Oct 25, 2026

ai-devkit-setup

FreeSummary

Check whether AI DevKit is ready on the local machine, identify setup gaps it can address, and run the narrowest relevant setup for supported agent harnesses. Recheck status afterward and report remaining manual actions.

  • Check whether local AI DevKit setup is ready
  • Set up missing supported agent integrations
  • Review remaining setup steps after onboarding
codeaholicguy/ai-devkit1.7KUpdated Oct 25, 2026

brainstorm

FreeSummary

Explore ideas for products, content, names, strategies, technical approaches, or decisions. It frames the goal and constraints, generates distinct options, challenges assumptions and tradeoffs, then narrows the result to three strong choices with reasons and a next step.

  • Generating and comparing product or project ideas
  • Exploring names, content angles, or campaign concepts
  • Pressure-testing technical approaches or important decisions
codeaholicguy/ai-devkit1.7KUpdated Oct 25, 2026

changelog

FreeSummary

Update the top Unreleased section of CHANGELOG.md using commits since the latest release. Add one concise linked line per commit, using a pull request link when evidence is clear and a commit link otherwise, while preserving the file’s existing style.

  • Adding recent commits to an Unreleased changelog
  • Creating release notes from commits since the last release
  • Linking changelog entries to their commits or pull requests
codeaholicguy/ai-devkit1.7KUpdated Oct 25, 2026

See all skills by codeaholicguy

Report a problem with this skill