guard

guard is a command for Claude Code from Yassinello/claude-plugin-prd-workflow. It costs 16 tokens per session (896 once invoked), scanned A, original, MIT.

A pre-merge check command that reviews a TypeScript project before code is merged. It runs type checking, linting, tests, security checks, secret scanning, and a production build, then summarizes the results.

In plain words
What is it for?
Checking code before a pull request is merged, running project tests and linters, scanning dependencies and source files for security issues, and verifying the production build.
Why use it?
It gathers common release-blocking checks into one review step. This can expose broken tests, type or style errors, vulnerable dependencies, leaked secrets, and build failures before merging.

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/yassinello/claude-plugin-prd-workflow/guard
Clone the repo
git clone --depth 1 https://github.com/Yassinello/claude-plugin-prd-workflow

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 guard

README.md
[![agentmods](https://agentmods.dev/badge/commands/yassinello/claude-plugin-prd-workflow/guard.svg)](https://agentmods.dev/commands/yassinello/claude-plugin-prd-workflow/guard)
Your own site
<a href="https://agentmods.dev/commands/yassinello/claude-plugin-prd-workflow/guard"><img src="https://agentmods.dev/badge/commands/yassinello/claude-plugin-prd-workflow/guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 896 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.00016 $0.00896
Opus 5 $0.00008 $0.00448
Sonnet 5 $0.00003 $0.00179
Haiku 4.5 $0.00002 $0.00090

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

Security

Grade A, and why

guard 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/guard.md · 190 lines

How it starts

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

Guard Command

Comprehensive pre-merge quality gate.

Purpose

Catch issues before PR merge:

  • TypeScript compilation
  • Linting errors
  • Test failures
  • Security vulnerabilities
  • Secrets detection
  • Code quality checks

Workflow

1. TypeScript Check

Run type checking:

npm run type-check  # or tsc --noEmit

Report:

  • Type errors found
  • Files affected
  • Severity level

2. Lint Check

Run linters:

npm run lint  # ESLint, Prettier, etc.

Report:

  • Lint errors and warnings
  • Fixable vs manual
  • Style violations

3. Test Suite

Run full test suite:

npm test

Report:

  • Tests passing/failing
  • Coverage metrics
  • Slow tests flagged

4. Security Scan

Check for vulnerabilities:

npm audit
git secrets --scan  # or gitleaks

Report:

  • Dependency vulnerabilities
  • Secrets in code
  • Security best practices

5. Build Verification

Verify production build:

npm run build

Report:

  • Build success/failure
  • Bundle size
  • Performance metrics

6. Summary Report

🛡️ Guard Results

TypeScript: ✅ No errors
Lint: ⚠️  3 warnings (auto-fixable)
Tests: ✅ 248 passing (92% coverage)
Security: ❌ 1 high vulnerability ([email protected])
Build: ✅ Success (bundle: 324 KB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BLOCKERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔴 Security: axios vulnerability (high)
   Fix: npm install axios@latest

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WARNINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🟡 Lint: 3 auto-fixable warnings
   Fix: npm run lint:fix

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
VERDICT: ❌ NOT READY TO MERGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Fix blockers before merging.

Blocking vs Non-Blocking

Blockers (must fix):

  • TypeScript errors
  • Test failures
  • High/Critical security vulnerabilities
  • Secrets detected
  • Build failures

Warnings (should fix):

  • Lint warnings
  • Low coverage
  • Bundle size increase
  • Slow tests

Read the full file on GitHub · 190 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 · 190 lines · 16 tokens per session scan A a904cb78b1a0

Subscribe to this mod's changes

guard is a command published in the GitHub repository Yassinello/claude-plugin-prd-workflow (12 stars, last pushed 9mo ago), licensed MIT. It adds 16 tokens to every session and 896 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.