duck-tidy

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

An audit for comments and documentation that no longer match the code or describe behavior that was removed.

In plain words
What is it for?
Finding stale comments, checking non-project documentation for contradictions, and handing confirmed cleanup findings to a separate patching step.
Why use it?
Outdated notes can mislead developers and coding agents about how the project currently works.

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 Finding stale comments, checking non-project documentation for contradictions, and handing confirmed cleanup findings to a separate patching step.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sprngr/rubber-duck/duck-tidy
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-tidy
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-tidy

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sprngr/rubber-duck/duck-tidy"><img src="https://agentmods.dev/badge/skills/sprngr/rubber-duck/duck-tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,435 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.00065 $0.02435
Opus 5 $0.00032 $0.01218
Sonnet 5 $0.00013 $0.00487
Haiku 4.5 $0.00006 $0.00244

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

Security

Grade A, and why

duck-tidy 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 11d 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-tidy/SKILL.md · 223 lines

How it starts

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

Stale comment and doc cleanup 🦆🧹. Audit-first, evidence-backed staleness detection.

Purpose

Identify stale/outdated comments and non-CONTEXT docs so they stop polluting future sessions and confusing agents and developers. Audit-first; edits hand off to duck-patch.

Philosophy Guardrails (skill-local)

Inherit shared guardrails from references/GUARDRAILS.md.

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

Skill-specific delta:

  • Staleness evidence-backed: comment contradicts current code, describes behavior no longer existing, or documents worktree-only add/remove never merged to main.
  • TODO/FIXME/HACK/XXX markers out of scope (duck-debt owns the ledger).
  • ADR/design notes historic by design: if info is superseded, flag it; do not edit.

Activation

Audit-only (default): scan, report, no edits. Signals: "duck-tidy", "stale comments audit", "outdated docs audit".

Audit-and-edit: audit, then hand agreed findings to duck-patch. Signals: "tidy and fix comments", "clean up stale comments".

Method

1. Scan scope

Scope: explicit paths/globs from user, else worktree files (tracked + untracked, git-ignored excluded) minus CONTEXT.md, .duck-tape/, and common generated dirs (build/, dist/, node_modules/, coverage/, target/).

If the repo's generated dirs differ, ask one question before scanning.

If scope unclear, ask one question: single file / directory / worktree diff vs default branch.

Collect code comments, doc comments, non-CONTEXT markdown in scope.

2. Gather staleness evidence

Stale iff any rule holds:

  • Contradiction: text contradicts current code (outdated invariants, wrong parameter semantics, old return type or signature).
  • Removed behavior: describes functionality no longer present (referenced symbol/function/feature deleted).
  • Worktree-only add/remove: documents behavior added then removed in the current worktree, never merged to the default branch. Verify via git diff <default-branch>: behavior exists only in unmerged worktree changes. Resolve default branch with git symbolic-ref refs/remotes/origin/HEAD, fall back to main. For untracked files, confirm worktree-only status via git status --porcelain.

Read the full file on GitHub · 223 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. 11d ago First seen · 223 lines · 65 tokens per session scan A 8bf19295d342

Subscribe to this mod's changes

duck-tidy is a skill published in the GitHub repository sprngr/rubber-duck (8 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 2,435 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

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

security-review

Perform a focused security review of pending git changes to identify high-confidence security vulnerabilities with real exploitation potential. Use this skill when the user asks for a security review, security audit, vulnerability scan, or wants to check pending changes on a branch for security issues before merging.…

waybarrios/opencode-power-pack · 64 tokens

huggingface-llm-trainer

Train or fine-tune language models with TRL or Unsloth on Hugging Face Jobs, including SFT, DPO, GRPO, reward models, and GGUF conversion. Use for cloud LLM training; use huggingface-vision-trainer for vision tasks.

waybarrios/opencode-power-pack · 65 tokens

feature-dev

Guide a feature implementation through a structured seven-phase workflow with deep codebase understanding, clarifying questions, parallel architecture design, and quality review. Use this skill when the user asks to build a new feature, add functionality, or wants a methodical approach to implementation rather than…

waybarrios/opencode-power-pack · 62 tokens

review

Validate plans, execution, or PRs against wish criteria — returns SHIP / FIX-FIRST / BLOCKED with severity-tagged gaps.

automagik-dev/genie · 29 tokens

reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, and posts via GraphQL. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

tobihagemann/turbo · 71 tokens