system-file-guardrails

system-file-guardrails is a skill for Claude Code, OpenCode from rianvdm/product-ai-public. It costs 53 tokens per session (2,371 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: reads .claude/ paths; names the NotebookEdit tool; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/sync-opencode-agents.py # create missing only (safe default).

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

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.

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

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 2,371 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.02371
Opus 5.5 $0.00021 $0.00948
Sonnet 5.5 $0.00011 $0.00474
Haiku 4.5 $0.00005 $0.00237

Measured 25d ago against content hash 334538635e4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 25d 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 · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 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.

Where the Real File Lives

There is exactly one copy of each skill on disk. Several paths resolve to it through two layers of symlinks, so a path that looks like a separate file usually isn't.

  • Layer 1 — Claude Code → OpenCode: .claude/skills and .claude/commands are folder symlinks into .opencode/. So .claude/skills/<name>/SKILL.md always resolves to .opencode/skills/<name>/SKILL.md. For skills and commands there is never a separate Claude Code copy. .claude/agents and .codex/agents are the exceptions — real directories generated by sync-opencode-agents.py (see below).
  • Two different .agents/skills/ directories exist. Repo-relative .agents/skills/ is this repo's generated Codex view (below). Home-relative ~/.agents/skills/ is the user-level install of the Cloudflare platform skills, which symlinks on into ~/git/cf-skills/skills/. Always check the leading ~/.
  • Layer 1 — Codex → OpenCode: .agents/skills/ is a generated Codex-only view. Its canonical skill entries are folder symlinks to .opencode/skills/<name>. Command adapters use generated regular SKILL.md pointer files that direct Codex to the canonical .opencode/command/<name>.md; Codex discovers symlinked skill folders but not a symlink used as the SKILL.md file itself. The command and skill files remain the only workflow sources; Claude Code and OpenCode never consume the Codex adapters. Run ./scripts/sync-codex-resources.sh after adding, renaming, or deleting a command or skill. The native codex skill is the only command without an adapter.
  • Layer 2 — OpenCode → source-of-truth repo: most entries inside .opencode/skills/ are themselves folder symlinks into a source-of-truth clone — typically ~/Documents/gitlab/data-skills/.opencode/skills/<name> (data team). Those repos are regular git clones, not symlinks — they are the targets, not the consumers. Edit there, then commit and push from that repo.
  • Synced copies (not symlinks): scripts/sync-data-skills.sh tracks a few data-skills commands and agents as real local files, listed in its COPY_FILES (for example ask-data-team.md, custesc.md, and the research and custesc agents). A copy listed in SKIP_COPY_FILES keeps its local settings and is never overwritten; any other copy is overwritten on the next sync. When you edit one, either push the change upstream or add it to SKIP_COPY_FILES with a reason. Each copy has a row in scripts/data-skills-baseline.tsv recording the upstream commit it was last reviewed against; /merge-data-skills reviews later upstream changes and moves that row. A new copy needs both a COPY_FILES entry and a baseline row (validate-agents.sh checks this).
  • Worked example — data-clickhouse-queries:
    • ~/git/product-ai/.claude/skills/data-clickhouse-queries/SKILL.md (Claude Code path)
    • → resolves through the .claude/skills symlink to .opencode/skills/data-clickhouse-queries/SKILL.md
    • → resolves through the .opencode/skills/data-clickhouse-queries symlink to ~/Documents/gitlab/data-skills/.opencode/skills/data-clickhouse-queries/SKILL.md ← real file, only place to edit

Read the full file on GitHub · 99 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. 25d ago Changed 334538635e4e
  2. 2mo ago Changed · +1 lines 049089858639
  3. 2mo ago Changed · +40 lines b0dd89d8895f
  4. 3mo 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 (21 stars, last pushed 16d ago), licensed MIT. It adds 53 tokens to every session and 2,371 once invoked, about $0.0002 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.

Related

system-file-guardrails compared with skills from other repositories

system-file-guardrails next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
system-file-guardrailsrianvdm/product-ai-publicSkill2116d agoMITA53Claude Code, OpenCode
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82kyesterdayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102kyesterdayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code