Agent skill

Routine Abstraction Police

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

Autonomous maintenance routine that finds imports crossing a stated architectural boundary the wrong way — cross-package imports, dashboard features reaching into each other, backend-v2 transport…

MITAuto-check passedAgent Workflows

Install Routine Abstraction Police

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

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

GitHub CLI
$ gh skill install bex-co/beancount-io routine-abstraction-police --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-abstraction-police .claude/skills/routine-abstraction-police && 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-abstraction-police
GitHub stars
296
Token cost
~1k tokens
SKILL.md length
472 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

Autonomous maintenance routine that finds imports crossing a stated architectural boundary the wrong way — cross-package imports, dashboard features reaching into each other, backend-v2 transport…

  • Works in 6 steps: Scope → Discover — the stated rules and their… → Prove it → …
  • Explicitly invokes /routine-abstraction-police
  • SKILL.md covers Contract, The one proof rule, Workflow and What NOT to do, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Routine Abstraction Police is an agent skill from bex-co/beancount-io. Autonomous maintenance routine that finds imports crossing a stated architectural boundary the wrong way — cross-package imports, dashboard features reaching into each other, backend-v2 transport adapters touching models, mobile routes bypassing screens — and fixes each violation by moving code or inverting the dependency, shipping via /ship. Use only when the user explicitly invokes /routine-abstraction-police or asks to fix layering violations. Only rules stated in a AGENTS.md count; SKIP for too-many-layers…

Its SKILL.md is about 1k 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 Agent Workflows, covering Agent instruction files. 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-abstraction-police
  • Asks to fix layering violations
  • Is this import points the wrong way across a stated boundary

Example prompts

  • “this import points the wrong way across a stated boundary”
  • “/routine-abstraction-police”

Workflow steps

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

  1. Scope
  2. Discover — the stated rules and their greps
  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

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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 Abstraction Police loads about 1k tokens when it runs. Until then it costs about 175 tokens; SKILL.md has 472 words of instructions outside code blocks.

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

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). 472 words, ~1,035 tokens.

Download SKILL.mdSave it as .claude/skills/routine-abstraction-police/SKILL.md (or your agent's skills folder).
name
routine-abstraction-police
description
Autonomous maintenance routine that finds imports crossing a stated architectural boundary the wrong way — cross-package imports, dashboard features reaching into each other, backend-v2 transport adapters touching models, mobile routes bypassing screens — and fixes each violation by moving code or inverting the dependency, shipping via /ship. Use only when the user explicitly invokes /routine-abstraction-police or asks to fix layering violations. Only rules stated in a AGENTS.md count; SKIP for too-many-layers (routine-abstraction-improver) and duplicated logic (routine-dup-unifier). The core trigger is "this import points the wrong way across a stated boundary".

Task: Fix imports that cross a stated boundary the wrong way

Usage: /routine-abstraction-police [package-or-path]

Find an import that violates a boundary this repo has written down, fix it by moving code to the right layer or inverting the dependency, 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.

The one proof rule

A violation exists only against a rule stated in a AGENTS.md (root or scoped) or an ADR. Your own taste in layering is not a rule. Before fixing, quote the rule; re-read the scoped AGENTS.md of the target package for rules beyond the seed list below. No stated rule → no finding.

Workflow

1. Scope

Resolve scope per the contract.

2. Discover — the stated rules and their greps
  • Repo-wide (root AGENTS.md): no cross-package imports — grep for relative imports escaping the package root and cross-package path aliases.
  • dashboard (dashboard/AGENTS.md): one feature must not import another feature's private component/utility (cross-feature infrastructure belongs in src/common/); route files under src/routes/ stay thin and import the feature page — grep src/features/* for imports from sibling features.
  • backend-v2 (backend-cluster/backend-v2/AGENTS.md, Dependency and layer rules): resolvers/REST handlers delegate — they do not access models or orchestrate several services; workflows must not import GraphQL DTOs from api/; services stay transport-agnostic; models hold persistence only.
  • mobile (mobile/AGENTS.md): app/ route files mount screens from src/screens/ — screen logic does not live in app/; src/generated-graphql/ is codegen output nothing hand-edits.
3. Prove it

Read the violating import in context and quote the stated rule it breaks. Confirm the violation is real usage, not a type-only import a rule permits.

Show full SKILL.md (189 more words)Show less
4. Fix

Pick the smallest correct repair:

  1. Move the code to the layer both sides may depend on (src/common/, a service, src/shared/).
  2. Invert the dependency — pass the value/callback in as a parameter or prop instead of importing downward.
  3. Duplicate a tiny helper (≤10 lines, with a comment naming the twin) when sharing would demand a worse structure — explicitly not a routine-dup-unifier finding at that size.

For a cross-package violation, the fix lives entirely on the violating side (duplicate or restructure locally); touching the other package is a separate concern and usually a universal STOP.

5. Verify

Full owning-package gate, plus re-grep to show the violating pattern is gone and no new one was introduced.

6. Ship

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

What NOT to do

  • Never invent a boundary. If the structure feels wrong but no rule says so, propose the rule in the summary — don't enforce it.
  • Don't remove layers (routine-abstraction-improver) or unify duplicates (routine-dup-unifier).
  • Never "fix" a violation by weakening the rule's AGENTS.md wording.
  • Never hand-edit codegen output to satisfy a boundary — regenerate or restructure the source instead.

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-abstraction-police of bex-co/beancount-io.

Open the folder on GitHubat commit 2e520db

Compare with similar skills

Routine Abstraction Police 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 Abstraction Police compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Routine Abstraction Police this skillbex-co/beancount-io296—~1kAutomated safety check: PassMIT
Project Creatoraiskillstore/marketplace433—~5.9kAutomated safety check: PassNone
Docs Gardeningmhmzdev/the-holy-quran-app888—~1.1kAutomated safety check: PassMIT
Improve Idea Critiqueassafkip/kipi-system112—~729Automated safety check: PassMIT
Mine HistoryZoneMinder/zmNinjaNg112—~1kAutomated safety check: PassApache-2.0
Happier Profile And Optimizehappier-dev/happier1.9k—~3.2kAutomated safety check: PassMIT

Similar skills

  • Project Creator

    aiskillstore/marketplace

    Creates new projects in CCGG Business Operations with all required mechanisms automatically implemented.

    433 GitHub stars~5.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Docs Gardening

    mhmzdev/the-holy-quran-app

    Audit and maintain The Holy Qur'an app's knowledge base (AGENTS.md, .agents/rules/, docs/ OKF bundle) for staleness, broken cross-links, drift from code, and OKF structural issues.

    888 GitHub stars~1.1k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Improve Idea Critique

    assafkip/kipi-system

    Judges a pasted tip, post or video summary against what the kipi system already has, and returns adopt, skip or already-built with the files that back the verdict.

    112 GitHub stars~729 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Mine History

    ZoneMinder/zmNinjaNg

    A skill your agent uses when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or…

    112 GitHub stars~1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Happier Profile And Optimize

    happier-dev/happier

    The method for profiling and optimizing anything whose success is a measured cost — frame the phase and metric, choose an instrument that can actually see the cost, label the waste, falsify the…

    1.9k GitHub stars~3.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • User Onboarding Sop

    IgorWarzocha/Opencode-Workflows

    Generate AGENTS.md for end-user assistance. An agent skill from IgorWarzocha/Opencode-Workflows.

    122 GitHub stars~563 tokensUpdated 8 mo ago
    Business, Finance & HRAuto-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 Abstraction Police

What does Routine Abstraction Police do?

Autonomous maintenance routine that finds imports crossing a stated architectural boundary the wrong way — cross-package imports, dashboard features reaching into each other, backend-v2 transport…. Routine Abstraction Police is an agent skill from bex-co/beancount-io. Autonomous maintenance routine that finds imports crossing a stated architectural boundary the wrong way — cross-package imports, dashboard features reaching into each other, backend-v2 transport adapters touching models, mobile routes bypassing screens — and fixes each violation by moving code or inverting the dependency, shipping via /ship.

When should I use Routine Abstraction Police?

Routine Abstraction Police fits situations like: explicitly invokes /routine-abstraction-police; asks to fix layering violations; is this import points the wrong way across a stated boundary.

How do I install Routine Abstraction Police in Claude Code?

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

How do I install Routine Abstraction Police in Codex?

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

Can I use Routine Abstraction Police 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-abstraction-police -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-abstraction-police, .gemini/skills/routine-abstraction-police, .github/skills/routine-abstraction-police and .opencode/skills/routine-abstraction-police in your project.

What does Routine Abstraction Police need to run?

SKILL.md names no scripts, command-line tools or credentials: Routine Abstraction Police is instructions for the agent only.

Does Routine Abstraction Police access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Routine Abstraction Police 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 Abstraction Police use?

Routine Abstraction Police 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 Abstraction Police use?

About 1k tokens (SKILL.md is roughly 4.1k 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 Abstraction Police?

Skills that share tags, products or a category with Routine Abstraction Police: Project Creator (aiskillstore/marketplace, 433 stars), Docs Gardening (mhmzdev/the-holy-quran-app, 888 stars), Improve Idea Critique (assafkip/kipi-system, 112 stars) and Mine History (ZoneMinder/zmNinjaNg, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Routine Abstraction Police?

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.