跳到正文
cccskills
免费在 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.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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-devkit星标 1,654(GitHub 1,654 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

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

包含的文件(2)

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

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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-devkit16542026年10月25日 更新

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-devkit16542026年10月25日 更新

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-devkit16542026年10月25日 更新

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-devkit16542026年10月25日 更新

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-devkit16542026年10月25日 更新

changelog

免费

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-devkit16542026年10月25日 更新

查看 codeaholicguy 的全部技能

报告此技能的问题