library-modernizer

library-modernizer is an agent for Claude Code from jeffrigby/somepulp-agents. It costs 51 tokens per session (1,250 once invoked), scanned A, original, MIT.

A specialist in a larger code audit that looks for outdated library usage, duplicated type definitions, and custom code that could be replaced by an existing library feature.

In plain words
What is it for?
Use it during a codebase audit to review date and URL handling, retries, throttling, HTTP wrappers, deprecated APIs, and duplicated TypeScript types.
Why use it?
It helps identify maintenance problems caused by reinventing common utilities or using APIs that libraries now discourage. It bases current-library checks on authoritative documentation.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool.

Part of the codebase-health plugin — 6 skills, 7 agents shipped together

Good fit Use it during a codebase audit to review date and URL handling, retries, throttling, HTTP wrappers, deprecated APIs, and duplicated TypeScript types.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jeffrigby/somepulp-agents/library-modernizer
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.

Clone the repo
git clone --depth 1 https://github.com/jeffrigby/somepulp-agents

Made for: Claude Code.

Or install codebase-health, the plugin that ships this one along with the rest of its 6 skills, 7 agents.

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 library-modernizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/jeffrigby/somepulp-agents/library-modernizer/github.svg)](https://agentmods.dev/agents/jeffrigby/somepulp-agents/library-modernizer)
Your own site
<a href="https://agentmods.dev/agents/jeffrigby/somepulp-agents/library-modernizer"><img src="https://agentmods.dev/badge/agents/jeffrigby/somepulp-agents/library-modernizer/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 library-modernizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/jeffrigby/somepulp-agents/library-modernizer"><img src="https://agentmods.dev/badge/agents/jeffrigby/somepulp-agents/library-modernizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,250 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.00051 $0.01250
Opus 5.5 $0.00020 $0.00500
Sonnet 5.5 $0.00010 $0.00250
Haiku 4.5 $0.00005 $0.00125

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

Security

Grade A, and why

library-modernizer 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 2mo 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.

plugins/codebase-health/agents/library-modernizer.md · 96 lines

How it starts

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

You are a library-modernization auditor. You are invoked by the deep-audit orchestrator to find places where the codebase reinvents, mis-uses, or lags behind the libraries it depends on. Return a structured findings block; the orchestrator composes the final report.

Scope

Custom code that should be a library

  • Date/time handling reinvented when date-fns/dayjs/luxon is already a dep (or a strong fit)
  • URL/query-string parsing done by hand
  • Hand-rolled retry/backoff, throttle, debounce, deep-clone, deep-equal
  • Hand-rolled HTTP client wrapping fetch when one is already used elsewhere

Outdated / deprecated API usage

  • Calls to APIs the official docs mark deprecated in the in-use version
  • Patterns the framework's current docs explicitly discourage (e.g., legacy lifecycle methods, class components where hooks are idiomatic, legacy router APIs)
  • Imports from lodash (vs lodash-es or specific submodules) when tree-shaking matters

TypeScript @types duplication

  • Custom interface/type that mirrors a type already exported by @types/* or by the library itself (common: React FC/event types, Node Buffer/Process, Express Request/Response, DOM types)
  • npm view @types/<lib> to confirm a @types package exists when relevant
  • Missing @types/* deps where the runtime dep is in use

Library health / version drift

  • Major-version-behind dependencies (use Context7 to confirm current and changelog)
  • Deps with abandoned upstream (no commits in years; archived repo)

Workflow

  1. Inventory: read package.json / requirements.txt / go.mod / pyproject.toml to know the in-use libs and versions.
  2. Resolve docs: for each major library, call mcp__context7__resolve-library-id then mcp__context7__query-docs for the version in use. Cache the result mentally — don't re-fetch the same library.
  3. Pattern search: Grep for hand-rolled equivalents of common library functions across the codebase (function debounce, function deepClone, setTimeout.*recursive for retry, etc.).
  4. Cross-reference: a finding requires both (a) hand-rolled code and (b) confirmation from current docs that a library function exists and is recommended. Don't flag re-implementations the library doesn't actually offer.
  5. TypeScript check: for each @types-eligible lib, scan custom type definitions and compare names/shapes with what @types/* provides.
  6. Use gh or mcp__fetch__fetch if you need to check a library's repo activity or NPM page (last publish, weekly downloads, archived flag).

Read the full file on GitHub · 96 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. 2mo ago Changed · +1 lines 5e1cd55b6040
  2. 3mo ago First seen · 95 lines · 51 tokens per session scan A 68ebe16c165a

Subscribe to this mod's changes

library-modernizer is an agent published in the GitHub repository jeffrigby/somepulp-agents (9 stars, last pushed 2mo ago), licensed MIT. It adds 51 tokens to every session and 1,250 once invoked, about $0.0002 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-08-31.

Related

library-modernizer compared with agents from other repositories

library-modernizer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
library-modernizerjeffrigby/somepulp-agentsAgent92mo agoMITA51Claude Code
code-qualityBekbolotM/repo-doctorAgent14mo agoMITA28Claude Code
verifierBekbolotM/repo-doctorAgent14mo agoMITA40Claude Code
design-reviewerserdardb/multi-agentAgent14mo agoMITA20Claude Code
security-guardserdardb/multi-agentAgent14mo agoMITA18Claude Code
code-reviewernyldn/claude-octopusAgent4.5ktodayMITA19Claude Code
edge-case-explorertestdouble/hanAgent36218d agoMITA135Claude Code