dep-size

dep-size is a skill for Claude Code, Codex from tonyghiani/ai-essentials. It costs 60 tokens per session (870 once invoked), scanned A, original, MIT.

A code-review tool for checking the real cost of adding a software package and finding packages that make browser code larger. It examines built-in platform features, existing project packages, package size, dependencies, maintenance, and safety.

In plain words
What is it for?
It is for evaluating new dependencies, investigating bundle-size failures in continuous integration, and reviewing imports used in browser-shipped code.
Why use it?
It prevents developers from adding a package when the platform or project already provides the same job, and helps locate unnecessary bundle size in existing code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for evaluating new dependencies, investigating bundle-size failures in continuous integration, and reviewing imports used in browser-shipped code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tonyghiani/ai-essentials/dep-size
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 tonyghiani/ai-essentials --skill dep-size
Clone the repo
git clone --depth 1 https://github.com/tonyghiani/ai-essentials

Made for: Claude Code, Codex.

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 dep-size

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonyghiani/ai-essentials/dep-size/github.svg)](https://agentmods.dev/skills/tonyghiani/ai-essentials/dep-size)
Your own site
<a href="https://agentmods.dev/skills/tonyghiani/ai-essentials/dep-size"><img src="https://agentmods.dev/badge/skills/tonyghiani/ai-essentials/dep-size/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 dep-size

Your own site · 80×15
<a href="https://agentmods.dev/skills/tonyghiani/ai-essentials/dep-size"><img src="https://agentmods.dev/badge/skills/tonyghiani/ai-essentials/dep-size.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 870 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.00060 $0.00870
Opus 5 $0.00030 $0.00435
Sonnet 5 $0.00012 $0.00174
Haiku 4.5 $0.00006 $0.00087

Measured 9d ago against content hash ff395bd37c51, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

dep-size 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 9d 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/dep-size/SKILL.md · 71 lines

How it starts

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

Dependency and bundle cost

Two jobs: decide whether a new dependency earns its place, and find the ones that already didn't.

Before adding a dependency

Answer these in order, and stop at the first that disqualifies it.

1. Does the platform already do this? Intl for dates, numbers, and currency. URL and URLSearchParams. structuredClone. Array.prototype.at/flat/group. crypto.randomUUID. AbortController. Most date formatting and deep-clone packages are now redundant.

2. Does the repo already have something? Grep package.json and the shared packages before reaching outside. Adding a second HTTP client, date library, or validation library is worse than using the awkward existing one.

3. What does it actually cost?

npx --yes bundlephobia@latest <pkg>   # or check bundlephobia.com
npm view <pkg> dependencies

Report minified plus gzipped size, transitive dependency count, and whether it's tree-shakeable (ESM with sideEffects: false) or all-or-nothing.

4. Is it maintained and safe? Last publish date, open issue count, whether it's a single-maintainer package, and npm audit on it. A 2KB abandoned package with a prototype-pollution CVE is worse than 20KB that's maintained.

5. Is the alternative genuinely a lot of code? If the package replaces 15 lines you could write and test, write the 15 lines. If it replaces a date-parsing state machine, take the package.

Give a verdict: take it, write it inline, use what's already here, or take it but only on the server.

Finding existing bloat

Import shape. The most common and most fixable problem.

import _ from 'lodash';              // pulls the world
import { debounce } from 'lodash';   // better
import debounce from 'lodash/debounce'; // best where the build needs it

Grep for default imports of large libraries, import * as, and barrel imports that reach a whole package to use one symbol.

Server-only code in a browser bundle. A fs, path, or Node-only package imported from a file that ships to the client. In a plugin architecture, check that common/ doesn't pull server dependencies and that public/ entry points don't transitively import server modules.

Read the full file on GitHub · 71 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. 9d ago First seen · 71 lines · 60 tokens per session scan A ff395bd37c51

Subscribe to this mod's changes

dep-size is a skill published in the GitHub repository tonyghiani/ai-essentials (6 stars, last pushed 1mo ago), licensed MIT. It adds 60 tokens to every session and 870 once invoked, about $0.0003 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-08-31.