plumb-refactor

plumb-refactor is a skill for Claude Code, Codex from plumbkit/plumb. It costs 22 tokens per session (1,684 once invoked), scanned A, original, MIT.

A safe editing guide for renaming symbols, moving files, and changing code across multiple files. A symbol is a named code element such as a function, type, or variable.

In plain words
What is it for?
Use it for workspace-wide identifier renames, file moves, and atomic edits that must either all succeed or all be rejected.
Why use it?
It keeps references and imports consistent and applies multi-file changes together instead of leaving half the edit behind.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for workspace-wide identifier renames, file moves, and atomic edits that must either all succeed or all be rejected.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/plumbkit/plumb/plumb-refactor
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.

Any agent
npx skills add plumbkit/plumb --skill plumb-refactor
Clone the repo
git clone --depth 1 https://github.com/plumbkit/plumb

Made for: Claude Code, Codex.

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 plumb-refactor

README.md
[![agentmods](https://agentmods.dev/badge/skills/plumbkit/plumb/plumb-refactor/github.svg)](https://agentmods.dev/skills/plumbkit/plumb/plumb-refactor)
Your own site
<a href="https://agentmods.dev/skills/plumbkit/plumb/plumb-refactor"><img src="https://agentmods.dev/badge/skills/plumbkit/plumb/plumb-refactor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plumb-refactor

Your own site · 80×15
<a href="https://agentmods.dev/skills/plumbkit/plumb/plumb-refactor"><img src="https://agentmods.dev/badge/skills/plumbkit/plumb/plumb-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00022 $0.01684
Opus 5.5 $0.00009 $0.00674
Sonnet 5.5 $0.00004 $0.00337
Haiku 4.5 $0.00002 $0.00168

Measured 3mo ago against content hash 77ec1c48dbc2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

plumb-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 3mo 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.

internal/cli/skills/plumb-refactor/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When asked to rename, move, or edit code across files in a codebase that has plumb available, use these tools rather than grep/sed or your client's own file-editing tool.

Semantic rename

Use rename_symbol for any identifier rename — workspace-wide, type-aware, updates all definitions and references including imports:

rename_symbol(uri="/path/to/file.go", symbol_name="OldName", new_name="NewName")   # preview
rename_symbol(uri="/path/to/file.go", symbol_name="OldName", new_name="NewName", dry_run=false)

Only uri and new_name are required. Identify the symbol by symbol_name — plumb resolves the identifier position for you; raw line/character is the fallback. dry_run defaults to true, so the first call returns a per-file diff to check and a second call with dry_run=false applies it.

Never use find_replace or grep+sed for identifier renames — they miss references across files and break imports.

Atomic cross-file edits

Use transaction_apply for changes spanning multiple files — validates all edits in memory first, then applies them all-or-nothing:

transaction_apply(operations=[
  {file_path: "/a.go", edits: [{old_string: "…", new_string: "…"}], expected_mtime: "…"},
  {file_path: "/b.go", edits: [{old_string: "…", new_string: "…"}], expected_mtime: "…"},
])

Moving files

Use rename_file for file moves — atomic, refuses to overwrite without overwrite=true:

rename_file(from="/old/path.go", to="/new/path.go")

Single-file edits: read → mtime → edit

  1. Call read_file and copy the mtime= value from the response header.
  2. Call edit_file with expected_mtime set to that value.

Editing several files in the same task no longer needs one read_file call each: read_multiple_files reads up to 20 paths in a single call, and each file's own per-file header carries the mtime/sha256 edit_file needs — the read is recorded per file exactly like read_file, so a later edit_file on any of them works under strict mode with no re-read.

Read the full file on GitHub · 78 lines

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. 3mo ago First seen · 78 lines · 22 tokens per session scan A 77ec1c48dbc2

Subscribe to this mod's changes

plumb-refactor is a skill published in the GitHub repository plumbkit/plumb (4 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 1,684 once invoked, about $0.0001 per session on Opus 5.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

plumb-refactor compared with skills from other repositories

plumb-refactor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
plumb-refactorplumbkit/plumbSkill4yesterdayMITA22Claude Code, Codex
yamlhome-operations/yayamllsSkill36todayAGPL-3.0A69Claude Code
use-modern-goJetBrains/go-modern-guidelinesSkill4.0k1mo agoApache-2.0A32Claude Code
modern-gosmallnest/pigoSkill50916d agoMITA102Claude Code, Codex
code-guidelines-godimetron/pi-goSkill235todayMITA124Claude Code, Codex
go-127dimetron/pi-goSkill235todayMITA177Claude Code, Codex
bubbletea-testingdimetron/pi-goSkill235todayMITA139Claude Code, Codex