duck-tape

duck-tape is a skill for Claude Code from sprngr/rubber-duck. It costs 64 tokens per session (4,739 once invoked), scanned A, original, MIT.

A two-level memory system for coding-agent sessions: a persistent CONTEXT.md file and temporary working state in .duck-tape files. It can merge, resume, initialise, prune, and migrate that state.

In plain words
What is it for?
Use it to compact a session, resume previous work, update CONTEXT.md, merge notes, remove old state files, or migrate stored session information.
Why use it?
It helps preserve useful project and session context across interruptions while keeping short-term working notes separate from long-term information.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code; mentions OpenCode.

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

Good fit Use it to compact a session, resume previous work, update CONTEXT.md, merge notes, remove old state files, or migrate stored session information.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sprngr/rubber-duck/duck-tape"><img src="https://agentmods.dev/badge/skills/sprngr/rubber-duck/duck-tape.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,739 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.00064 $0.04739
Opus 5 $0.00032 $0.02370
Sonnet 5 $0.00013 $0.00948
Haiku 4.5 $0.00006 $0.00474

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

Security

Grade A, and why

duck-tape 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.

The scan reads SKILL.md. This mod also ships 7 executable files (hooks/extract-raw.ps1, hooks/extract-raw.sh, hooks/extract-state.ps1, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-tape/SKILL.md · 327 lines

How it starts

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

Session memory management 🦆📼. Context hygiene, persistent memory, session state handoff.

Purpose

Two-tier memory management for active sessions.

  • Tier 1 (persistent): CONTEXT.md in cwd. Long-term, repo-tracked. 7 fixed sections, deterministic merge.
  • Tier 2 (working): .duck-tape/<session_id>.state.md. Short-term, not committed. Agent State schema. Staging input for CONTEXT.md merge.

Preserve fidelity, keep interruption low.

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:

  • Persistent artifact safety: CONTEXT.md is long-lived and likely committed. Redaction is non-negotiable before any write.
  • Session state safety: .duck-tape/<id>.state.md is workspace-local but may be read by next agent. Redaction applies.
  • Rotation cap: max 10 state files in .duck-tape/. Eviction precedence: auto dropped first, then recovered, then manual.
  • Pre-compact marker (.duck-tape/.last-compact) is harness-written, non-semantic. No approval required for marker write.

Activation

State-only (default): write session state file. Signals: /duck-tape, "save session state", "checkpoint session".

Merge (CONTEXT.md): write state file plus merge into CONTEXT.md. Signals: "compact session", "update CONTEXT.md", "persist memory", /duck-tape merge.

Resume: detect compaction and reload checkpoint. Signals: /duck-tape resume, "resume session". Read-only when manual checkpoint exists. If only auto-checkpoint or no state file, invokes LLM-assisted recovery that writes -recovered.state.md (approval required).

Method

1. Redact incoming content

Scan session content for secrets/PII: API keys, passwords, tokens, connection strings, env var values, personally identifiable information. On detection: reject flagged content, report findings, ask user to redact source or confirm mask-in-place (<REDACTED>). If a write would contain raw secrets, reject it; write masked content only after user confirmation. Applies to both tiers.

Read the full file on GitHub · 327 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. 11d ago First seen · 327 lines · 64 tokens per session scan A 0dbb7ea1057c

Subscribe to this mod's changes

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

agent-carnet

Use this skill when the user asks to save, recall, find, or organize notes. Triggers on: 'remember this', 'save this', 'note this', 'what did we discuss about...', 'check the notebook', 'find in carnet'. Also use proactively when discovering findings worth preserving across sessions.

yamadashy/repomix · 67 tokens

neat-freak

Knowledge and governance closeout: reconcile project docs, rule files (CLAUDE.md/AGENTS.md), authorized agent memory, and workspace residue with what the code and runtime actually do, so the next session or the next person starts from one current answer. Trigger when the user names "neat-freak", "洁癖", or "/neat" — and…

KKKKhazix/khazix-skills · 202 tokens

mnemos

Task-scoped memory lifecycle — typed MnemoGraph prevents lossy context compaction by treating facts/decisions/code-refs/handoffs as distinct node types with per-type eviction policies.

alinaqi/maggy · 40 tokens

grimoire

Use when the user says 'update context', 'update claude', 'save library', or after significant project changes.

cwinvestments/memstack · 28 tokens

keep-the-why

Extract and preserve the reasoning code cannot explain - decisions, rejected alternatives, workarounds, incidents, constraints - plus project setup and maintainer interviews. Not for what changed (see Keep a Changelog) - only why. Also the place for complaints, feedback and settings changes about this skill itself.

oliver-zehentleitner/keep-the-why · 65 tokens

ln-31-performance-optimizer

Profiles and improves a measured latency, throughput, CPU, memory, or I/O problem. Not for speculative tuning or cosmetic refactoring.

levnikolaevich/claude-code-skills · 34 tokens