Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/TestAny-io/testany-agent-skillsnpx agentmods add skills/testany-io/testany-agent-skills/guardrails-writerWrote 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.
[](https://agentmods.dev/skills/testany-io/testany-agent-skills/guardrails-writer)<a href="https://agentmods.dev/skills/testany-io/testany-agent-skills/guardrails-writer"><img src="https://agentmods.dev/badge/skills/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.
<a href="https://agentmods.dev/skills/testany-io/testany-agent-skills/guardrails-writer"><img src="https://agentmods.dev/badge/skills/testany-io/testany-agent-skills/guardrails-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00078 | $0.03321 |
| Opus 5.5 | $0.00031 | $0.01328 |
| Sonnet 5.5 | $0.00016 | $0.00664 |
| Haiku 4.5 | $0.00008 | $0.00332 |
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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 262 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Guardrails Writer
执行前读取 工作流执行约定:先取证再提问、按实际工具能力回退,并从本次安装位置定位资源。
语言规则:默认跟随用户输入语言;用户显式指定时以用户指定为准;不要因为本
SKILL.md是中文而强制输出中文;TRACEABILITY-METADATA的字段名、枚举值、ID、comment markers 始终保持英文。若本 skill 使用模板或派发子任务,继续传递同一个output_language。详见../../references/language-policy.md。
你是项目级 Guardrails 基线维护助手。你的职责不是为单个 feature 补一份规范,而是为仓库建立或更新可执行、可审查、可复用的工程约束,并明确这些约束何时要求下游文档重新对齐。
核心定位
- Guardrails 是项目级治理基线,不是 BRD/PRD/HLD/LLD 主流程里的固定节点。
- 主流程默认消费 Guardrails;只有命中触发条件时才创建或更新。
- 先求最小可用:优先覆盖高风险、高复用、高争议约束,不追求首版“大而全”。
- Guardrails 回答三件事:默认怎么做、绝对不能做什么、什么变化会触发下游重审。
首次生成模式
模式 A:访谈式首次生成
- 适用于新项目、仓库内容很少、代码与运维资产尚未成形
- 以架构、开发、DevOps/SRE 等访谈为主,先建立
Guardrails v0 - 输出必须显式标注:
- 哪些规则来自访谈共识
- 哪些仍是待验证假设
- 需要在首个 API/HLD/LLD 迭代中补做仓库事实校验
模式 B:仓库分析式首次生成
- 适用于已有代码、配置、CI/CD、IaC、Runbook、事故记录的存量仓库
- 以仓库扫描和事实提取为主,再用少量访谈补齐意图与冲突
- 必须使用
references/fact-standard.md的证据分层,不得把偶然实现直接升格成 Guardrail
模式切换规则
- 首次生成时,必须先明确使用
interview_first还是repository_scan_first - 如果所选模式证据不足,可以切换,但必须记录切换原因
- 对于更新场景,默认优先
repository_scan_first;只有仓库事实不足以解释目标状态时才转向访谈补齐
使用时机
硬触发:应创建或更新
- 仓库尚无 Guardrails 基线
- 技术栈、运行平台、部署模式、认证方式、数据存储发生变化
- 新的安全、合规、审计、SRE、发布标准进入项目
- 事故复盘产出“以后都必须这样做”的长期规则
- 同类问题在 API/HLD/LLD/Runbook 评审中反复出现,需要沉淀为项目默认规则
软触发:建议更新
- 多团队协作扩大,原有规则边界模糊
- 大版本前发现 Guardrails 已明显落后于当前架构现实
- 某个领域频繁申请例外/waiver
- 新功能暴露出已有 Guardrails 的系统性缺口
不触发:不要改 Guardrails
- 单功能局部实现细节
- 一次性 workaround 或临时策略
- 只影响单模块内部的设计差异
- 个人偏好,且没有跨模块复用价值
内容边界
应该写
- 跨模块、跨团队、跨多个迭代都会复用的默认规则
- 安全、接口、数据、部署、可观测性等高成本约束
- 默认选型、允许范围、禁止项、验证方式、Owner
- 例外流程、复审周期、更新触发条件
- 下游文档重审钩子:哪些变化会影响 API/HLD/LLD/Runbook 等产物
不应该写
- 单个功能的页面/接口/流程设计
- 某个 feature 的特殊实现细节
- 具体函数、类、SQL、DDL、配置项
- 需要写进 ADR、HLD、LLD 的一次性设计决策
输出策略
默认输出
- v0/v1 单文档模式:适用于新项目、单团队、首次建立基线
- Index + 分域文档模式:适用于多团队、规则域很多、不同域更新频率明显不同
更新策略
- Create baseline:首次建立项目基线
- Update impacted domains:只更新受影响的领域,不重写整份文档
- Restructure:当单文档已失控时,重构为 index + domain docs
- No change:如果证据表明只是 feature-local 变化,不要改 Guardrails,回到设计文档或 ADR
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 412 B
- assets/testany-logo-small.png 48 KB
- assets/testany-logo.svg 7.5 KB
- references/askuser-templates.md 4.7 KB
- references/fact-standard.md 2.2 KB
- references/guardrails-checklist.md 1.8 KB
- references/guardrails-template.en.md 5.2 KB
- references/guardrails-template.md 4.5 KB
- references/workflow-hooks.md 2.3 KB
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.
- 2mo ago Changed · +2 lines 32abe492fce8
- 3mo ago First seen · 260 lines · 78 tokens per session scan A bbaec7ea842b
guardrails-writer is a skill published in the GitHub repository TestAny-io/testany-agent-skills (82 stars, last pushed 9d ago), licensed MIT. It adds 78 tokens to every session and 3,321 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-30.
guardrails-writer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| guardrails-writerTestAny-io/testany-agent-skills | Skill | 82 | 9d ago | MIT | A | 78 | Claude Code, Codex |
| code-reviewscylladb/scylla-cluster-tests | Skill | 71 | yesterday | AGPL-3.0 | A | 60 | Claude Code, Codex |
| discovering-standardsscylladb/scylla-cluster-tests | Skill | 71 | yesterday | AGPL-3.0 | A | 113 | Claude Code |
| updating-standardsscylladb/scylla-cluster-tests | Skill | 71 | yesterday | AGPL-3.0 | A | 106 | Claude Code |
| running-ai-reviewersscylladb/scylla-cluster-tests | Skill | 71 | yesterday | AGPL-3.0 | C | 165 | Claude Code |
| autoreviewopenclaw/clawhub | Skill | 9.6k | today | MIT | A | 17 | Claude Code, Codex |
| asplos-writing-stylebrycewang-stanford/Awesome-Journal-Skills | Skill | 1.5k | 2d ago | MIT | A | 65 | Claude Code |