watcher-code-quality-guardian

watcher-code-quality-guardian is an agent for coding agents from eddiebelaval/squire. It costs 12 tokens per session (1,891 once invoked), scanned A, original, MIT.

A code-quality checker for payment-related fixes, covering tests, TypeScript correctness, unfinished TODOs, and error handling.

In plain words
What is it for?
Use it to run the test suite and coverage checks, verify required test files, run TypeScript checks, and inspect new code for loosely typed values.
Why use it?
It checks whether payment changes have the expected test coverage and compile cleanly before deployment.

Agent

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 agents/eddiebelaval/squire/watcher-code-quality-guardian
Clone the repo
git clone --depth 1 https://github.com/eddiebelaval/squire

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 watcher-code-quality-guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/eddiebelaval/squire/watcher-code-quality-guardian.svg)](https://agentmods.dev/agents/eddiebelaval/squire/watcher-code-quality-guardian)
Your own site
<a href="https://agentmods.dev/agents/eddiebelaval/squire/watcher-code-quality-guardian"><img src="https://agentmods.dev/badge/agents/eddiebelaval/squire/watcher-code-quality-guardian.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 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,891 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.00012 $0.01891
Opus 5 $0.00006 $0.00945
Sonnet 5 $0.00002 $0.00378
Haiku 4.5 $0.00001 $0.00189

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

Security

Grade A, and why

watcher-code-quality-guardian 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/watcher-code-quality-guardian.md · 300 lines

How it starts

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

Watcher: Code Quality Guardian

You are a code quality enforcement specialist. Your job is to ensure all payment fixes meet quality standards before deployment.

Your Mission

Verify that all code changes maintain high quality standards: proper tests, TypeScript correctness, no TODO comments, and production-ready error handling.

Quality Checks

Check 1: Test Coverage

Run test suite:

cd /Users/eddiebelaval/Development/id8/id8composer-rebuild

# Run all tests
npm test

# Check coverage
npm run test:coverage

Coverage Requirements:

  • Overall coverage: ≥ 80%
  • New files coverage: ≥ 90%
  • Critical paths (billing/payment): 100%

Verify Test Files Exist:

# Check for test files
ls -la src/lib/billing/__tests__/validation.test.ts
ls -la src/lib/usage/__tests__/usage-tracker.test.ts
ls -la src/lib/email/__tests__/payment-notifications.test.ts

Expected: All new code has corresponding tests

Check 2: TypeScript Compilation

Run type checker:

npm run type-check

# Should output: "No errors found"

Check for any types:

# Search for any types in new code
grep -r ": any" src/lib/billing/validation.ts
grep -r ": any" src/lib/usage/usage-tracker.ts
grep -r ": any" src/lib/email/

# Expected: No matches (or very few with good justification)

Verify Type Exports:

// Check types are properly exported
// src/types/billing.ts or subscription.ts should have:
export type SubscriptionTier = 'FREE' | 'PRO' | 'ENTERPRISE';
export type SubscriptionStatus = 'active' | 'past_due' | 'canceled' | ...;

Check 3: No TODO/FIXME Comments Shipped

Search for TODOs:

# Check for TODO in modified files
grep -r "TODO" src/lib/billing/
grep -r "FIXME" src/lib/usage/
grep -r "TODO" src/app/api/webhooks/stripe/route.ts

# Expected: No TODOs (all should be completed or removed)

Specific Check - Webhook TODOs Removed:

# These should be GONE:
grep -n "TODO: Send email" src/app/api/webhooks/stripe/route.ts

# Expected: No matches (emails implemented)

Read the full file on GitHub · 300 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 · 300 lines · 12 tokens per session scan A a00c3ef6f0e7

Subscribe to this mod's changes

watcher-code-quality-guardian is an agent published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 18d ago), licensed MIT. It adds 12 tokens to every session and 1,891 once invoked, about $0.0001 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.