abstraction-finder

abstraction-finder is a skill for Claude Code from jerseycheese/agent-skills. It costs 74 tokens per session (1,462 once invoked), scanned A, original, MIT.

A code-analysis workflow that finds repeated patterns which may deserve shared code, such as a helper, service, template, or utility.

In plain words
What is it for?
Use it to scan a chosen code area, group similar logic, and identify the exact places that could use a small shared implementation.
Why use it?
It helps reduce genuine duplication while avoiding abstractions that are based only on imagined future needs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the workflow-skills plugin — 36 skills shipped together

Good fit Use it to scan a chosen code area, group similar logic, and identify the exact places that could use a small shared implementation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jerseycheese/agent-skills/abstraction-finder
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 jerseycheese/agent-skills --skill abstraction-finder
Clone the repo
git clone --depth 1 https://github.com/jerseycheese/agent-skills

Made for: Claude Code.

Or install workflow-skills, the plugin that ships this one along with the rest of its 36 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 abstraction-finder

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/abstraction-finder"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/abstraction-finder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,462 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.00074 $0.01462
Opus 5.5 $0.00030 $0.00585
Sonnet 5.5 $0.00015 $0.00292
Haiku 4.5 $0.00007 $0.00146

Measured 1mo ago against content hash cc2fa6cef8f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

abstraction-finder 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 1mo 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/abstraction-finder/SKILL.md · 119 lines

How it starts

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

Abstraction Finder

Find repetition that has earned an abstraction, then propose the smallest general-purpose form of it. Scan the code (whole repo or a named area), cluster genuine duplicates, and for each cluster propose a shared helper/service/base class/template/util with the concrete call sites it replaces.

The point isn't to list every near-match — it's to surface a short set of extractions that remove real duplication without over-abstracting. This is the counterweight to kiss: kiss strips a change to its minimum and resists new abstractions; this skill argues for an abstraction, but only once the duplication is real and repeated. Hold both — the target is the abstraction the code has actually earned, not the one you can imagine needing.

Scope first

State what you're scanning before you scan — the whole repo, a directory, a domain, one feature — and list it so the user can confirm you're pointed at the right code. A whole-repo scan is noisy; a scoped scan is actionable. Ask for a scope if the user didn't give one.

Process

  1. Find repetition. Search for near-identical logic, duplicated markup, parallel utilities, and copy-paste clusters within the scope.
  2. Read the real occurrences. Surface similarity is not sameness — two functions can look alike and differ in a way that matters. Open each candidate before calling it a duplicate. (This is evidence-check territory: "these are duplicates" and "no existing helper covers this" are claims to confirm by reading, not assert from memory.)
  3. Cluster and count. Group true duplicates and record every call site (file:line). Count is the primary signal: three or more genuine occurrences is a candidate, two is a watch-item, one is not a duplicate.
  4. Check the rule of three and what already exists. Before proposing anything, confirm the language/framework or an existing shared helper doesn't already cover it. Don't reinvent what the stack provides. Two occurrences is a coincidence; three is a pattern. The exception: if two known sites are already drifting (the same fix had to be applied in both, or they've started to disagree), unify early — drift is itself a reason.
  5. Propose the smallest form. For each qualifying cluster: its shape (helper / service / base class / template / util), where it lands, a concrete signature, and the call sites it replaces.
  6. Weigh the trade-off. Name the cost (indirection, coupling, a new thing to maintain) against the benefit (call sites removed, single source of truth). Not every duplicate is worth collapsing.

Read the full file on GitHub · 119 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. 1mo ago Changed · -4 lines · -75 tokens per session cc2fa6cef8f5
  2. 3mo ago First seen · 123 lines · 149 tokens per session scan A 940e59de8b06

Subscribe to this mod's changes

abstraction-finder is a skill published in the GitHub repository jerseycheese/agent-skills (4 stars, last pushed 4d ago), licensed MIT. It adds 74 tokens to every session and 1,462 once invoked, about $0.0003 per session on Opus 5.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-09-03.

Related

abstraction-finder compared with skills from other repositories

abstraction-finder next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
abstraction-finderjerseycheese/agent-skillsSkill44d agoMITA74Claude Code
chorus-councilvalpere/chorusSkill106mo agoMITA62Claude Code, Codex
chorus-parallel-reviewvalpere/chorusSkill106mo agoMITA69Claude Code, Codex
omh-code-reviewrlaope/oh-my-hermesSkill6.4kyesterdayMITA18Claude Code
omh-image-cardsrlaope/oh-my-hermesSkill6.4kyesterdayMITA20Claude Code
liveagent-code-reviewStack-Cairn/LiveAgentSkill2.3kyesterdayMITA54Claude Code, Codex
spec-kitty-runtime-reviewPriivacy-ai/spec-kittySkill1.7k13d agoMITA85Claude Code, Codex