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/bartstc/vite-ts-react-template/building-blocksnpx skills add bartstc/vite-ts-react-template --skill building-blocksgit clone --depth 1 https://github.com/bartstc/vite-ts-react-templateWrote 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/bartstc/vite-ts-react-template/building-blocks)<a href="https://agentmods.dev/skills/bartstc/vite-ts-react-template/building-blocks"><img src="https://agentmods.dev/badge/skills/bartstc/vite-ts-react-template/building-blocks.svg" alt="Measured on agentmods" 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 | $0.00074 | $0.01434 |
| Opus 5 | $0.00037 | $0.00717 |
| Sonnet 5 | $0.00015 | $0.00287 |
| Haiku 4.5 | $0.00007 | $0.00143 |
Grade A, and why
building-blocks 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 4d 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 — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend Building Blocks
Typed catalog of building blocks used in this project. Each block has a fixed name, layer, composition rules, and canonical example.
How to Use
Read the rule file for each block you are about to implement. The summaries below are for routing — the rule files contain the full pattern.
Composition ladder
Composition is a ladder. Default to the bottom rung; climb only when a concrete, named pain appears. Each rung buys flexibility and costs indirection.
| Rung | Block | Reach for it when… |
|---|---|---|
| 1 | pure-component |
default — reusable UI is a function of its props. |
| 2 | compound-component |
a component grows a prop per shape, or callers need a layout the props did not anticipate. |
| 3 | composer |
one piece of UI must render data from swappable/deferred sources, or you want a fixture source for tests. |
| 4 | composer |
state must cross a component boundary (callbacks drilled to a leaf) and the layout should stay pure. |
Do not climb for uniformity, for a single source with no alternative in sight, or for state that never leaves its component.
Block Catalog
Data Fetching
| Block | Layer | Summary | File |
|---|---|---|---|
mutation-options-factory |
lib/api/ |
Reusable mutationOptions() factories with domain error translation. Composed by mutation-hook in providers/. |
rules/mutation-options-factory.md |
mutation-hook |
providers/ |
Server write via useMutation composed from mutation-options-factory, with cache invalidation. Returns [handler, isPending]. |
rules/mutation-hook.md |
query-options-factory |
lib/api/ |
Reusable queryOptions() factories — no hooks, no useQuery. Hook composition belongs in providers/. |
rules/query-options-factory.md |
query-keys-factory |
lib/api/ |
Hierarchical as const key tuples per resource. Single source of truth for cache invalidation. |
rules/query-keys-factory.md |
dto-model |
lib/api/ |
TypeScript interfaces mirroring the raw API wire format. No transformations. | rules/dto-model.md |
What ships with it
23 files 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.
- metadata.json 1.2 KB
- README.md 2.3 KB
- rules/composer.md 5.8 KB
- rules/compound-component.md 3.6 KB
- rules/dto-model.md 1.2 KB
- rules/error-boundary.md 1.1 KB
- rules/facade-hook.md 2.6 KB
- rules/form.md 4.5 KB
- rules/frontend-model.md 1.1 KB
- rules/hoc.md 1.5 KB
- rules/machine.md 8.8 KB
- rules/mutation-hook.md 1.7 KB
- rules/mutation-options-factory.md 2.5 KB
- rules/named-effect.md 1.2 KB
- rules/notification-hook.md 1.8 KB
- rules/page.md 1.8 KB
- rules/provider.md 2.7 KB
- rules/pure-component.md 1.5 KB
- rules/query-keys-factory.md 1.4 KB
- rules/query-options-factory.md 1.9 KB
- rules/store.md 1.2 KB
- rules/use-case-hook.md 2.3 KB
- rules/value-object.md 2.2 KB
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.
- 4d ago First seen · 80 lines · 74 tokens per session scan A 1ee1e6393142
building-blocks is a skill published in the GitHub repository bartstc/vite-ts-react-template (121 stars, last pushed 1mo ago), licensed MIT. It adds 74 tokens to every session and 1,434 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
webflow-to-react
Converts a Webflow HTML export into a maintainable React app with TanStack Start (SSR, TanStack Router conventions) using an idiomatic React-first approach. Sets up Storybook early, builds UI primitive + page-section SOT components with variant stories before composing routes. Use when the user has a Webflow export…
prettify
Iteratively improves the visual design of an existing page — making it more sophisticated, richer, and prettier — without redesigning from scratch. Works on any page or UI surface: landing pages, marketing pages, pricing, docs, dashboards, admin views, settings, modals, empty states, etc. Use when the user says…
propagate-template
Propagate the template's current main into forked AI-store repos (yns-store- in the tenants org), updating every file the store never customized and reporting the rest. Content-level reconcile — store repos share NO git history with the template. Use for "template rebase", "propagate template", "sync store repos"…
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications. Generates creative, polished code that avoids generic AI aesthetics.
audit
Perform comprehensive audit of interface quality across accessibility, performance, theming, and responsive design. Generates detailed report of issues with severity ratings and recommendations.
critique
Evaluate design effectiveness from a UX perspective. Assesses visual hierarchy, information architecture, emotional resonance, and overall design quality with actionable feedback.