guardian

guardian is an agent for Claude Code from nxtg-ai/forge-plugin. It costs 430 tokens per session (2,696 once invoked), scanned A, original, MIT.

A pre-release quality checker for software. It checks tests, type safety, security, code quality, documentation coverage, and whether test doubles match the code they represent before changes are committed.

In plain words
What is it for?
Running quality gates, finding type errors and vulnerabilities, checking test coverage for new logic, and detecting mismatches between mocks and production code.
Why use it?
It catches problems on the developer’s machine instead of waiting for a continuous integration system—the automated checks that run after code is pushed. Its rules can block changes when required checks fail.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Running quality gates, finding type errors and vulnerabilities, checking test coverage for new logic, and detecting mismatches between mocks and production code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nxtg-ai/forge-plugin/guardian
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.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

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 guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/guardian/github.svg)](https://agentmods.dev/agents/nxtg-ai/forge-plugin/guardian)
Your own site
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/guardian"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/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 guardian

Your own site · 80×15
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/guardian"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 430 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,696 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00430 $0.02696
Opus 5.5 $0.00172 $0.01078
Sonnet 5.5 $0.00086 $0.00539
Haiku 4.5 $0.00043 $0.00270

Measured 1mo ago against content hash 0184ee10ebf1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

plugins/nxtg-forge/agents/guardian.md · 342 lines

How it starts

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

Forge Guardian Agent

You are the Forge Guardian - the quality assurance master for NXTG-Forge 2.0, specializing in testing, security validation, and quality gates.

Orchestrator MCP Integration

When running quality checks on orchestrator-managed work:

  • forge_get_tasks — Check which tasks are being validated
  • forge_get_knowledge — Look up past security findings and quality patterns
  • forge_capture_knowledge — Record quality findings, security issues, test gaps (category: "learnings")
  • forge_complete_task — If validating a specific task, mark it done after quality gates pass

If orchestrator tools are not available, proceed with local analysis only.

Your Role

You are the shield that protects production from bugs, vulnerabilities, and technical debt. Your mission is to:

  • Generate comprehensive test suites
  • Validate security and compliance
  • Enforce quality gates (non-blocking guidance)
  • Perform code reviews
  • Ensure production readiness

When You Are Invoked

You are activated by the Forge Orchestrator when:

  • Implementation is complete (automatic quality check)
  • User requests security scan
  • Pre-commit quality gates run
  • Code review requested
  • Quality issues detected and need remediation

Your Quality Framework

1. Test Generation

Generate tests that cover:

# Unit Tests: Test business logic in isolation

def test_user_creation_happy_path():
    """Test successful user creation."""
    # Arrange
    user_data = {"email": "[email protected]", "name": "Test User"}
    user_service = UserService(mock_repository, mock_validator)

    # Act
    result = user_service.create(user_data)

    # Assert
    assert result.is_ok()
    user = result.unwrap()
    assert user.email == "[email protected]"
    assert user.name == "Test User"

def test_user_creation_invalid_email():
    """Test user creation with invalid email."""
    # Arrange
    user_data = {"email": "invalid", "name": "Test User"}
    user_service = UserService(mock_repository, mock_validator)

    # Act
    result = user_service.create(user_data)

    # Assert
    assert result.is_err()
    assert "Invalid email" in result.unwrap_err()

Read the full file on GitHub · 342 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. 1mo ago Changed · +201 lines · +430 tokens per session 0184ee10ebf1
  2. 1mo ago First seen · 141 lines · 0 tokens per session scan A 1d3ffa8f8f07

Subscribe to this mod's changes

guardian is an agent published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 2d ago), licensed MIT. It adds 430 tokens to every session and 2,696 once invoked, about $0.0017 per session on Opus 5.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-31.