surgeon

surgeon is a skill for Claude Code from Rune-kit/rune. It costs 61 tokens per session (2,402 once invoked), scanned A, original, MIT.

An incremental code refactoring tool that changes one module at a time within a larger rescue workflow. It uses established migration patterns and requires safety checks and tests around each change.

In plain words
What is it for?
Use it to replace or deepen one module's implementation while preserving its interfaces, checking dependencies, and verifying each change.
Why use it?
It limits the amount of code affected at once, reducing the risk of breaking dependent parts of an existing system during refactoring.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rune plugin — 66 skills, 1 command, 66 agents, 6 hooks shipped together

Good fit Use it to replace or deepen one module's implementation while preserving its interfaces, checking dependencies, and verifying each change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rune-kit/rune/surgeon
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 Rune-kit/rune --skill surgeon
Clone the repo
git clone --depth 1 https://github.com/Rune-kit/rune

Made for: Claude Code.

Or install rune, the plugin that ships this one along with the rest of its 66 skills, 1 command, 66 agents, 6 hooks.

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 surgeon

README.md
[![agentmods](https://agentmods.dev/badge/skills/rune-kit/rune/surgeon/github.svg)](https://agentmods.dev/skills/rune-kit/rune/surgeon)
Your own site
<a href="https://agentmods.dev/skills/rune-kit/rune/surgeon"><img src="https://agentmods.dev/badge/skills/rune-kit/rune/surgeon/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 surgeon

Your own site · 80×15
<a href="https://agentmods.dev/skills/rune-kit/rune/surgeon"><img src="https://agentmods.dev/badge/skills/rune-kit/rune/surgeon.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,402 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.00061 $0.02402
Opus 5.5 $0.00024 $0.00961
Sonnet 5.5 $0.00012 $0.00480
Haiku 4.5 $0.00006 $0.00240

Measured 8d ago against content hash 33306f92f656, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

surgeon 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 8d 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.

skills/surgeon/SKILL.md · 233 lines

How it starts

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

surgeon

Purpose

Incremental refactorer that operates on ONE module per session using proven refactoring patterns. Surgeon is precise and safe — it applies small, tested changes with strict blast radius limits. Each surgery session ends with working, tested code committed.

Called By (inbound)

  • rescue (L1): Phase 2-N SURGERY — one surgery session per module
  • improve-architecture (L2): hand-off with proposal payload (depth/leverage/locality target + adapter list) — surgeon executes the deepening

Calls (outbound)

  • scout (L2): understand module dependencies, consumers, and blast radius
  • safeguard (L2): if untested module found, build safety net first
  • improve-architecture (L2): if no proposal payload provided, request one before refactoring
  • debug (L2): when refactoring reveals hidden bugs
  • fix (L2): apply refactoring changes
  • test (L2): verify after each change (REPLACE old shallow-module tests with deepened-interface tests, don't layer)
  • review (L2): quality check on refactored code
  • journal (L3): update rescue progress

Consuming proposal payloads

When invoked by improve-architecture, surgeon receives a proposal payload (YAML) containing:

  • module_path — target
  • current / target scores (depth/leverage/locality)
  • dependency_category — informs test strategy
  • suggested_seam — name of the deepened interface
  • adapters_planned — at least 2 adapters means a real seam; surgeon implements all listed
  • tests_to_replace — old shallow-module tests; DELETE in same commit as new tests land
  • tests_to_write_new — at the deepened interface

Honor the payload. If the payload's adapters_planned lists only 1 adapter, push back — single-adapter seam is indirection.

Read the full file on GitHub · 233 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. 8d ago First seen · 233 lines · 61 tokens per session scan A 33306f92f656

Subscribe to this mod's changes

surgeon is a skill published in the GitHub repository Rune-kit/rune (96 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 2,402 once invoked, about $0.0002 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-11-22.

Related

surgeon compared with skills from other repositories

surgeon next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
surgeonRune-kit/runeSkill962d agoMITA61Claude Code
tddsentimony/skillsSkill8todayMITA43Claude Code
using-agent-skillsvanja-emichi/a0_agent_skillsSkill63mo agoMITA95Claude Code, Codex
binder-design-tool-selectionzongtingwei/Bioclaw_Skills_HubSkill277mo agoMITA91Claude Code, Codex
end-to-end-protein-design-workflowzongtingwei/Bioclaw_Skills_HubSkill277mo agoMITA98Claude Code, Codex
agent-orchestratorlingxling/awesome-skills-cnSkill3411mo agoMITA41Claude Code
poc-spec-loopfabiandistler/agentsSkill2todaynoneA55Claude Code, Codex