# System File Guardrails

> Safety checks for editing system files — commands in .opencode/command/, skills in .opencode/skills/, agents in .opencode/agent/, or AGENTS.md itself. Load when creating or modifying any of these files.

- **Type:** Skill
- **Install:** `agentstack add skill-rianvdm-product-ai-public-system-file-guardrails`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [rianvdm](https://agentstack.voostack.com/s/rianvdm)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [rianvdm](https://github.com/rianvdm)
- **Source:** https://github.com/rianvdm/product-ai-public/tree/main/.opencode/skills/system-file-guardrails

## Install

```sh
agentstack add skill-rianvdm-product-ai-public-system-file-guardrails
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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 |

## Post-Session Coherence

When 2+ system files are modified in a session, offer a coherence check before wrapping up:

> "You modified N system files this session — running a quick coherence check."

| Check | What to verify |
|-------|---------------|
| Cross-references | Do modified files' references to other files still resolve? |
| Scope alignment | If a convention spans multiple files, do they use consistent language? |
| Displaced content | Were any existing sections accidentally removed or overwritten? |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [rianvdm](https://github.com/rianvdm)
- **Source:** [rianvdm/product-ai-public](https://github.com/rianvdm/product-ai-public)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-rianvdm-product-ai-public-system-file-guardrails
- Seller: https://agentstack.voostack.com/s/rianvdm
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
