本文へ移動
cccskills
無料GitHub で公開

refactor

Plan, execute, and validate a codebase modernization or refactor with clean-slate thinking while preserving semantics. Use when the user asks how to approach a rewrite vs incremental change or what the risk is (strategy), is ready to apply a refactor plan safely (implementation), or asks whether a refactor broke anything or is complete (validation).

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abiスター 19(GitHub 19 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(4)

  • SKILL.md4.7 KB
  • references/implementation-playbook.md3.0 KB
  • references/strategy-guide.md1.3 KB
  • references/validation-checklist.md912 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Refactor

One skill, three phases (merged from the former refactor-strategy, refactor-implementation and refactor-validation skills on 2026-09-21). Run the host gate before and after.

Host gate means the repository's own full gate, named in its AGENTS.md/CLAUDE.md. In abi (/Users/donald/sources/repos/abi) that is ./tools/check.sh (it drives ./tools/cargo.sh; never invoke bare cargo there); hand-run cargo test there needs < /dev/null. A bare cargo test is not a gate: in a default-members workspace it can run zero tests and pass.

Phase 1: strategy

Use when: This skill should be used when the user asks how to approach a modernization — e.g. 'should we rewrite or do this incrementally', 'plan a refactor of X', 'what's the risk here' — at the start of significant work.

Provides structured approaches for modernizing codebases using clean-slate thinking while preserving semantics.

When to use

Apply this skill at the beginning of any significant modernization effort.

Core Principles

  • Always start by defining the ideal modern implementation ("what would this look like written today?").
  • Identify invariants and behavioral contracts that must be preserved.
  • Choose strategy based on risk, size, and coupling: incremental, strangler-fig phased, or full rewrite of a module.
  • Produce a concrete plan with milestones, validation gates, and rollback options.

Recommended Process

  1. Capture current behavior and success criteria (tests, contracts, SLAs).
  2. Sketch the ideal modern design (modules, types, error handling, concurrency model, APIs).
  3. Perform gap analysis between current and ideal.
  4. Decide transformation strategy:
    • Small/low-risk → direct rewrite of the module.
    • Large/high-risk → phased (strangler fig, parallel implementation, feature flags).
  5. Define validation criteria for each phase (parity tests, property tests, performance budgets).
  6. Document the plan with clear "Definition of Done" for each step.

Clean-Slate Mindset

When designing the target:

  • Use current language idioms and stdlib features.
  • Prefer explicit over implicit.
  • Design for testability and observability from day one.
  • Eliminate accidental complexity introduced by historical constraints.
  • Choose composition and clear boundaries.

Additional Resources

  • references/strategy-guide.md — detailed decision trees and examples of each strategy.
  • examples/sample-plan-outline.md — real plan outlines from previous modernizations.

Use this skill before touching code. Always run the host gate (see above) before and after.

Optional host settings

For repo-local strictness (focus areas, gate list, claims discipline), copy the example template from the modern-refactor package to the host project as an optional Claude-side local override file (host-side only; this skill does not ship or auto-load host overrides).

Phase 2: implementation

Use when: This skill should be used when the user is ready to execute a refactor plan and asks how to apply it safely — e.g. 'implement this modernization plan', 'extract this safely', 'how do I cut over without breaking things'.

Safe transformation techniques for applying modern designs while preserving behavior.

Principles

  • Write modern impl beside old (parallel) when risk high.
  • Use strangler fig for gradual cutover.
  • Validate at each step with the host gate, parity, contracts.
  • Prefer direct boring code.

Additional Resources

  • references/implementation-playbook.md
  • examples/parallel-extract-outline.md

Pair with the Rust-aware abi or refactor-planner agent for larger modules.

Phase 3: validation

Use when: This skill should be used when the user asks to verify a refactor is done correctly — e.g. 'did I break anything', 'is this refactor complete', 'validate this change meets modern standards' — as the final gate.

Validation layers for modernization: behavioral parity, modern quality, structural.

Layers

  • Behavioral: contracts, tests, host gate, check-parity pass.
  • Modern: apply patterns from modern-patterns, no legacy smells.
  • Structural: boundaries clean, no god files, explicit over implicit.

Additional Resources

  • references/validation-checklist.md

Run the validation skill plus a Rust-aware abi or refactor-planner agent review as the final step.

<!-- synced from central: ~/.grok/skills/refactor/SKILL.md -->

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Maintain the Abbey / Aviva / Abi Discord system prompts in the Rust abbey-bot (`src/ask.rs`) and keep the hosted Grok bots (Grok Bot Abbey, Aviva Grok) in step with them. Use when the user says "improve grok bots", "abbey prompt", "persona prompt", "ask.rs", "system prompt", "tip floor", asks to change how Abbey/Aviva/Abi speak on Discord, or after an abbey-bot PR merges and the hosted bot's tip floor needs bumping. Runs as /abbey-system-prompt.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Validate ABI docs and external collateral against repo evidence and docs/contracts/external-claims-audit.mdx. Use when auditing claims, scanning docs for unsupported QPS/sharding/FHE/AES language, checking one claim before publish, or re-confirming the external-claims audit. Agent procedure only — not a CLI or slash command. Pair with abi-doc-claims-sync when editing docs.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Synchronize ABI Markdown and docs claims with executable behavior. Use before editing README, AGENTS.md, CLAUDE.md, GEMINI.md, docs/**/*.mdx, walkthroughs, changelogs, or any old ABI Markdown that mentions WDBX, MCP, GPU, clustering, compression, FHE, agents, or benchmarks.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Plan and execute ABI repo work from the TODO board, roadmap/spec docs, stable Rust 1.99.1 constraints, and validation gates. Use when the user asks to find ABI todos/roadmaps, organize a large implementation from tasks/todo.md, or decide the next safe work slice. Distinct from the goals skill — that skill owns the persistent ledger tasks/goals.md; this skill plans from the active board and north-star specs.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Validate ABI MCP JSON-RPC stdio and its custom loopback HTTP compatibility endpoint, including auth, limits, notifications, and shutdown.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Review ABI's 16 compiled-in plugin fixtures, manifest validation, manual bundled registry, and real CLI/MCP run dispatch without claiming dynamic loading.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

donaldfilimon のスキルをすべて見る

このスキルの問題を報告する