Agent skill

Refactorer

by hex in hex/claude-council

A behaviour-preserving restructure is named: extract, rename, move, split a module, or remove duplication across three or more sites.

MITAuto-check passedAgent Workflows

Install Refactorer

skills CLI
$ npx skills add hex/claude-council --skill refactorer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hex/claude-council refactorer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hex/claude-council.git skills-src && mkdir -p .claude/skills && cp -r skills-src/mods/council-pane/specialists/refactorer .claude/skills/refactorer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
refactorer
GitHub stars
843
Token cost
~984 tokens
SKILL.md length
609 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

A behaviour-preserving restructure is named: extract, rename, move, split a module, or remove duplication across three or more sites.

  • Works in 4 steps: Restate the target shape in one or two… → Read the project's own instructions… → List every site the change touches:… → …
  • Agent Workflows work in your project
  • SKILL.md covers Scope the change, Baseline, Edit and Tests, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Refactorer is an agent skill from hex/claude-council. A behaviour-preserving restructure is named: extract, rename, move, split a module, or remove duplication across three or more sites.

Its SKILL.md is about 980 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: Claude Code plugin that asks several AI coding agents the same question and shows their answers side by side. Gemini, OpenAI, Grok, Perplexity, Kimi and any model OpenRouter… The licence is MIT.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “/refactorer”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Restate the target shape in one or two sentences: what moves where, what
  2. Read the project's own instructions (AGENTS.md, CONTRIBUTING, lint and
  3. List every site the change touches: definitions, call sites, imports,
  4. Decide what counts as observable behaviour here: public API, CLI output,

What it can do on your machine

Read from SKILL.md and the folder at commit 23867e1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Refactorer loads about 984 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 609 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~984

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hex/claude-council at commit 23867e1, republished under its MIT licence (© hex). 609 words, ~984 tokens.

Download SKILL.mdSave it as .claude/skills/refactorer/SKILL.md (or your agent's skills folder).
name
refactorer
description
A behaviour-preserving restructure is named: extract, rename, move, split a module, or remove duplication across three or more sites.

Refactorer

Restructure code without changing what it does. The result should be simpler to read, with one way to do each thing and no leftover paths.

Scope the change

  1. Restate the target shape in one or two sentences: what moves where, what gets a new name, what gets merged.
  2. Read the project's own instructions (AGENTS.md, CONTRIBUTING, lint and format config) and match the existing style, even where you would choose differently.
  3. List every site the change touches: definitions, call sites, imports, re-exports, config keys, docs, tests, and string references such as reflection, routing tables or serialized names. Search broadly, then read each hit. A textual match is only a candidate.
  4. Decide what counts as observable behaviour here: public API, CLI output, file formats, wire formats, error messages, log lines other tools parse. Those must not change. If the requested refactor would change one, stop and report it.

Baseline

  • Run the tests that cover the touched code before editing. Record the command and result.
  • If tests already fail, record which ones and do not treat them as caused by you. Do not fix them unless the task says to.
  • If nothing covers the touched code, say so. Then choose the cheapest real check you can run before and after, such as the CLI command, a sample request or a build, and record it.

Edit

  • Edit site by site. Never apply a regex or mass replace to write code. The same text can mean different things in different places; only reading the site tells them apart. Search tools are fine for finding sites.
  • Update every caller in the same change. Delete the old path: no alias, shim, wrapper, re-export layer, deprecated copy, or commented-out code. Version control is the archive.
  • Exception: if the old name is a public interface with outside consumers, stop and report it. Compatibility is a decision for the owner, not for you.
  • Import from the defining module, not through a barrel file that hides where things live.
  • Unify duplication only where three or more sites share the logic. Two similar sites may be coincidence; leave them and note it.
  • Remove test-only production seams (exports, flags, injection hooks with no production caller) only when the task includes them.
  • Do not mix in behaviour changes, bug fixes, dependency bumps or formatting sweeps. Record anything you notice for the report.
Show full SKILL.md (216 more words)Show less

Tests

  • Tests should pass unchanged. If a test fails because it asserts the old structure (an import path, a private function name, an internal call order) rather than behaviour, update it to the new structure and list it in the report.
  • If a test fails on behaviour, your refactor changed behaviour. Fix the refactor, not the test.
  • Never delete, skip or weaken a test to get a pass.

Verify

  1. Re-run the baseline commands and compare results. They should be the same.
  2. Run the build, type checker and linter the project uses.
  3. Search again for the old names and paths. No references should remain except in history or changelog files.

Evidence to record

  • The site list, with how many sites were changed.
  • Baseline and final results of the same commands.
  • Tests that changed, each with why the change is structural, not behavioural.
  • Leftover references, if any, and why they stay.

Stop conditions

Stop and report when the refactor would change observable behaviour, when an old name has outside consumers, when the baseline cannot be established, or when a site's meaning is unclear enough that you would be guessing.

Handoff

Report the new shape, the sites changed, the before and after results, the tests you changed and why, and the follow-ups you deliberately left out.

© hex, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in mods/council-pane/specialists/refactorer of hex/claude-council.

Open the folder on GitHubat commit 23867e1

Compare with similar skills

Refactorer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Refactorer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactorer this skillhex/claude-council843—~984Automated safety check: PassMIT
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official37k11 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k34 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers296k2 repos~5.1kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official37k8 repos~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    37k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 34 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    296k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    37k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    794 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed

More from hex/claude-council

All 10 skills in this repo
  • Local Council Execution

    hex/claude-council

    Runs a local council when no external AI providers are configured.

    843 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Council Execution

    hex/claude-council

    Executes council queries by running the query pipeline across selected AI providers (Gemini, OpenAI, Grok, Perplexity), displaying formatted responses verbatim, and generating a synthesis of…

    843 GitHub stars~824 tokensUpdated yesterday
    Auto-check passed
  • Deep Execution

    hex/claude-council

    Executes agent-enhanced council queries as one Workflow of parallel Claude analyst agents that each query a provider, evaluate response quality, ask follow-up questions, and return a schema-enforced…

    843 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Provider Integration

    hex/claude-council

    Adds new AI providers to claude-council, configures provider API settings, troubleshoots provider connections, and documents the provider script interface.

    843 GitHub stars~635 tokensUpdated yesterday
    Auto-check passed
  • Bug Fixer

    hex/claude-council

    A bug reproduces, the expected behaviour is clear, and the fix stands apart from the current work.

    843 GitHub stars~991 tokensUpdated yesterday
    Auto-check passed
  • CI Fixer

    hex/claude-council

    A CI job fails on a named revision and the fix belongs in code, config or tests, not in the CI provider.

    843 GitHub stars~941 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Refactorer

What does Refactorer do?

A behaviour-preserving restructure is named: extract, rename, move, split a module, or remove duplication across three or more sites. Refactorer is an agent skill from hex/claude-council. A behaviour-preserving restructure is named: extract, rename, move, split a module, or remove duplication across three or more sites.

When should I use Refactorer?

Refactorer fits situations like: agent Workflows work in your project.

How do I install Refactorer in Claude Code?

Run `npx skills add hex/claude-council --skill refactorer -a claude-code`. Or copy the skill folder (mods/council-pane/specialists/refactorer in hex/claude-council) into .claude/skills/refactorer in your project. Claude Code loads it when a task matches its description.

How do I install Refactorer in Codex?

Run `npx skills add hex/claude-council --skill refactorer -a codex`. Or copy the skill folder (mods/council-pane/specialists/refactorer in hex/claude-council) into .agents/skills/refactorer in your project. Codex loads it when a task matches its description.

Can I use Refactorer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hex/claude-council --skill refactorer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactorer, .gemini/skills/refactorer, .github/skills/refactorer and .opencode/skills/refactorer in your project.

What does Refactorer need to run?

SKILL.md names no scripts, command-line tools or credentials: Refactorer is instructions for the agent only.

Does Refactorer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Refactorer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Refactorer use?

Refactorer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Refactorer use?

About 984 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Refactorer?

Skills that share tags, products or a category with Refactorer: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 296k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refactorer?

hex (a GitHub user) maintains it in hex/claude-council, which has 843 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: hex/claude-council on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.