Agent skill

Routine Dup Unifier

by bex-co in bex-co/beancount-io

Autonomous maintenance routine that finds duplicated implementations of the same logic within one monorepo package, merges them into the single best copy, repoints every caller, deletes the rest…

MITAuto-check passedDevelopment

Install Routine Dup Unifier

skills CLI
$ npx skills add bex-co/beancount-io --skill routine-dup-unifier -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bex-co/beancount-io routine-dup-unifier --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bex-co/beancount-io.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/routine-dup-unifier .claude/skills/routine-dup-unifier && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
routine-dup-unifier
GitHub stars
296
Token cost
~837 tokens
SKILL.md length
369 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

Autonomous maintenance routine that finds duplicated implementations of the same logic within one monorepo package, merges them into the single best copy, repoints every caller, deletes the rest…

  • Works in 6 steps: Scope → Discover → Prove it → …
  • Explicitly invokes /routine-dup-unifier
  • SKILL.md covers Contract, Workflow, What NOT to do and Arguments
  • Calls npx, yarn and make

What it does

Routine Dup Unifier is an agent skill from bex-co/beancount-io. Autonomous maintenance routine that finds duplicated implementations of the same logic within one monorepo package, merges them into the single best copy, repoints every caller, deletes the rest, and ships each unification via /ship. Use only when the user explicitly invokes /routine-dup-unifier or asks to merge/deduplicate duplicated code. SKIP for code with no remaining callers (routine-dead-code-removal), needless indirection around a single implementation (routine-abstraction-improver), and duplication across…

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Monorepo tooling. The repository describes itself as: 💰 Double-entry bookkeeping made easy — plain-text accounting for humans and AI agents. Polished iOS & Android app built with React Native + Expo. The licence is MIT.

When your agent uses it

  • Explicitly invokes /routine-dup-unifier
  • Asks to merge/deduplicate duplicated code
  • Is these are two copies of the same logic

Example prompts

  • “these are two copies of the same logic; make them one”
  • “/routine-dup-unifier”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Scope
  2. Discover
  3. Prove it
  4. Fix
  5. Verify
  6. Ship

What it can do on your machine

Read from SKILL.md and the folder at commit 2e520db. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • yarn
    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Routine Dup Unifier loads about 837 tokens when it runs. Until then it costs about 166 tokens; SKILL.md has 369 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~166
When it runs · the whole SKILL.md, loaded when a task matches
~837

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bex-co/beancount-io at commit 2e520db, republished under its MIT licence (© bex-co). 369 words, ~837 tokens.

Download SKILL.mdSave it as .claude/skills/routine-dup-unifier/SKILL.md (or your agent's skills folder).
name
routine-dup-unifier
description
Autonomous maintenance routine that finds duplicated implementations of the same logic within one monorepo package, merges them into the single best copy, repoints every caller, deletes the rest, and ships each unification via /ship. Use only when the user explicitly invokes /routine-dup-unifier or asks to merge/deduplicate duplicated code. SKIP for code with no remaining callers (routine-dead-code-removal), needless indirection around a single implementation (routine-abstraction-improver), and duplication across two packages — that is reported, never merged. The core trigger is "these are two copies of the same logic; make them one".

Task: Merge duplicated implementations into one

Usage: /routine-dup-unifier [package-or-path]

Find two (or more) live copies of the same logic inside one package, prove they are semantically the same, keep the best one, repoint all callers, delete the rest, and ship via /ship.

Contract

Read .agents/skills/routine-shared/contract.md first — preconditions, scope resolution, verify gates, ship protocol, budget, universal STOPs. Floor even without it: never ship red; one finding per ship; anything in a DO_NOT_DO.md is a hard STOP.

Workflow

1. Scope

Resolve scope per the contract. Duplication is a within-one-package concern here; never widen scope mid-run.

2. Discover

Agent-driven search — Grep for repeated names, similar signatures, and shared distinctive string literals (error messages, format strings, regexes); read sibling directories that grew in parallel (helpers/utils files, per-screen copies of formatting or validation logic). Optional accelerator with no new dependency: npx --yes jscpd --min-tokens 50 <pkg>/src --output <pkg>/tmp/ (output stays in the gitignored tmp/).

3. Prove it
  • Read every copy end to end — name similarity is not proof.
  • Semantics must be identical, or differ only in ways trivially covered by a parameter that keeps the survivor simpler than the sum of the copies.
  • The intended survivor is test-covered for the behavior all callers rely on; if not, write those tests first (they are part of the finding).
Show full SKILL.md (157 more words)Show less
4. Fix

Keep the better copy (better tested, more used, better placed). Port any unique behavior from the losers, repoint every caller, delete the losers, and move over any tests that pinned loser-only behavior worth keeping. Re-run the package's dead-code detector (yarn lint:deadcode / make deadcode) to confirm nothing was orphaned.

5. Verify

Owning package's full gate per the contract.

6. Ship

Compose /ship for this one unification. Loop within budget.

What NOT to do

  • Never merge across packages. Packages are independent by repo rule (no new cross-package imports). Cross-package duplication goes in the summary as a report, nothing more.
  • If unification requires an abstraction more complex than either original (config objects, strategy callbacks, mode flags), skip the finding — a slightly duplicated simple thing beats a unified complicated one.
  • Never delete a copy before every caller is repointed and green.
  • The deliberate clean-room reimplementations noted in .pm/DO_NOT_DO.md (e.g. fava-slim vs vendored fava) are not duplication findings.

Arguments

$ARGUMENTS

© bex-co, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/routine-dup-unifier of bex-co/beancount-io.

Open the folder on GitHubat commit 2e520db

Compare with similar skills

Routine Dup Unifier next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Routine Dup Unifier compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Routine Dup Unifier this skillbex-co/beancount-io296—~837Automated safety check: PassMIT
Sanity Radar Investigatesanity-io/sanity6.4k—~1.5kAutomated safety check: PassMIT
Nx Importnrwl/nx29k6 repos~3.5kAutomated safety check: PassMIT
Nx Workspacenomcopter/react-mosaic4.8k8 repos~1.9kAutomated safety check: PassCustom licence
Electron Multi-Process ArchitectureiOfficeAI/AionUi33k1 repos~1.8kAutomated safety check: PassApache-2.0
Nx Run Tasksnomcopter/react-mosaic4.8k8 repos~613Automated safety check: PassCustom licence

Similar skills

  • Sanity Radar Investigate

    sanity-io/sanity

    Official

    Investigate a suspected Studio performance regression surfaced by Studio Radar or the bench suite — confirm the signal against host calibration, narrow the commit range, confirm with an A/B…

    6.4k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Nx Import

    nrwl/nx

    Import, merge, or combine repositories into an Nx workspace using nx import.

    29k GitHub starsUsed in 6 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Nx Workspace

    nomcopter/react-mosaic

    Explore and understand Nx workspaces. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 8 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Tells the agent where new code belongs in an Electron multi-process project and which APIs each process may use, with rules for new bridges, services, agents and workers.

    33k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • Nx Run Tasks

    nomcopter/react-mosaic

    Helps with running tasks in an Nx workspace. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 8 repos~613 tokens
    DevelopmentAuto-check passed
  • Astro Developer

    withastro/astro

    Official

    Comprehensive guide for developing in the Astro monorepo. An agent skill from withastro/astro.

    63k GitHub starsUsed in 1 repo~1.5k tokens
    DevelopmentAuto-check passed

More from bex-co/beancount-io

All 27 skills in this repo
  • Beancount Close

    bex-co/beancount-io

    Close an accounting period in a Beancount ledger by reconciling each active account through beancount-reconcile, checking assertions and recurring gaps, reviewing flags, then proposing a commit with…

    297 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Beancount Import

    bex-co/beancount-io

    Import a bank or card CSV, OFX/QFX, or QIF export into an existing Beancount ledger.

    297 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Beancount Importer Author

    bex-co/beancount-io

    Write or repair a reusable Beangulp importer from a sample bank export, with reviewed golden files and a passing test harness.

    297 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Beancount Init

    bex-co/beancount-io

    Scaffold a new Beancount ledger with bea init and validation, with optional Fava browser setup when requested.

    297 GitHub stars~1.2k tokensUpdated today
    Auto-check: notes
  • Beancount Options

    bex-co/beancount-io

    Record a described options trade or lifecycle event as validated Beancount transactions through bea, after review and confirmation.

    297 GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Beancount Reconcile

    bex-co/beancount-io

    Reconcile one Beancount account against a CSV statement or pasted PDF text.

    297 GitHub stars~4.1k tokensUpdated today
    Auto-check passed

Questions about Routine Dup Unifier

What does Routine Dup Unifier do?

Autonomous maintenance routine that finds duplicated implementations of the same logic within one monorepo package, merges them into the single best copy, repoints every caller, deletes the rest…. Routine Dup Unifier is an agent skill from bex-co/beancount-io. Autonomous maintenance routine that finds duplicated implementations of the same logic within one monorepo package, merges them into the single best copy, repoints every caller, deletes the rest, and ships each unification via /ship.

When should I use Routine Dup Unifier?

Routine Dup Unifier fits situations like: explicitly invokes /routine-dup-unifier; asks to merge/deduplicate duplicated code; is these are two copies of the same logic.

How do I install Routine Dup Unifier in Claude Code?

Run `npx skills add bex-co/beancount-io --skill routine-dup-unifier -a claude-code`. Or copy the skill folder (.agents/skills/routine-dup-unifier in bex-co/beancount-io) into .claude/skills/routine-dup-unifier in your project. Claude Code loads it when a task matches its description.

How do I install Routine Dup Unifier in Codex?

Run `npx skills add bex-co/beancount-io --skill routine-dup-unifier -a codex`. Or copy the skill folder (.agents/skills/routine-dup-unifier in bex-co/beancount-io) into .agents/skills/routine-dup-unifier in your project. Codex loads it when a task matches its description.

Can I use Routine Dup Unifier in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bex-co/beancount-io --skill routine-dup-unifier -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/routine-dup-unifier, .gemini/skills/routine-dup-unifier, .github/skills/routine-dup-unifier and .opencode/skills/routine-dup-unifier in your project.

What does Routine Dup Unifier need to run?

Going by SKILL.md and its folder, Routine Dup Unifier needs the command-line tools its instructions call (npx, yarn and make). Our summary lists: Node.js.

Does Routine Dup Unifier access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Routine Dup Unifier safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Routine Dup Unifier use?

Routine Dup Unifier is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Routine Dup Unifier use?

About 837 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Routine Dup Unifier?

Skills that share tags, products or a category with Routine Dup Unifier: Sanity Radar Investigate (sanity-io/sanity, 6.4k stars), Nx Import (nrwl/nx, 29k stars), Nx Workspace (nomcopter/react-mosaic, 4.8k stars) and Electron Multi-Process Architecture (iOfficeAI/AionUi, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Routine Dup Unifier?

bex-co (a GitHub organization) maintains it in bex-co/beancount-io, which has 296 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 10, 2026.

Source: bex-co/beancount-io on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.