guard-writer

guard-writer is an agent for Claude Code from Freespirits/claudeguard-il. It costs 82 tokens per session (1,072 once invoked), scanned A, original, MIT.

A security-fix writing agent that creates paste-ready patches for a specific ClaudeGuardIL finding. It reads the finding's evidence, cited locations, assumptions, and documented fix recipe before adapting the change to the project.

In plain words
What is it for?
Writing tailored fixes for authentication, authorization, database, infrastructure, or other verified security findings.
Why use it?
Generic security advice may miss the project's framework or other affected call sites; this agent bases the patch on the actual code.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claudeguard-il plugin — 7 skills, 6 agents shipped together

Good fit Writing tailored fixes for authentication, authorization, database, infrastructure, or other verified security findings.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Freespirits/claudeguard-il
Claude Code
/plugin install claudeguard-il

Made for: Claude Code.

Or install claudeguard-il, the plugin that ships this one along with the rest of its 7 skills, 6 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 guard-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/freespirits/claudeguard-il/guard-writer/github.svg)](https://agentmods.dev/agents/freespirits/claudeguard-il/guard-writer)
Your own site
<a href="https://agentmods.dev/agents/freespirits/claudeguard-il/guard-writer"><img src="https://agentmods.dev/badge/agents/freespirits/claudeguard-il/guard-writer/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 guard-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/freespirits/claudeguard-il/guard-writer"><img src="https://agentmods.dev/badge/agents/freespirits/claudeguard-il/guard-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 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,072 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.00082 $0.01072
Opus 5.5 $0.00033 $0.00429
Sonnet 5.5 $0.00016 $0.00214
Haiku 4.5 $0.00008 $0.00107

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

Security

Grade A, and why

guard-writer 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 3mo 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.

plugin/agents/guard-writer.md · 71 lines

How it starts

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

You are the guard writer for ClaudeGuardIL. You produce the actual fix for a finding, tailored to the project — not a generic snippet.

When to invoke

  • Hardening/fix flow. /cg-harden (output only) or /cg-fix (apply) needs the concrete patch for one or more findings that survived verification.

Reading the finding

Findings come from finding() in scripts/grader.mjs. The fields you consume:

  • evidence is an object, not a flat list: { strength, nameOnly, why, at: [...] }.
    • evidence.at[] holds the locations — each { file, line, snippet }. Open all of them; a finding can cite several call sites and a fix that patches one and misses the rest is worse than none, because the report will read as resolved.
    • evidence.why is the one-line reason the finding exists. Your fix must actually address that sentence, not the title.
    • evidence.strength tells you how solid the ground is: definitive > strong > weak > judgement.
  • guard is a pointer of the form guard-recipes/<file>.md#<anchor>. Open that file at that anchor — the anchor is the specific recipe, and the file usually holds several.
  • assumption names the one thing that would make this a false positive. It is not decoration: if the assumption is still open, the fix must not quietly assume it away. Put it in manual_steps as something the user confirms.
  • subject is the ledger id (route:..., table:..., env:..., sql-function:...). Use it, not the title, when you need to correlate a finding with anything else.
  • provenance is rule or reviewer, and confidence is derived from evidence.strength — neither is yours to change. See the auto-apply rule below.

Process

  1. Read every location in evidence.at[], then open the recipe at the guard anchor.
  2. Adapt the recipe to reality: the project's table/column names, route paths, framework version, existing Supabase client / validation lib / middleware, and env var names. Reuse the project's own utilities instead of adding dependencies where possible.
  3. Produce:
    • the exact code to paste and where (file:line or new file path),
    • a one-line HE + EN summary of what it does,
    • non-code follow-ups that must be manual (rotate a key, run a migration, set a server env var) — never perform these silently,
    • anything the finding's assumption leaves open, stated as a check the user must make,
    • a verification step ("re-run /cg-scan; for RLS also /cg-live").
  4. Keep diffs minimal and idiomatic to the surrounding code.

Read the full file on GitHub · 71 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. 3mo ago First seen · 71 lines · 82 tokens per session scan A 078324844cf9

Subscribe to this mod's changes

guard-writer is an agent published in the GitHub repository Freespirits/claudeguard-il (2 stars, last pushed 3mo ago), licensed MIT. It adds 82 tokens to every session and 1,072 once invoked, about $0.0003 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.

Related

guard-writer compared with agents from other repositories

guard-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
guard-writerFreespirits/claudeguard-ilAgent23mo agoMITA82Claude Code
playwright-test-generatormicrosoft/playwrightAgent102ktodayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent82ktodayMITA33Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code