guardrails-writer

guardrails-writer is a command for Claude Code from TestAny-io/testany-agent-skills. It costs 11 tokens per session (299 once invoked), scanned A, original, MIT.

A command for creating or updating project Guardrails, written rules that define engineering, architecture, security, data, and operational boundaries. It can start from interviews or analysis of a code repository.

In plain words
What is it for?
Use it to establish a new governance baseline, revise rules after an architectural or compliance change, or record lessons from an incident.
Why use it?
It turns repeated review findings, major changes, and lessons from incidents into documented project rules and follow-up checks.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the testany-eng plugin — 21 skills, 21 commands shipped together

Good fit Use it to establish a new governance baseline, revise rules after an architectural or compliance change, or record lessons from an incident.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/testany-io/testany-agent-skills/guardrails-writer
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/TestAny-io/testany-agent-skills

Made for: Claude Code.

Or install testany-eng, the plugin that ships this one along with the rest of its 21 skills, 21 commands.

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 guardrails-writer

README.md
[![agentmods](https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/guardrails-writer/github.svg)](https://agentmods.dev/commands/testany-io/testany-agent-skills/guardrails-writer)
Your own site
<a href="https://agentmods.dev/commands/testany-io/testany-agent-skills/guardrails-writer"><img src="https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/guardrails-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 guardrails-writer

Your own site · 80×15
<a href="https://agentmods.dev/commands/testany-io/testany-agent-skills/guardrails-writer"><img src="https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/guardrails-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 299 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.00011 $0.00299
Opus 5 $0.00005 $0.00150
Sonnet 5 $0.00002 $0.00060
Haiku 4.5 $0.00001 $0.00030

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

Security

Grade A, and why

guardrails-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 11d 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/testany-eng/commands/guardrails-writer.md · 33 lines

What it actually says

Guardrails Writer

启动项目级 Guardrails 维护流程。这个命令不是给每个功能都跑一遍的,而是在项目启动、重大变更、事故复盘、重复评审问题沉淀时创建或更新治理基线。首次生成支持“访谈式”和“仓库分析式”两种方法。

使用方式

提供项目或文档路径:

$ARGUMENTS

适用场景

  • 新项目或新平台启动,需要建立 Guardrails 基线
  • 架构、平台、认证、数据、部署、合规边界发生变化
  • 事故复盘后,需要把长期规则固化
  • API/HLD/LLD/Runbook 评审反复出现同类问题,需要上升为项目规则
  • 需要明确“改完 Guardrails 后哪些下游文档要重审”
  • 需要基于角色访谈或仓库事实快速生成第一版 Guardrails

输出内容

  • Guardrails 文档,或 index + 分域文档
  • 更新触发原因、复审周期、例外流程
  • 下游工作流钩子与重审建议
  • LLD 模块要求表

请提供路径开始编写。

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. 11d ago First seen · 33 lines · 11 tokens per session scan A b0e1db089cc7

Subscribe to this mod's changes

guardrails-writer is a command published in the GitHub repository TestAny-io/testany-agent-skills (82 stars, last pushed 3d ago), licensed MIT. It adds 11 tokens to every session and 299 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.