MCPInstall

w-refactor

Refactor selected code while preserving behavior, then verify.

Installs
647
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/blockmatic/basilic-skills --skill w-refactor
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads w-refactor automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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.

  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.
  4. Run the affected checks from the baseline. Restore behavior if they fail. Never the full pre-push suite.
  5. Docs: /w-docs if behavior or commands changed.

FAQ

What does the w-refactor skill do?

Refactor selected code while preserving behavior, then verify.

How do I install w-refactor?

Run npx skills add https://github.com/blockmatic/basilic-skills --skill w-refactor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/w-refactor/ (personal) or .claude/skills/w-refactor/ (project).

Which AI agents can use w-refactor?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is w-refactor safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains w-refactor?

It is published by blockmatic in blockmatic/basilic-skills. It has 647 recorded installs.

More from blockmatic/basilic-skills

View all →

workflow

blockmatic/basilic-skills

Basilic /w- playbooks packed so install lands at .agents/skills/workflow/w-plan and the rest.

w-review-plan

blockmatic/basilic-skills

Review a plan's Goals, Assumptions, Tasks, Risks, and References.

w-git-repair

blockmatic/basilic-skills

Resolve common Git problems and conflicts with inspected commands.

w-perf

blockmatic/basilic-skills

Measure bottlenecks with repository tools, then recommend or apply evidenced optimizations.

647 installs

w-api-test

blockmatic/basilic-skills

Add API tests that exercise public HTTP behavior against existing harnesses.

Backend & APIs647 installs

w-architecture

blockmatic/basilic-skills

Plan an implementation structure; durable decisions belong in ADRs and architecture docs.

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.