abstraction-finder

abstraction-finder is a skill for Claude Code from jerseycheese/agent-skills. It costs 149 tokens per session (1,541 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 — 31 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 31 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 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,541 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.00149 $0.01541
Opus 5 $0.00075 $0.00771
Sonnet 5 $0.00030 $0.00308
Haiku 4.5 $0.00015 $0.00154

Measured 7d ago against content hash 940e59de8b06, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 7d 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 · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 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 · 123 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. 7d 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 (1 stars, last pushed 9d ago), licensed MIT. It adds 149 tokens to every session and 1,541 once invoked, about $0.0007 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-09-03.

Related

Other skills, from other repositories

chorus-council

Run an LLM council — Claude (correctness), Gemini (edge cases), Cursor (integration), Kilo (maintainability), and you (scope) tackle the same task in parallel. Use when the user wants multiple independent perspectives on a decision, approach, or problem.

valpere/chorus · 62 tokens

chorus-parallel-review

Parallel code review of the current git diff from multiple agents — Claude (correctness/security), Gemini (edge cases), Cursor (integration), Kilo (maintainability), and you (scope/simplicity). Use when the user says "parallel review", "review with all agents", or "chorus review".

valpere/chorus · 69 tokens

install-gemini-code-review-action

Installs, configures, or upgrades Dazbo's PR code review & issue triage GitHub Action (gemini-review-action) in a target repository. Use when the user wants to set up, configure, or update automated AI code reviews, issue triaging, or Gemini model workflows for their GitHub repository.

derailed-dash/dazbo-agent-skills · 73 tokens

qa

Full QA on all session changes using Codex as a second pair of eyes. Use when user says "QA", "full QA", "QA my changes", "QA all your changes", or "use codex to review". Runs git diff, sends changes to Codex for thorough review, and synthesizes findings.

SZoloth/skill-pack · 66 tokens

pr-sweep

Use when you want to sweep all open pull requests across all repos, triage their status, run code reviews on unreviewed PRs, merge what's ready, fix quick blockers, and produce a full status report. Trigger when the user says "check my PRs", "close out open PRs", "what's the status of my PRs", "sweep my PRs", "PR…

harnessprotocol/harness-kit · 0 tokens

rubber-ducky

Use when you've planned a non-trivial change and are about to implement it, finished a complex or multi-file piece of work, just wrote tests, or are stuck on repeated failures — and any time the user says "rubber duck this", "rubber ducky", "get a second opinion", "sanity-check my plan", "poke holes in this", "what am…

harnessprotocol/harness-kit · 186 tokens