From hatch3r
Workflow for modifying business logic and data flows without adding features or UI changes. Includes ambiguity detection, fan-out discipline, and test updates.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hatch3r:hatch3r-logical-refactorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Note:** Commands below use `npm` as an example. Substitute with your project's package manager (`yarn`, `pnpm`, `bun`) or build tool when your project uses a different package manager.
Note: Commands below use
npmas an example. Substitute with your project's package manager (yarn,pnpm,bun) or build tool when your project uses a different package manager.
Task Progress:
- [ ] Step 0: Detect ambiguity (P8 B1)
- [ ] Step 1: Read the issue, specs, and existing tests
- [ ] Step 2: Produce a change plan
- [ ] Step 3: Implement the behavior change
- [ ] Step 4: Update tests and verify invariants
- [ ] Step 5: Open PR
Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target environment, or irreversibility. If any are found, ask the user via the platform-native question tool per agents/shared/user-question-protocol.md. Do not proceed under silent assumption. Default path, not an exception. Triggers for THIS skill: invariants to preserve vs change, before/after behavior specification, downstream consumer impact, spec update authority (this PR vs follow-up), and characterization-test requirement when current behavior is undertested.
Fan-out scales with task size; token cost never justifies serializing independent work (rules/hatch3r-fan-out-discipline.md P8 B2; agents/shared/efficiency-patterns.md). Emit sub_agents_spawned: { count, rationale } in your output.
Before modifying code, output:
${HATCH3R:VERIFY_GATE_ALL}
Resolved to the project's language-aware gate at sync time (fallback when detection is unknown: npm run lint && npm run typecheck && npm run test).
Use the project's PR template. Include:
npx claudepluginhub hatch3r/hatch3r --plugin hatch3rInternal code quality improvement workflow that restructures code and simplifies modules without changing external behavior. Use when refactoring to improve maintainability.
Plans software refactors while preserving behavior. Maps current structure, identifies contracts, and proposes incremental steps with validation.
Orchestrates behavior-preserving refactors: confirm tests green, restructure in small steps, keep tests green, review, and gated commit. Use when structure should improve but behavior must not change.