system-file-guardrails

system-file-guardrails is a skill for Claude Code, OpenCode from rianvdm/product-ai-public. It costs 53 tokens per session (946 once invoked), scanned A, original, MIT.

A checklist for safely editing an AI coding setup’s own command, skill, agent, or AGENTS.md files. It checks links between these files before and after changes.

In plain words
What is it for?
Use it when creating or modifying files in .opencode/command/, .opencode/skills/, .opencode/agent/, or AGENTS.md.
Why use it?
Changes to these files can silently break other instructions or leave references pointing to missing files. The checks reveal those risks before and after editing.

Skill for Claude CodeOpenCode

Written for Claude Code and OpenCode: $ARGUMENTS substitution, but also installed under .opencode/. Also seen: mentions AGENTS.md; mentions OpenCode.

Good fit Use it when creating or modifying files in .opencode/command/, .opencode/skills/, .opencode/agent/, or AGENTS.md.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rianvdm/product-ai-public/system-file-guardrails
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.

Any agent
npx skills add rianvdm/product-ai-public --skill system-file-guardrails
Clone the repo
git clone --depth 1 https://github.com/rianvdm/product-ai-public

Made for: Claude Code, OpenCode.

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 system-file-guardrails

README.md
[![agentmods](https://agentmods.dev/badge/skills/rianvdm/product-ai-public/system-file-guardrails/github.svg)](https://agentmods.dev/skills/rianvdm/product-ai-public/system-file-guardrails)
Your own site
<a href="https://agentmods.dev/skills/rianvdm/product-ai-public/system-file-guardrails"><img src="https://agentmods.dev/badge/skills/rianvdm/product-ai-public/system-file-guardrails/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 system-file-guardrails

Your own site · 80×15
<a href="https://agentmods.dev/skills/rianvdm/product-ai-public/system-file-guardrails"><img src="https://agentmods.dev/badge/skills/rianvdm/product-ai-public/system-file-guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 946 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.00053 $0.00946
Opus 5 $0.00026 $0.00473
Sonnet 5 $0.00011 $0.00189
Haiku 4.5 $0.00005 $0.00095

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

Security

Grade A, and why

system-file-guardrails 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 12d 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.

.opencode/skills/system-file-guardrails/SKILL.md · 58 lines

How it starts

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

System File Edit Guardrails

Follow these checks when editing system files: commands (.opencode/command/), skills (.opencode/skills/), agents (.opencode/agent/), or AGENTS.md itself.

Before Editing

Check What to verify
Inbound references Search for the file's name across .opencode/command/, .opencode/skills/, .opencode/agent/, and AGENTS.md. Note files whose assumptions could break if this file changes.
Outbound references What skills, agents, or commands does this file reference? Verify each exists on disk.

If broken outbound references are found, warn before proceeding (the edit might be fixing them).

After Editing a Command

Check What to verify
Frontmatter description present
$ARGUMENTS Parsed and handled (if command accepts arguments)
Skill loading Lazy — no loading during research phases
Token efficiency Compact tables over prose. Nothing duplicated from AGENTS.md
MCP tool references Correct tool names, fallback behavior if tools are unavailable

After Editing a Skill or Agent

Check What to verify
Frontmatter name, description present. Agents: mode, tools also present
Description accuracy Frontmatter description matches what the file actually does
Stale references No references to commands, tools, files, or skills that don't exist
Agent quality checklist Present and covers the agent's actual scope

Writing the Content

The checks above cover mechanics. For the writing — what earns its place in a file that loads into every session — two references, which agree more than they appear to:

  • superpowers:writing-skills — TDD for documentation. Baseline-test first, and its Match the Form to the Failure table: prohibitions and rationalization tables work for discipline failures (agent knows the rule, skips it under pressure) and measurably backfire on shaping failures (output has the wrong form), where a positive recipe wins.
  • Matt Pocock's writing-for-agents — the pruning lens. Read the real files, not the overview page: gh api repos/mattpocock/skills/contents/skills/productivity/writing-for-agents/SKILL.md --jq .content | base64 -d, plus its sibling SKILL-MECHANICS.md for frontmatter and the model- vs user-invoked choice. Five levers: context pointers (the pointer's wording, not its target, decides reliability — one trigger per branch), information hierarchy (in-file step → in-file reference → disclosed reference; inline what every branch needs, push behind a pointer what only some branches reach), completion criteria (checkable and exhaustive — "every rule applied" drives legwork where "produce a list" does not), leading words (a pretrained concept repeated as a token, never as a sentence), and pruning (the no-op test: delete the line, did behaviour change? If not, delete the whole sentence, not some words).

Read the full file on GitHub · 58 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. 12d ago First seen · 58 lines · 53 tokens per session scan A fa3e09d88693

Subscribe to this mod's changes

system-file-guardrails is a skill published in the GitHub repository rianvdm/product-ai-public (16 stars, last pushed 4d ago), licensed MIT. It adds 53 tokens to every session and 946 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens