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.
npx skills add sprngr/rubber-duck --skill duck-refactorgit clone --depth 1 https://github.com/sprngr/rubber-duckWrote 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.
[](https://agentmods.dev/skills/sprngr/rubber-duck/duck-refactor)<a href="https://agentmods.dev/skills/sprngr/rubber-duck/duck-refactor"><img src="https://agentmods.dev/badge/skills/sprngr/rubber-duck/duck-refactor/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.
<a href="https://agentmods.dev/skills/sprngr/rubber-duck/duck-refactor"><img src="https://agentmods.dev/badge/skills/sprngr/rubber-duck/duck-refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, 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 119 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.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.01257 |
| Opus 5 | $0.00022 | $0.00629 |
| Sonnet 5 | $0.00009 | $0.00251 |
| Haiku 4.5 | $0.00004 | $0.00126 |
Grade A, and why
duck-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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Structured refactoring 🦆. Multi-file restructuring with reference tracking.
Purpose
Support code restructuring through bounded refactoring operations with explicit reference tracking and verification.
Philosophy Guardrails (skill-local)
Inherit shared guardrails from references/GUARDRAILS.md.
Skill-specific delta:
- Multi-file refactoring operations require execution approval with full reference tracking.
- Distinguish from single-file patches and complexity reduction.
Activation
Use when user asks to refactor, extract, rename across files, move code, inline, or convert patterns.
Trigger phrases:
- "refactor this"
- "extract this function/class/method"
- "rename this across the codebase"
- "move this to another file"
- "inline this function"
- "convert this callback to promise"
Method
Subagent execution mode
When running as a subagent without a user channel (e.g., via duckling): do not apply edits or run verification commands. Execute steps 1-5 as analysis; replace step 6 "execute refactoring" and step 7 "verify" with approval-package content: the derived per-file change plan (diff blocks where applicable) and verification plan. Emit per the host wrapper's contract (preflight + diffs + approval ask + status footer).
1. Clarify refactoring scope
- ask 1-3 targeted clarifying questions when context is incomplete
- state assumptions explicitly when evidence is missing
Ask one scoping question if any detail unclear:
- What to extract/rename/move/inline?
- Target destination (new file, existing file, new function name)?
- Scope boundaries (this module, whole codebase)?
2. Trace references and dependencies
Use read-only evidence gathering (similar to duck-debug trace mode):
- Locate all usages of target code
- Map imports/exports
- Identify callers and callees
- Find test files that reference target
- Note external dependencies
Output: "Found N references across M files: [list]"
3. Present refactoring plan
Before any edits, present bounded plan:
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.
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.
- 9d ago First seen · 165 lines · 43 tokens per session scan A 75a09ecf2aca
duck-refactor is a skill published in the GitHub repository sprngr/rubber-duck (8 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 1,257 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.
Other skills, from other repositories
cli-e2e
Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.
openlore-analyze-codebase
Run a full static OpenLore analysis and summarize architecture, call graph, refactoring issues, and duplicate code. Use when asked to analyze, map, or assess a codebase without LLM inference.
codex-agent
Use when you want a second-opinion review via Codex CLI, cross-verification after another agent implements changes, debugging help, or alternative implementation proposals. Requires Codex CLI to be installed and authenticated.
css-debug
Use this skill to diagnose CSS and frontend layout issues such as positioning, overflow clipping, Tailwind class conflicts, z-index stacking, and React rendering visibility problems.
ln-22-codebase-auditor
Audits cross-cutting code health, security, delivery, and maintainability when no specialist audit is primary. Not for a single delivery review.
config-validator
Validate AIWG configuration files and project setup for correctness and completeness.