audit-components

audit-components is a command for Claude Code from opensesh/karimo-overview. It costs 0 tokens per session (1,688 once invoked), scanned A, original, Apache-2.0.

A read-only check of React feature components against seven architecture principles. React components are code units that render parts of an interface, such as forms, buttons, or pages.

In plain words
What is it for?
It helps review `.tsx` files in `app/` and `components/`, record pass, warning, and failure results, and produce a prioritized repair plan.
Why use it?
It finds oversized components and other architecture violations without changing project files, then orders the suggested fixes by priority.

Command for Claude Code

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 commands/opensesh/karimo-overview/audit-components
Clone the repo
git clone --depth 1 https://github.com/opensesh/karimo-overview

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 audit-components

README.md
[![agentmods](https://agentmods.dev/badge/commands/opensesh/karimo-overview/audit-components.svg)](https://agentmods.dev/commands/opensesh/karimo-overview/audit-components)
Your own site
<a href="https://agentmods.dev/commands/opensesh/karimo-overview/audit-components"><img src="https://agentmods.dev/badge/commands/opensesh/karimo-overview/audit-components.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,688 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.1 $0.00000 $0.01688
Opus 5 $0.00000 $0.00844
Sonnet 5 $0.00000 $0.00338
Haiku 4.5 $0.00000 $0.00169

Measured 5d ago against content hash 9899444f4602, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

audit-components 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 5d 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.

.claude/commands/audit-components.md · 188 lines

How it starts

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

/audit-components — React Architecture Audit

Scan all feature components against the 7 architecture principles in .claude/reference/react-architecture.md, produce a structured report with pass/fail per check, and output a prioritized fix plan.

Usage

/audit-components

This command is read-only and never modifies files.

Scope

  • All .tsx files under app/ and components/
  • Excludes components/uui/** (vendor library code)
  • Excludes lib/, hooks/, utils/, types/ (not components)

Behavior

Run all checks below in order. Use Grep and Glob tools (not Bash) for all searches. Collect findings per check, then produce the final report.


Check 1: Component Size (Principle 2 — Single Responsibility)

For every .tsx file in scope, count lines (excluding blank lines, import lines, and type/interface declaration blocks).

  • PASS: under 150 lines
  • WARN: 150–200 lines
  • FAIL: over 200 lines

Record each WARN and FAIL file with its line count.


Check 2: devProps Compliance (devProps Requirement)

Use Grep to find files that call devProps( and files that export PascalCase components.

  • Files in the component set that are NOT in the compliant set are missing devProps
  • Apply exemptions from /audit-devprops: UUI vendor code, theme-provider.tsx, layout.tsx, template.tsx, loading.tsx, fragment-root pages (page.tsx, about/page.tsx), R3F components (crt-tv-model.tsx)

Calculate compliance percentage. PASS if 100%, WARN if 90–99%, FAIL if under 90%.


Check 3: Shared Component Bypass (Principle 6)

Search for these patterns that indicate a shared component is being bypassed:

SectionLabel bypass:

  • Grep pattern: className="[^"]*section-label and className={[^}]*section-label in .tsx files
  • Exclude components/shared/section-label.tsx itself and any CSS files
  • Each match is a FAIL — should use <SectionLabel> instead

ScrollReveal bypass:

  • Grep pattern: useInView in component files under components/ (not hooks/)
  • Cross-reference: if the same file does NOT import from scroll-reveal, it is rolling its own reveal
  • Each match is a WARN — should consider using <ScrollReveal>

Read the full file on GitHub · 188 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. 5d ago First seen · 188 lines · 0 tokens per session scan A 9899444f4602

Subscribe to this mod's changes

audit-components is a command published in the GitHub repository opensesh/karimo-overview (11 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,688 tokens. 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.