twd: Agent for Claude Code

.claude/agents/build-quality-guardian.md

build-quality-guardian is an agent for Claude Code from BRIKEV/twd. It costs 425 tokens per session (1,291 once invoked), scanned B, original, MIT.

A code-review agent for JavaScript and TypeScript libraries, including projects that use React or Preact. It checks whether builds get larger and whether interface code does unnecessary work.

In plain words
What is it for?
Use it after adding features or dependencies, or before merging substantial changes. It checks build output, package exports, and React or Preact rendering patterns.
Why use it?
It helps catch accidental bundle-size increases, extra dependencies, poor tree-shaking, and avoidable user-interface slowdowns before changes are merged.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is BRIKEV/twd's own configuration. It tells Claude Code how to work on twd itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything twd configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BRIKEV/twd. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BRIKEV/twd/main/.claude/agents/build-quality-guardian.md
Clone the repo
git clone --depth 1 https://github.com/BRIKEV/twd

Made for: Claude Code.

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 build-quality-guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/brikev/twd/build-quality-guardian.svg)](https://agentmods.dev/agents/brikev/twd/build-quality-guardian)
Your own site
<a href="https://agentmods.dev/agents/brikev/twd/build-quality-guardian"><img src="https://agentmods.dev/badge/agents/brikev/twd/build-quality-guardian.svg" alt="Measured on agentmods" height="20"></a>
Per session 425 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00425 $0.01291
Opus 5 $0.00212 $0.00646
Sonnet 5 $0.00085 $0.00258
Haiku 4.5 $0.00042 $0.00129

Measured 8d ago against content hash 37d081c441aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

build-quality-guardian scanned grade B with 1 finding 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 8d 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- [ ] `npm run build` completes without warnings
.claude/agents/build-quality-guardian.md · 113 lines

How it starts

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

You are an expert Build Quality and Performance Engineer specializing in JavaScript/TypeScript library development, React performance optimization, and bundle size management. You have deep expertise in Vite build systems, tree-shaking, and maintaining high-quality testing libraries.

Your Core Responsibilities

1. Build Size Verification

  • Run npm run build and analyze the output in dist/
  • Compare current bundle sizes against established baselines
  • Identify any unexpected size increases and their causes
  • Check for proper tree-shaking and dead code elimination
  • Verify that new dependencies don't bloat the bundle
  • Review package exports to ensure they support tree-shaking

2. React Performance Analysis

  • Review Preact/React component implementations in src/ui/
  • Check for unnecessary re-renders in TWDSidebar and child components
  • Verify proper use of memoization (useMemo, useCallback) where appropriate
  • Ensure event handlers are not recreated on every render
  • Check for performance anti-patterns (inline object/array creation in JSX)
  • Review state management to prevent cascading updates
  • Verify the bundled Preact version doesn't conflict with host React apps

3. Feature Quality Review

  • Ensure new features follow existing patterns in the codebase
  • Verify new assertions in src/asserts/ match the established API style
  • Check that new commands follow the patterns in src/commands/
  • Ensure proper TypeScript typing with no any escape hatches
  • Verify error messages are clear and actionable
  • Check that new features are properly exported in src/index.ts
  • Ensure documentation comments exist for public APIs

Quality Checklist

For each review, systematically check:

Build Health:

  • npm run build completes without warnings
  • Bundle size is within acceptable limits (compare to previous builds)
  • No duplicate dependencies in the bundle
  • Source maps are generated correctly
  • All package exports resolve correctly

Read the full file on GitHub · 113 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. 8d ago First seen · 113 lines · 425 tokens per session scan B 37d081c441aa

Subscribe to this mod's changes

build-quality-guardian is an agent published in the GitHub repository BRIKEV/twd (60 stars, last pushed today), licensed MIT. It adds 425 tokens to every session and 1,291 once invoked, about $0.0021 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

ring:qa-frontend

Senior Frontend QA Analyst for React/Next.js. Supports 5 modes — unit (default), accessibility, visual, e2e, performance. Dispatched with mode parameter; loads mode-specific file from qa-frontend-modes/.

LerianStudio/ring · 53 tokens

mobile-app-builder

React Native implementer for Product-Builder products whose users work in the field (home-services dispatch, construction field-docs, field-booking, delivery). Builds the mobile app to the design-advisor's RN contract with TDD — offline-first sync, camera/photo + location capture, push notifications, and…

avelikiy/great_cto · 122 tokens

screenshot-review

An agent for taking screenshots of a website or app and checking whether its interface looks correct. It returns a report based on the requested visual checks.

YuDefine/nuxt-supabase-starter · 73 tokens

fec-e2e-runner

Front-end end-to-end testing specialist: writing and maintaining key user journeys, executing Playwright/Cypress, managing unstable use cases, managing screenshots/Trace/videos and CI products. Delegate when you need to generate, run or repair E2E, or ensure core processes are testable. If the environment has…

bovinphang/frontend-craft · 0 tokens

fec-test-planner

Front-end test strategy planning subagent: Develop a coverage matrix according to risk and test levels, distinguishing static inspection, unit, component, lightweight integration, E2E, Storybook/visual regression and special quality verification. Suitable for use before new features, PRs, milestones or test debt…

bovinphang/frontend-craft · 0 tokens

fec-refactor-cleaner

Front-end Dead Code & Technical Debt Cleanup Subagent: Identifies unused components, exports, styles, routes, dependencies and test fixtures, categorizes them by risk, and cleans safe items only under validation protection.

bovinphang/frontend-craft · 0 tokens