refactor

Solid

Test-first refactoring — audit coverage, add characterization tests, apply changes with safety net, run quality stack and review loop. TRIGGER when: user wants to restructure existing Python code without changing behaviour; phrases: "refactor X", "clean up Y", "extract Z", "restructure this module", "improve code quality". SKIP when: bug fixes (use `/develop:fix`); new features (use `/develop:feature`); mixed refactor+feature — run `/develop:refactor` first, then `/develop:feature`; non-Python projects.

Code & Development 23 stars 3 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<objective> Test-first refactoring. Audit coverage, add characterization tests if missing, apply changes with safety net. NOT for: - bug fixes (use `/develop:fix`) - new features (use `/develop:feature`) - `.claude/` config changes (use `/foundry:manage` (requires foundry plugin)) - non-Python projects (JS/TS/Go/Rust) — toolchain assumes pytest; use language-native toolchain instead - mixed refactor+feature tasks — run /develop:refactor first, then /develop:feature; do not attempt both in single skill run Quality stack (Branch Safety Guard, Codex Pre-pass, Progressive Review) requires `foundry` plugin; when absent, Step 5 quality stack skipped with a visible warning — output lower quality but workflow still completes. </objective> <constants> - MAX_INNER_CYCLES: 5 (change-test cycles per outer session — Step 4 safety break) </constants> <compaction> Key boundary: end of Step 2 — coverage audit complete, before characterization test writing in Step 3. Second boundary: end of Step 4 — refactor edits applied, before review stack in Step 5. Preserve at boundary 1: dev-dir, target path, coverage audit summary, plan-file, --keep items. Preserve at boundary 2: dev-dir, changed files list, test outcomes. </compaction> <workflow> <!-- Agent Resolution: resolved at runtime via $_DEV_SHARED; source at develop/skills/_shared/agent-resolution.md (installed path) --> ## Agent Resolution ```bash _PATHS=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_develop}/bin/dev_shared_resolve....

Details

Author
Borda
Repository
Borda/AI-Rig
Created
5 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

feature

TDD-first feature development — crystallise API as a demo test, drive implementation to pass it, run quality stack and progressive review loop. TRIGGER when: user asks to build new functionality, add a capability, or implement a feature in a Python project; phrases: "add X", "implement Y", "build Z feature", "create a new module for". SKIP when: bug fixes (use `/develop:fix`); refactoring without new behaviour (use `/develop:refactor`); non-Python projects; `.claude/` config changes (use `/foundry:manage`).

23 Updated today
Borda
AI & Automation Solid

fix

Reproduce-first bug resolution — capture bug in failing regression test, apply minimal fix, run quality stack and review loop. TRIGGER when: user reports a bug, regression, or unexpected behaviour in Python code with a traceback, failing test, or issue number; phrases: "fix this bug", "repair X", "broken since Y", "test failing". SKIP when: CI-only failures without local traceback (use `/develop:debug` first); new features (use `/develop:feature`); `.claude/` config issues (use `/foundry:audit`); non-Python projects.

23 Updated today
Borda
Code & Development Solid

refactor

Restructure existing code without changing its behavior, through a test-gated refactoring loop: a named target, a green suite over that target before any edit, a planned sequence of small named refactorings, and the full suite re-run after every step. Use when the user wants to refactor, restructure, clean up, simplify, or improve the design of existing code, or to apply refactoring recommendations from a code-review or architectural-analysis report. This skill changes code; it does not review code (use code-review), assess architecture (use architectural-analysis), or build new behavior test-first (use tdd). Do not use it on code inside an active tdd loop; the refactor step of tdd owns that cleanup.

126 Updated 2 days ago
testdouble