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.
npx skills add ayeshakhalid192007-dev/graph-engineering-crash-course --skill trim-to-budgetgit clone --depth 1 https://github.com/ayeshakhalid192007-dev/graph-engineering-crash-courseWrote 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.
[](https://agentmods.dev/skills/ayeshakhalid192007-dev/graph-engineering-crash-course/trim-to-budget)<a href="https://agentmods.dev/skills/ayeshakhalid192007-dev/graph-engineering-crash-course/trim-to-budget"><img src="https://agentmods.dev/badge/skills/ayeshakhalid192007-dev/graph-engineering-crash-course/trim-to-budget/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.
<a href="https://agentmods.dev/skills/ayeshakhalid192007-dev/graph-engineering-crash-course/trim-to-budget"><img src="https://agentmods.dev/badge/skills/ayeshakhalid192007-dev/graph-engineering-crash-course/trim-to-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00047 | $0.01063 |
| Opus 5 | $0.00023 | $0.00531 |
| Sonnet 5 | $0.00009 | $0.00213 |
| Haiku 4.5 | $0.00005 | $0.00106 |
Grade A, and why
trim-to-budget 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
trim-to-budget
Reads a candidate task-scoped subgraph — an anchor node plus relevance- scored surrounding nodes and their edges — and a node-count budget, then produces the largest allowed slice: the anchor, plus as many of the highest-relevance remaining nodes as fit, with every edge re-checked against the final kept set.
Instructions
You are a Claude Code skill implementing the budget-capped-subgraph
pattern. Follow these steps in order:
- Identify the anchor node. It is always kept, and it always counts as one of the budget's node slots — never treat it as free.
- Read every other candidate node and its relevance score. Default
to the candidate subgraph and budget in this kit's
README.mdunless the user gives you a different one. Sort these nodes by relevance, highest first. - Fill the remaining budget slots in relevance order. With a budget of N nodes, the anchor takes one slot and the top (N-1) remaining nodes by relevance take the rest. Everything past that point is dropped. If two nodes tie exactly on relevance at the cutoff boundary, note the tie explicitly rather than picking one arbitrarily and saying nothing about it.
- Record the trimming rule as a legible statement, not just a list: name the budget, confirm the anchor was kept unconditionally, and state the exact relevance score at which the cutoff fell (the lowest score still kept, and the highest score dropped, if they differ).
- Re-check every edge in the candidate subgraph against the final kept node set. An edge survives only if both of its endpoints are in the kept set. Do this as its own explicit pass after node trimming is decided — don't try to decide node and edge survival in the same pass, since an edge's fate depends on a node-trimming decision that has to be finished first.
- Report four things together: the kept nodes, the dropped nodes, the surviving edges, and the trimming rule statement from step 4. Never report just the kept subgraph without also naming what got cut and why — a cutoff nobody can see is indistinguishable from no budget at all.
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.
- 12d ago First seen · 95 lines · 47 tokens per session scan A 125c4ade8b03
trim-to-budget is a skill published in the GitHub repository ayeshakhalid192007-dev/graph-engineering-crash-course (5 stars, last pushed 17d ago), licensed MIT. It adds 47 tokens to every session and 1,063 once invoked, about $0.0002 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.
Other skills, from other repositories
install
Install the Rekal binary on this machine. Use when rekal is not on PATH — a command reported command not found — or when the user asks to install Rekal. Once per machine, not per repository; to set up a repo that already has the binary, use the init skill instead.
animate
Build a web animation: whether it should animate at all, the purpose, the tool, the properties, the easing curve, the duration, interruption and exit. Writes the CSS or Motion code for dropdowns, modals, toasts, tooltips, accordions, press feedback, stagger and scroll reveals. Use to animate something or make a…
author-skill
Use when authoring a NEW rsc skill or editing an existing one — scoping it to one job, writing the description that decides whether it ever loads, splitting the body into references/, writing its evals, auditing it against the rubric. NOT building a product feature (that is specify) and NOT designing an agent loop…
building-agents
Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…
open-weights
Use when choosing an open-weight LLM and clearing it for use — which family and size fit the task, the hardware and the budget, and above all whether the license permits shipping. Owns the license-class map (OSI-open versus custom-community versus non-commercial), the always-verify-the-model-card rule, size-to-VRAM…
postgresdb
Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…