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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when creating or modifying frontend building blocks in feature or library code, especially reusable UI components, data access, state, mutations, or models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bartstc/vite-ts-react-template/building-blocks
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 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/github.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/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 building-blocks

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 18
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 31
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 41
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 55
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 70
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
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.00074 $0.01434
Opus 5.5 $0.00030 $0.00574
Sonnet 5.5 $0.00015 $0.00287
Haiku 4.5 $0.00007 $0.00143

Measured 1mo ago against content hash 1ee1e6393142, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (124 stars, last pushed 2d ago), licensed MIT. It adds 74 tokens to every session and 1,434 once invoked, about $0.0003 per session on Opus 5.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.