refactor-code

SkillDev tools

Refactor selected code while preserving behavior, then verify. Use when the user types /refactor-code.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the refactor-code skill

What this skill tells your AI

The instructions your AI receives, as published by blockmatic/basilic in .agents/skills/workflow/refactor-code/SKILL.md and read by ahel’s review.

Purpose and inputs

Use the selected files or a named concern. Capture current behavior with tests, types, or a manual scenario before editing. Refactor does not authorize commit, push, or PR.

Steps

  1. Record a baseline: what callers depend on, which checks prove it, and what must not change.
  2. Improve structure in the smallest useful diff: extract duplication, clarify names, reduce nesting. Reuse existing packages. Do not add comments that restate the code.
  3. Change algorithms or data structures only with measured evidence from the repository's profiler, tests, or traces. Do not invent timings or impact percentages.
  4. Run the affected checks from the baseline. Restore behavior if they fail.

Verification

  • Observable behavior matches the baseline.
  • Affected checks were run and recorded as passed, failed, or not applicable.
  • No commit or push was created.

Handoff

Explain what changed and why, with the verification evidence. Stop at local edits unless the user asked to publish via /git-commit.

Signals

GitHub stars
89
Forks
11
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
refactor-code
Source
github.com/blockmatic/basilic