library-first

library-first is a skill for Codex from mushroomTW/MushroomTW-Skills. It costs 65 tokens per session (1,860 once invoked), scanned A, original, MIT.

A development workflow for checking whether an existing library can handle a common programming task before writing your own code.

In plain words
What is it for?
Use it to search available libraries, assess whether they fit the project, and record whether a library was used, the code was written manually, or the decision was deferred.
Why use it?
It reduces unnecessary custom code for jobs such as retries, validation, date handling, caching, authentication, or command-line argument parsing.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to search available libraries, assess whether they fit the project, and record whether a library was used, the code was written manually, or the decision was deferred.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mushroomtw/mushroomtw-skills/library-first
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 mushroomTW/MushroomTW-Skills --skill library-first
Clone the repo
git clone --depth 1 https://github.com/mushroomTW/MushroomTW-Skills

Made for: 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 library-first

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mushroomtw/mushroomtw-skills/library-first"><img src="https://agentmods.dev/badge/skills/mushroomtw/mushroomtw-skills/library-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,860 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.00065 $0.01860
Opus 5 $0.00032 $0.00930
Sonnet 5 $0.00013 $0.00372
Haiku 4.5 $0.00006 $0.00186

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

Security

Grade A, and why

library-first 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.

library-first/SKILL.md · 104 lines

How it starts

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

Library-First

Search before hand-writing a general mechanism; every line of custom code is a liability.

Invariants

  1. Emit exactly one terminal decision: used, wrote manually, or deferred. Use deferred only when a missing project fact makes a gate undecidable, and state both that nothing is to be implemented yet and the evidence that would unblock it.
  2. A third-party package that fails the Quality Gate does not exist; judge a standard library by fitness and version support instead.
  3. Verify what you are unsure of; never guess.

Workflow

Step Action Input Output Format
1 Name and route requirement, variable names domain term + search/manual e.g. exponential backoff retry, not callApiAgain; domain logic or a genuine three-line helper routes to manual
2 Search the ecosystem search domain term + language 1-3 candidates cover the standard library + npm/PyPI/NuGet/pkg.go.dev/crates.io; manual skips to Step 4
3 Evaluate candidates candidates Pass/Fail/Unknown/N/A apply the Quality Gate to third-party packages; confirm fitness and version support for a standard library
4 Terminal decision evaluation results used/wrote manually/deferred exactly one; see the templates

🔴 CHECKPOINT 1 · 🛑 STOP — pause after Step 2 on the search path: confirm the standard library was covered, mainstream packages were covered, and the query used a domain term rather than a variable name. The manual path never fakes a search; it goes straight to Step 4.

Quality Gate (a third-party package is adopted only when all six pass)

Record each gate as Pass, Fail, Unknown, or N/A. Unknown is not a pass; N/A must state why the gate does not apply to this project. All Pass/N/A allows used; any Fail moves to the next candidate, and only after every candidate fails do you wrote manually; when Unknown is all that remains you must deferred, never a conditional sentence pretending the package was adopted.

Read the full file on GitHub · 104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed · +2 lines ed67392bbd75
  2. 10d ago First seen · 102 lines · 65 tokens per session scan A 2279c8526a61

Subscribe to this mod's changes

library-first is a skill published in the GitHub repository mushroomTW/MushroomTW-Skills (0 stars, last pushed 10d ago), licensed MIT. It adds 65 tokens to every session and 1,860 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.

Related

Other skills, from other repositories

recipe-front-review

Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.

shinpr/claude-code-workflows · 29 tokens

new-skill

Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…

hyhmrright/brooks-lint · 145 tokens

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

dorodango

Polishes working code through successive quality passes in fresh subagents. Use after tests pass when code needs multi-dimension refinement before release.

athola/claude-night-market · 31 tokens

ring:exploring-codebases

Exploring a codebase across phases: scopes the target, detects architecture, components, and layers, deep-dives each discovered perspective, then synthesizes findings into actionable guidance with file:line evidence. Use to understand how a feature or system works before planning changes, or to orient on an unfamiliar…

LerianStudio/ring · 91 tokens