Agent skill

Reuse Check

by polarsource in polarsource/polar

Check a diff for code that reinvents something Polar already has — a kit helper, a shared Pydantic type, a repository method, an Orbit component, an existing model property.

MITAuto-check passedData & Analytics

Install Reuse Check

skills CLI
$ npx skills add polarsource/polar --skill reuse-check -a claude-code

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

GitHub CLI
$ gh skill install polarsource/polar reuse-check --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/polarsource/polar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/reuse-check .claude/skills/reuse-check && 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
reuse-check
GitHub stars
10k
Token cost
~1.2k tokens
SKILL.md length
434 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Check a diff for code that reinvents something Polar already has — a kit helper, a shared Pydantic type, a repository method, an Orbit component, an existing model property.

  • Works in 3 steps: Name search — rg -n "def |\b"… → Behaviour search — the distinctive part… → Inventory — check the list below.
  • Asks whether a new helper
  • SKILL.md covers Scope, Method, Inventory and Output
  • Calls rg

What it does

Reuse Check is an agent skill from polarsource/polar. Check a diff for code that reinvents something Polar already has — a kit helper, a shared Pydantic type, a repository method, an Orbit component, an existing model property. Use before opening a PR, when reviewing a diff, or when the user asks whether a new helper, validator, type or utility already exists in the codebase.

Its SKILL.md is about 1.2k 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 Data & Analytics, covering DataFrames. It works with Pydantic. The repository describes itself as: Polar — A billing platform for the intelligence era. The licence is MIT.

When your agent uses it

  • Asks whether a new helper
  • Utility already exists in the codebase

Example prompts

  • “/reuse-check”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Name search — rg -n "def |\b" server/polar clients/packages, plus obvious
  2. Behaviour search — the distinctive part of the body: a regex literal, a library call
  3. Inventory — check the list below.

What it can do on your machine

Read from SKILL.md and the folder at commit e4fc909. 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:

    • rg

    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

Reuse Check loads about 1.2k tokens when it runs. Until then it costs about 84 tokens; SKILL.md has 434 words of instructions outside code blocks.

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

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 polarsource/polar at commit e4fc909, republished under its MIT licence (© polarsource). 434 words, ~1,212 tokens.

Download SKILL.mdSave it as .claude/skills/reuse-check/SKILL.md (or your agent's skills folder).
name
reuse-check
description
Check a diff for code that reinvents something Polar already has — a kit helper, a shared Pydantic type, a repository method, an Orbit component, an existing model property. Use before opening a PR, when reviewing a diff, or when the user asks whether a new helper, validator, type or utility already exists in the codebase.
license
MIT
metadata.author
polar
metadata.version
1.0.0

Reuse Check (Polar)

The handle is the diff. The evidence is new code that duplicates something the repo already has, with the import that replaces it.

This is the most common substantive comment in Polar reviews: 84 of ~1,100 human review comments from Feb to Aug 2026 point at an existing helper the author did not know about. It is also the one category where grep beats a human reviewer, and it got worse once agents started writing the code, because an agent that does not search first writes its own helper.

Scope

Run on any diff that adds a function, constant, Annotated type, validator, enum, model property, repository method, React component, or hook. Skip deletions, renames, config and lockfiles.

Owned elsewhere: agent noise → slop-check; API contract → api-surface-review; deploy safety → ship-safety; billing behaviour → billing-review.

Method

For each new symbol:

  1. Name search — rg -n "def <name>|<Name>\b" server/polar clients/packages, plus obvious synonyms (normalize/sanitize/clean, fetch/get/load).
  2. Behaviour search — the distinctive part of the body: a regex literal, a library call (urlparse, pycountry, stdnum, slugify), a magic constant.
  3. Inventory — check the list below.

Report only when you can name the existing symbol and its import path. A hunch is not a finding. Always show what you searched for, so a false positive is cheap to dismiss.

Show full SKILL.md (220 more words)Show less

Inventory

HomeHolds
polar/kit/schemas.pySchema, IDSchema, TimestampedSchema, EmptyStrToNone, SlugValidator, StripValidator, HttpsUrl, HttpUrlToStr, Int32, ClassName, MergeJSONSchema, SetSchemaReference, MultipleQueryFilter, *_ID_EXAMPLE
polar/kit/http.pyget_safe_return_url (open redirect), get_ip_address, add_query_parameters, get_content_disposition, is_localhost, SSRF-safe crawling (SSRFBlockedError, UnsafeCrawlableUrl, UrlReachability)
polar/kit/currency.py, money.py, math.pyget_currency_decimal_factor (zero-decimal currencies), get_minimum_currency_amount, get_maximum_currency_amount, format_currency, get_presentment_currency, get_cents_in_dollar_string, polar_round, non_negative_running_sum
polar/kit/pagination.pyListResource, Pagination, PaginationParams, count_subquery
polar/kit/repository/base.pyget_base_statement, get_one_or_none, get_all, paginate, create, update, from_session, stream
polar/kit/ (rest)address, anonymization, crypto, csv, db, email (EmailStrDNS), encryption, html, json, jwk, jwt, locale, metadata, operator, routing, services, sorting, time_queries, trial, utils, visibility
server/scripts/helper.pyrun_batched_update
polar/backoffice/forms.pyForm builder classes. Pattern: polar/backoffice/orders/endpoints.py
clients/packages/orbit/src/componentsAlert, Avatar, Box, Button, ButtonGroup, Checkbox, Grid, GridItem, InlineModal, Input, List, ListGroup, Modal, Pill, SegmentedControl, Select, Spinner, Status, Subnav, Switch, Tabs, Text, TextArea, Tooltip, Truncated, datatable
Libraries already in usestdnum (tax IDs), pycountry (country names), slugify, email_validator

Also grep the model. A lot of duplicated logic is a property that already exists: Organization.is_payout_ready, Organization.can_authenticate, ProductPrice.is_free, Checkout.is_free_product_price, Payment.UNRECOVERABLE_DECLINE_CODES.

The ones people actually miss
  • A hand-written "empty string means null" validator instead of EmptyStrToNone.
  • A keyset loop over UUIDs instead of RepositoryBase.stream, which batches implicitly.
  • Fetching rows only to count them, instead of an existence query.
  • Hand-rolled cents conversion or currency rounding.
  • A country-code table or slug regex instead of pycountry / slugify.
  • A hand-built HTMX form in a new backoffice view.
  • A hand-styled div that duplicates an Orbit primitive.

Output

## Reuse

### 🟠 Should fix
- `file:line` — <what the new code does>. Fix: `from polar.kit.schemas import EmptyStrToNone`
  (searched: `rg "empty_str|strip_to_none" server/polar`)

### 🟡 Question
- `file:line` — <question>

### Verdict
✅ Nothing reinvented  |  ❌ n duplicates

© polarsource, 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/reuse-check of polarsource/polar.

Open the folder on GitHubat commit e4fc909

Compare with similar skills

Reuse Check 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.

Reuse Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Reuse Check this skillpolarsource/polar10k—~1.2kAutomated safety check: PassMIT
Chdb Datastorevemetric/vemetric3942 repos~1.4kAutomated safety check: PassApache-2.0
CSV Data Summarizercoffeefuelbump/csv-data-summarizer-claude-skill4682 repos~1.4kAutomated safety check: PassNone
Paper FiguresEvoScientist/EvoSkills4751 repos~4.4kAutomated safety check: PassApache-2.0
Python Executorcortega26/chile-hub1132 repos~1.5kAutomated safety check: PassMIT
DataframelyQuantco/dataframely619—~2.4kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Chdb Datastore

    vemetric/vemetric

    A skill your agent uses when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas.

    394 GitHub starsUsed in 2 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • CSV Data Summarizer

    coffeefuelbump/csv-data-summarizer-claude-skill

    Analyzes CSV files, generates summary stats, and plots quick visualizations using Python and pandas.

    468 GitHub starsUsed in 2 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Paper Figures

    EvoScientist/EvoSkills

    A skill your agent uses to produce standalone, publication-ready PNG graphics and reproducible matplotlib scripts from tabular data (CSVs or DataFrames).

    475 GitHub starsUsed in 1 repo~4.4k tokens
    Data & AnalyticsAuto-check passed
  • Python Executor

    cortega26/chile-hub

    Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh).

    113 GitHub starsUsed in 2 repos~1.5k tokens
    Data & AnalyticsAuto-check passed
  • Dataframely

    Quantco/dataframely

    Best practices for polars data processing with dataframely. An agent skill from Quantco/dataframely.

    619 GitHub stars~2.4k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Retentioneering Product Analytics

    retentioneering/retentioneering-tools

    Analyze event logs, clickstreams, user paths, product funnels, retention, behavioral segments, transition graphs, step matrices, sequence patterns, and customer journeys using Retentioneering.

    920 GitHub stars~1.6k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed

More from polarsource/polar

All 18 skills in this repo
  • Polar Python SDK

    polarsource/polar

    Integrate Polar billing in server-side Python applications using the versioned Polar and PolarAsync clients.

    10k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Polar Typescript SDK

    polarsource/polar

    Integrate Polar billing in server-side TypeScript applications using the versioned createPolar and createPolarCore clients.

    10k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Adr Check

    polarsource/polar

    Check a code change against the repo's Accepted Architecture Decision Records (ADRs) in handbook/engineering/decisions/ and report violations with citations.

    10k GitHub stars~771 tokensUpdated yesterday
    Auto-check passed
  • API Surface Review

    polarsource/polar

    Review changes to Polar's API contract — Pydantic schemas, FastAPI endpoints, OpenAPI output and the generated SDKs.

    10k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Billing Review

    polarsource/polar

    Review a diff that touches Polar's billing domain — subscriptions, cycles and crons, orders, billing entries, meters and usage, discounts, checkout, payments and dunning, refunds, disputes, payouts…

    10k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Interview Task

    polarsource/polar

    Prepare an interview task for a candidate, as part of our hiring process.

    10k GitHub stars~933 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Reuse Check

What does Reuse Check do?

Check a diff for code that reinvents something Polar already has — a kit helper, a shared Pydantic type, a repository method, an Orbit component, an existing model property. Reuse Check is an agent skill from polarsource/polar. Check a diff for code that reinvents something Polar already has — a kit helper, a shared Pydantic type, a repository method, an Orbit component, an existing model property.

When should I use Reuse Check?

Reuse Check fits situations like: asks whether a new helper; utility already exists in the codebase.

How do I install Reuse Check in Claude Code?

Run `npx skills add polarsource/polar --skill reuse-check -a claude-code`. Or copy the skill folder (.agents/skills/reuse-check in polarsource/polar) into .claude/skills/reuse-check in your project. Claude Code loads it when a task matches its description.

How do I install Reuse Check in Codex?

Run `npx skills add polarsource/polar --skill reuse-check -a codex`. Or copy the skill folder (.agents/skills/reuse-check in polarsource/polar) into .agents/skills/reuse-check in your project. Codex loads it when a task matches its description.

Can I use Reuse Check 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 polarsource/polar --skill reuse-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/reuse-check, .gemini/skills/reuse-check, .github/skills/reuse-check and .opencode/skills/reuse-check in your project.

What does Reuse Check need to run?

Going by SKILL.md and its folder, Reuse Check needs the command-line tools its instructions call (rg).

Does Reuse Check 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 Reuse Check 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 Reuse Check use?

Reuse Check is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Reuse Check use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Reuse Check?

Skills that share tags, products or a category with Reuse Check: Chdb Datastore (vemetric/vemetric, 394 stars), CSV Data Summarizer (coffeefuelbump/csv-data-summarizer-claude-skill, 468 stars), Paper Figures (EvoScientist/EvoSkills, 475 stars) and Python Executor (cortega26/chile-hub, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Reuse Check?

polarsource (a GitHub organization) maintains it in polarsource/polar, which has 10,340 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 7, 2026.

Source: polarsource/polar on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.