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/github.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/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 build-quality-guardian

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00170 $0.00516
Sonnet 5.5 $0.00085 $0.00258
Haiku 4.5 $0.00042 $0.00129

Measured 2mo ago against content hash 37d081c441aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 2mo 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. 2mo 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 (68 stars, last pushed today), licensed MIT. It adds 425 tokens to every session and 1,291 once invoked, about $0.0017 per session on Opus 5.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

ai-hygiene-auditor

Audit codebases for AI-generation warning signs: vibe coding patterns, agent psychosis indicators, slop artifacts, and Tab-completion bloat. Specialized complement to bloat-auditor.

athola/claude-night-market · 48 tokens

sap-test-plan-reviewer

Adversarial review of a test-case plan produced by design-cases. READS the actual ABAP source snapshot (plus findings.md, flow.md, units.md, and the TC-.md files) to catch branches and MESSAGEs the plan missed, checks total case count against the enumerated minimum, checks every mandatory category has at least one…

marcellourbani/vscode_abap_remote_fs · 161 tokens

edge-case-explorer

Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…

testdouble/han · 135 tokens

karimo-coverage-reviewer

Analyzes coverage reports and adds explanatory PR comments. Spawned by /karimo:merge when coverage reports exist. Cross-references with task briefs to explain coverage gaps.

opensesh/KARIMO · 41 tokens

ring:qa

Senior QA Analyst for financial systems. Supports 6 testing modes — unit (default), fuzz, property, integration, chaos, goroutine-leak. Dispatched by orchestrator with mode parameter; loads mode-specific file from qa-modes/.

LerianStudio/ring · 52 tokens

Smart Exclude

Picks folders a SAST run doesn't need to scan (test directories, fixtures, docs, generated code, vendored deps) so the scan skips them.

agentgg-dev/agentgg · 36 tokens