plumb-refactor

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

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/plumbkit/plumb/plumb-refactor
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.

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. 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.00022 $0.01684
Opus 5 $0.00011 $0.00842
Sonnet 5 $0.00004 $0.00337
Haiku 4.5 $0.00002 $0.00168

Measured 2d ago against content hash 77ec1c48dbc2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 2d ago), licensed MIT. It adds 22 tokens to every session and 1,684 once invoked, about $0.0001 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

yaml

Validate and understand schema-backed YAML (Kubernetes, Flux, and JSON-Schema configs) with the yayamlls language server. Use when editing or reviewing .yaml/.yml files, diagnosing schema validation errors, configuring .yayamlls.yaml, suppressing a diagnostic, or working with Flux HelmRelease / Kustomization rendering.

home-operations/yayamlls · 69 tokens

use-modern-go

Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.

JetBrains/go-modern-guidelines · 32 tokens

code-guidelines-go

Go 1.24–1.27 coding guidelines for the dimetron/pi-go AI agent runtime. Use this skill whenever writing, reviewing, or refactoring ANY Go code in pi-go. This covers idiomatic style, error handling, concurrency, project layout, testing (table-driven, fuzz, benchmarks, synctest), new stdlib usage, golangci-lint v2…

dimetron/pi-go · 124 tokens

go-127

What changed in Go 1.27 (released August 2026) and how it changes the way Go is written in pi-go. Use this skill when writing or reviewing Go that could use a 1.27 feature, when bumping the go directive in go.mod, when a build or test behaves differently after a toolchain upgrade, or when code-guidelines-go points…

dimetron/pi-go · 177 tokens

bubbletea-testing

Use this skill whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go. Triggers include any mention of testing Bubble Tea models, teatest, golden file testing for TUIs, testing tea.Cmd or tea.Msg, snapshot testing terminal output, or writing tests for any Go CLI/TUI that uses the Elm…

dimetron/pi-go · 139 tokens

design-review

Deep design review of Go codebase — naming, structure, consistency, interfaces, error handling. Scores each dimension and provides actionable fixes.

dimetron/pi-go · 30 tokens