bob-refactor

bob-refactor is a skill for Claude Code, Codex from PounceAI/bob-control. It costs 106 tokens per session (1,092 once invoked), scanned A, original, Apache-2.0.

A workflow for asking IBM Bob, a coding tool, to refactor or restructure code while preserving its behavior. It includes steps for checking existing work and creating a specific refactoring task.

In plain words
What is it for?
Use it when the user explicitly wants IBM Bob to rename, extract, clean up, or reorganize code.
Why use it?
It helps route the request to the right worker and avoid duplicate tasks or unclear changes.

Skill for Claude CodeCodex

Part of the bob-companion plugin — 4 skills, 8 commands, 1 agent, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pounceai/bob-control/bob-refactor
Any agent
npx skills add PounceAI/bob-control --skill bob-refactor
Clone the repo
git clone --depth 1 https://github.com/PounceAI/bob-control

Made for: Claude Code, Codex.

Or install bob-companion, the plugin that ships this one along with the rest of its 4 skills, 8 commands, 1 agent, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bob-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/pounceai/bob-control/bob-refactor.svg)](https://agentmods.dev/skills/pounceai/bob-control/bob-refactor)
Your own site
<a href="https://agentmods.dev/skills/pounceai/bob-control/bob-refactor"><img src="https://agentmods.dev/badge/skills/pounceai/bob-control/bob-refactor.svg" alt="Measured on agentmods" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,092 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00106 $0.01092
Opus 5 $0.00053 $0.00546
Sonnet 5 $0.00021 $0.00218
Haiku 4.5 $0.00011 $0.00109

Measured 4d ago against content hash bda2b8639cbf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bob-refactor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-plugin/skills/bob-refactor/SKILL.md · 56 lines

What it actually says

You are the foreman. The user wants IBM Bob to refactor/restructure code. Bob's refactor mode edits files (standard risk: it can write and run build/test commands), so the task should make the behavior-preserving intent explicit and name the target.

Do this:

  1. Get board state in one call. Call board_status — it returns open_tasks (the live, non-terminal tasks) for the dedup check and worker_draining for step 3. Scan open_tasks for a near-identical pending refactor task; if one exists, skip creating another and point the user at it. (Ignore a blocked/needs_input near-match — it can't be pulled, so deduping against it would dead-end the request.) Only if open_tasks_truncated is true and you're unsure, fall back to list_tasks {status: 'pending'}. worker_draining is a step-1 snapshot — keep it for step 3 rather than re-calling board_status.

  2. Shape the refactor task with create_task:

    • mode: refactor.
    • title: imperative and specific, e.g. Refactor src/worker.ts: extract dispatch loop.
    • tags: ['refactor'] (+ a domain tag when obvious). If step-1 worker_draining shows a tag-pinned drainer serving this checkout, add its pin tag too — a worker only pulls tasks whose tags include its pin, else the task sits pending.
    • priority: infer; default medium.
    • description: name the files/scope, the desired end-state, and the constraints — especially "Preserve behavior; keep the build and tests green." Call out anything off-limits. refactor mode reads files and runs git diff/git log itself, so name the scope rather than pasting a big diff.
  3. Wait for Bob, then surface what changed. Report the new task id and that it routes to {refactor}. Use the worker_draining from step 1 (it reflects a 2.0 in-process loop as well as a 1.x worker): if worker_draining.draining is false, nothing is draining the board — say it's queued as #id and tell the user to start a drainer (open the repo in a Bob 2.0 window, whose in-process loop drains automatically, or run a 1.x worker via launch-worker.cmd), then stop. Otherwise a drainer is live and step 2 tagged the task to its pin, so don't report "queued" for a tag-pinned drainer — call await_task {task_id: id}. It blocks until the drainer runs the task and Bob settles it, so the result comes back this turn:

    • done → summarize what Bob changed from the task result and remind the user to review the diff / run tests before merging.
    • waiting (poll window elapsed) → call await_task again; keep waiting while Bob works. If it stays waiting across several calls, nothing is draining the board — say it's queued as #id; start a drainer (as above) or check /bob-board.
    • needs_input → Bob asked a question (in the response). A 1.x worker parks it on the board — surface it; once the user answers (answer_task_question) call await_task again. A 2.0 in-process Bob has no board reply channel, so surface the question for the user to steer in Bob's window (or re-file a follow-up with the answer baked in). blocked / cancelled → report Bob stopped, with the note reason (a refactor that couldn't keep tests green often lands here).
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 56 lines · 106 tokens per session scan A bda2b8639cbf

Subscribe to this mod's changes

bob-refactor is a skill published in the GitHub repository PounceAI/bob-control (1 stars, last pushed 21d ago), licensed Apache-2.0. It adds 106 tokens to every session and 1,092 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

evolve

Research-driven multi-cycle improvement director. Forms causal hypotheses about why scores are low, validates them with scout agents before attacking, dispatches axis-parallel fleet attacks, extracts transferable patterns, and runs indefinitely within a budget envelope. Accumulates a persistent belief model and…

SethGammon/Citadel · 60 tokens

improve

Autonomous quality improvement loop. Scores a target against a rubric, selects the highest-leverage axis, attacks it, verifies, documents, and loops. No pre-planning between iterations — each loop re-scores from scratch.

SethGammon/Citadel · 48 tokens

research

Focused research investigations. Converts questions into structured findings with confidence levels and source citations. Single agent by default; with --parallel (or when the question decomposes into 3+ independent angles) it spawns scout agents whose findings are compressed into a unified brief. Does not make…

SethGammon/Citadel · 67 tokens

ascii-diagram

Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

SethGammon/Citadel · 43 tokens

triage

GitHub issue and PR investigator. Pulls open issues/PRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to…

SethGammon/Citadel · 71 tokens

watch

File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through /do. Use for automatic reactions to file changes; do NOT use for…

SethGammon/Citadel · 70 tokens