duck-patch

duck-patch is a skill for Claude Code, Codex from sprngr/rubber-duck. It costs 42 tokens per session (2,028 once invoked), scanned A, original, MIT.

A focused editing skill for making small, clearly defined code changes after the solution direction is agreed.

In plain words
What is it for?
Use it to apply a targeted fix, patch a bounded problem, implement an agreed change, and run the smallest relevant check.
Why use it?
It limits implementation work to the smallest safe change and separates coding from broader product or architecture decisions.

Skill for Claude CodeCodex

Part of the rubber-duck plugin — 17 skills 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/sprngr/rubber-duck/duck-patch
Any agent
npx skills add sprngr/rubber-duck --skill duck-patch
Clone the repo
git clone --depth 1 https://github.com/sprngr/rubber-duck

Made for: Claude Code, Codex.

Or install rubber-duck, the plugin that ships this one along with the rest of its 17 skills.

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 duck-patch

README.md
[![agentmods](https://agentmods.dev/badge/skills/sprngr/rubber-duck/duck-patch.svg)](https://agentmods.dev/skills/sprngr/rubber-duck/duck-patch)
Your own site
<a href="https://agentmods.dev/skills/sprngr/rubber-duck/duck-patch"><img src="https://agentmods.dev/badge/skills/sprngr/rubber-duck/duck-patch.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,028 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.1 $0.00042 $0.02028
Opus 5 $0.00021 $0.01014
Sonnet 5 $0.00008 $0.00406
Haiku 4.5 $0.00004 $0.00203

Measured 5d ago against content hash 283f22419be7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

duck-patch 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 5d 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/duck-patch/SKILL.md · 183 lines

How it starts

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

Patch execution 🦆. Smallest safe diff first.

Purpose

Execute a narrowly scoped code change once the fix direction is known.

Philosophy Guardrails (skill-local)

Inherit shared guardrails from references/GUARDRAILS.md.

Skill-specific delta:

  • Executes bounded implementation only; product and architecture decisions remain with user.

Activation

Use when user asks for a targeted code edit and scope is clear (or can be clarified quickly).

Method

Subagent execution mode

When running as a subagent without a user channel (e.g., via duckling): do not apply edits or run commands. Execute scope clarification, Duck Ladder, and patch derivation as analysis; replace "apply minimal safe diff" and "run smallest agreed check" with approval-package content: the derived per-file diff blocks and verification plan. Emit per the host wrapper's contract (preflight + diffs + approval ask + status footer).

1. Clarify scope (if incomplete)

  • ask 1-3 targeted clarifying questions when context is incomplete
  • state assumptions explicitly when evidence is missing

Mutating action gate: Workspace-changing actions (require approval based on change type):

Semantic changes (require full execution approval):

  • Code/logic changes
  • Documentation/planning changes (README, markdown docs, ADRs, CONTEXT.md, runbooks, design notes), except typo-only fixes in non-code text files
  • Config/schema changes (settings, env vars, build config)
  • Dependency changes (package.json, requirements.txt, etc.)
  • File operations (create, delete, move)
  • Mutating commands (git commit, install, build, deploy)
  • Task delegation for implementation/patching

Cosmetic changes (require lightweight confirmation):

  • Formatting/whitespace-only changes
  • Typo fixes in non-code text files
  • Confirmation phrase: "Confirm to proceed with [formatting change/typo fix]?"

Edge cases:

  • JSDoc/docstring changes in code files are semantic (affects generated docs, code contracts)
  • Comments explaining logic in code are semantic (affects maintainability understanding)
  • Config comments are semantic (affects interpretation)
  • Document updates (ADRs, CONTEXT.md) are semantic
  • Examples in README that are code snippets are semantic (users copy-paste)

Read the full file on GitHub · 183 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 183 lines · 42 tokens per session scan A 283f22419be7

Subscribe to this mod's changes

duck-patch is a skill published in the GitHub repository sprngr/rubber-duck (8 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 2,028 once invoked, about $0.0002 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

decision-challenge

Use when a high-impact plan, migration or architecture claim needs a bounded adversarial challenge before commitment. Isolates claims from persuasion, attacks assumptions, reconciles doubts with evidence and emits proceed/hold/stop. NOT a finished-diff review (review/code-review), NOT SDD artifact consistency…

ericrisco/rsc-harness · 71 tokens

Logic Torturing 論理検証

変更に含まれる設計判断・実装選択の論理的整合性を徹底的に検証し、確証バイアスを排除して判断精度を高める.

s977043/river-review · 57 tokens

apply-constructive-dissent

Use when building or assessing a team, decision process, or organizational culture where you need genuine diverse thinking to surface before commitment — not after — and where the risk is false consensus rather than open conflict.

jeffreytse/grimoire-core · 46 tokens

adversary

Forces the model to build a genuine prosecution case against its own answer before delivering it.

Kshitijpalsinghtomar/depth-skills · 22 tokens

expert-redteam-review

Use when a user asks to evaluate a complex, high-impact, ambiguous, cross-functional, or hard-to-reverse decision; mentions expert panel, red team, adversarial review, rebuttal, judge, arbitration, risk review, challenge assumptions, poke holes, or wants stronger decision quality than a normal review.

carbonshow/intent-fluid · 67 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens