duck-policy

duck-policy is a skill for Claude Code from sprngr/rubber-duck. It costs 58 tokens per session (3,752 once invoked), scanned A, original, MIT.

A set of rules that governs how an AI coding session handles requests and changes. It uses approval checks, safety exceptions, and a minimal-change approach.

In plain words
What is it for?
Use it to enforce approval gates, apply the stated duck rules, and keep agent sessions focused on small, controlled changes.
Why use it?
It helps prevent an agent from making unapproved or unnecessarily large changes while working on code.

Skill for Claude Code

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

Part of the rubber-duck plugin — 17 skills shipped together

Good fit Use it to enforce approval gates, apply the stated duck rules, and keep agent sessions focused on small, controlled changes.

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

Made for: Claude Code.

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-policy

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sprngr/rubber-duck/duck-policy"><img src="https://agentmods.dev/badge/skills/sprngr/rubber-duck/duck-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,752 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 183
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 275
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • low Excessive Agency · line 176
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
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.00058 $0.03752
Opus 5 $0.00029 $0.01876
Sonnet 5 $0.00012 $0.00750
Haiku 4.5 $0.00006 $0.00375

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

Security

Grade A, and why

duck-policy 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 12d 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-policy/SKILL.md · 312 lines

How it starts

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

Duck Policy

Purpose

Apply the rubber-duck enforcement system to the current agent session. Load this skill to make any agent rubber-duck-governed: approval gates before mutation, non-negotiable safety carve-outs, Duck Ladder minimal-change discipline, terse style, deferred debt markers.

This skill is the canonical enforcement source — the sections below define the guardrails. It is a meta-skill: applies governance to the current session, produces no task output of its own. Enforcement is the output. Adaptation/audit methodology lives in duck-adapt (philosophy-core.md); this skill is for runtime application, not skill authoring.

Activation

Load when:

  • The rubber-duck agent starts (it references this skill for enforcement)
  • User asks to "apply duck policy", "enforce approval gates", "use duck rules", "what are the duck rules"
  • Any non-duck agent should behave with rubber-duck discipline for the session

Method

  1. If running the duck-policy method, load assets/checkpoint-templates.md first (reusable output formats).
  2. Classify each incoming request:
    • simple (factual, small explanation) → answer directly, terse
    • workflow (debug/review/design/implement/test) → route via quack or work conversationally
  3. For non-mutating analysis: apply clarify-first, evidence-first, and Style.
  4. For any mutating action (edits, commands, delegation): walk Checkpoint 1-4 in order. Do not skip. Checkpoint 3 preflight is mandatory for every approval ask.
  5. Enforce safety carve-outs on every action — if a change would weaken or bypass one, refuse it.
  6. Consult references/EXAMPLES.md when a rule's application is unclear.
  7. Sequence gates as separate turns: approach-choice first, then clarify-first (if needed, complete it), then Checkpoint 1 framing + Confirm or revise?, then Checkpoint 2 options + Select an option. Do not stack approach-choice, clarify, and framing in one turn. A follow-up reply (confirm, 1) resolves the single open gate, then the next gate fires.

Read the full file on GitHub · 312 lines

Files

What ships with it

3 files 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. 12d ago First seen · 312 lines · 58 tokens per session scan A dc1ce8d466e5

Subscribe to this mod's changes

duck-policy is a skill published in the GitHub repository sprngr/rubber-duck (8 stars, last pushed 2d ago), licensed MIT. It adds 58 tokens to every session and 3,752 once invoked, about $0.0003 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

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

article-writing

Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

affaan-m/ECC · 57 tokens

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

taiyi-ui-design

A design-planning guide for describing how an application's user interface should look and behave. It produces a UI-DESIGN.md document covering layouts, components, interactions, accessibility, and error states.

Dong90/oh-my-taiyiforge · 35 tokens

remove

Remove a deployed framework or addon from the current workspace.

jmagly/aiwg · 12 tokens

ln-62-repository-publisher

Commits, pushes, and remotely verifies authorized repository changes. Not for releases, package publication, or announcements.

levnikolaevich/claude-code-skills · 30 tokens