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 agentmods add skills/lonormaly/builders-stack/add-a-libnpx skills add lonormaly/builders-stack --skill add-a-libgit clone --depth 1 https://github.com/lonormaly/builders-stackWhat 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 | $0.00081 | $0.00717 |
| Opus 5 | $0.00041 | $0.00358 |
| Sonnet 5 | $0.00016 | $0.00143 |
| Haiku 4.5 | $0.00008 | $0.00072 |
Grade A, and why
add-a-lib 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 2d 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 — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add a lib
A libs/* package is shared code that is never served — other packages consume it, it consumes nobody upward. Reach for this when the same helper/type/component is about to exist in two places.
When to use
- A util, type, component, or client is needed by 2+ apps/services → extract it into a lib.
- Not when it's used in exactly one place — leave it there (YAGNI). A lib for one consumer is premature.
Steps
-
Pick the name.
libs/<name>, package@stack/<name>. Keep it a role, not a feature (ui,db,auth,ai,analytics). -
Create the folder + files:
libs/<name>/ ├── package.json ├── tsconfig.json └── src/ └── index.ts # the ONE public door -
package.json— name it@stack/<name>, point exports at the barrel:{ "name": "@stack/<name>", "private": true, "type": "module", "exports": { ".": "./src/index.ts" }, "scripts": { "typecheck": "bash ../../scripts/typecheck-native.sh --noEmit" } } -
tsconfig.json— extend the root base, never fork options:{ "extends": "../../tsconfig.base.json", "include": ["src"] } -
src/index.ts— this is the only thing consumers may import. Re-export the public surface; keep everything else internal:export { thing } from "./thing"; export type { ThingOptions } from "./thing"; -
Install so the workspace links it:
bun install(root). The@stack/<name>name now resolves across the workspace.bun run check:typescriptenforces the shared stable TypeScript 7 checker for every workspace. -
Consume it from an app/service by package name only:
import { thing } from "@stack/<name>"; // ✅ import { thing } from "@stack/<name>/src/internal/thing"; // ❌ deep import — forbidden
Rules to respect
- No upward import: the lib must not import from
apps/orservices/. If it needs to, the boundary is wrong — the caller should pass the dependency in. - One public door: anything not exported from
src/index.tsis private. Don't let consumers reach into internals. - No Tiltfile change — libs aren't served, so they get no Tilt resource.
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.
- 2d ago First seen · 73 lines · 81 tokens per session scan A 154f9cd760d7
add-a-lib is a skill published in the GitHub repository lonormaly/builders-stack (41 stars, last pushed 16d ago), licensed MIT. It adds 81 tokens to every session and 717 once invoked, about $0.0004 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-30.
Other skills, from other repositories
openspec-archive-change
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
mastra
Comprehensive Mastra framework guide. Teaches how to find current documentation, verify API signatures, and build agents and workflows. Covers documentation lookup strategies (embedded docs, remote docs), core concepts (agents vs workflows, tools, memory, RAG), TypeScript requirements, and common patterns. Use this…
Beads Workflow Optimizer
Optimizes Beads workflow activation, parallel processing, and task management. Use when working with Beads issues, managing dependencies, or optimizing development workflows in projects with complex task dependencies.
nen-contract-mantle
Hold a task's objective, boundaries, protected state, assumptions, and acceptance tests through long or context-shifting work. Use when the user invokes Ten, Ken, 纏, or 堅; work spans several phases, agents, or context windows; requirements may drift; or completion needs a final contract check.
openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
openspec-propose
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.