building-blocks

building-blocks is a skill for Claude Code, Codex from bartstc/vite-ts-react-template. It costs 74 tokens per session (1,434 once invoked), scanned A, original, MIT.

A catalog of typed frontend building patterns for components, hooks, data queries, changes, shared state, and data models. It defines when to use each pattern and points to the detailed rules and examples.

In plain words
What is it for?
Use it when creating or modifying frontend building blocks in feature or library code, especially reusable UI components, data access, state, mutations, or models.
Why use it?
It gives a consistent way to choose and build reusable frontend code. This reduces improvised structures that are harder to maintain.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/bartstc/vite-ts-react-template/building-blocks
Any agent
npx skills add bartstc/vite-ts-react-template --skill building-blocks
Clone the repo
git clone --depth 1 https://github.com/bartstc/vite-ts-react-template

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 building-blocks

README.md
[![agentmods](https://agentmods.dev/badge/skills/bartstc/vite-ts-react-template/building-blocks.svg)](https://agentmods.dev/skills/bartstc/vite-ts-react-template/building-blocks)
Your own site
<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>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,434 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00074 $0.01434
Opus 5 $0.00037 $0.00717
Sonnet 5 $0.00015 $0.00287
Haiku 4.5 $0.00007 $0.00143

Measured 4d ago against content hash 1ee1e6393142, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

.agents/skills/building-blocks/SKILL.md · 80 lines

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

Read the full file on GitHub · 80 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. 4d ago First seen · 80 lines · 74 tokens per session scan A 1ee1e6393142

Subscribe to this mod's changes

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.

Related

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…

dmenchaca/webflow-to-react · 258 tokens

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…

yournextstore/yournextstore · 0 tokens

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"…

yournextstore/yournextstore · 96 tokens

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.

yournextstore/yournextstore · 47 tokens

audit

Perform comprehensive audit of interface quality across accessibility, performance, theming, and responsive design. Generates detailed report of issues with severity ratings and recommendations.

yournextstore/yournextstore · 31 tokens

critique

Evaluate design effectiveness from a UX perspective. Assesses visual hierarchy, information architecture, emotional resonance, and overall design quality with actionable feedback.

yournextstore/yournextstore · 30 tokens