system-file-guardrails

Validate edits to commands, skills, agents, and AGENTS.md files.

16|4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rianvdm/product-ai-public --skill system-file-guardrails
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-file-guardrails
Source: https://github.com/rianvdm/product-ai-public/tree/main/.opencode/skills/system-file-guardrails
Command: npx skills add https://github.com/rianvdm/product-ai-public --skill system-file-guardrails

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety checks for editing system files — commands in .opencode/command/, skills in .opencode/skills/, agents in .opencode/agent/, or AGENTS.md itself — load guardrails before changes.

Core Features & Use Cases

  • Pre-edit checks: verify inbound references across related directories and AGENTS.md to avoid broken assumptions.
  • Outbound checks: ensure referenced commands, skills, or agents exist on disk before saving.
  • Post-edit coherence: confirm cross-file references resolve and maintain consistent terminology after edits.
  • Post-session coherence: offer a quick coherence check when multiple files are edited to maintain overall consistency.

Quick Start

Follow these guardrails during any edit to system files to ensure safe changes.

Frequently Asked Questions about system-file-guardrails

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent accidental edits to system files like AGENTS.md during development?

Preventing accidental system-file edits requires live guardrails that enforce pre-edit validation and post-edit coherence across core project files. Safety checks verify inbound and outbound references before modifications are saved, reducing the risk of broken cross-file dependencies.

What are system-file guardrails and how do they protect project configuration?

System-file guardrails are safety checks applied during edits to core project files like commands, skills, agents, and AGENTS.md. They ensure frontmatter integrity and validate outbound and inbound references to maintain cross-file coherence and prevent accidental destructive changes.

How do I validate cross-file references when modifying agent and skill configurations?

Validating cross-file references involves running pre-edit checks to verify inbound references across related directories and post-edit checks to confirm referenced commands, skills, or agents exist on disk. This ensures cross-file references resolve correctly after modifications.

Can I maintain frontmatter integrity when updating core project files?

Maintaining frontmatter integrity is supported by applying safety checks during edits to core project files. These guardrails enforce pre-edit validation and post-edit coherence, guiding modifications to ensure metadata structure remains consistent across related configuration files.

What is the best way to ensure coherence after editing multiple system files in one session?

Ensuring coherence after editing multiple system files requires a post-session coherence check. This process confirms that cross-file references resolve correctly and maintains consistent terminology across all modified commands, skills, and agents.

Do I need version control to use safety checks for system-file edits?

Version control is not explicitly required to use safety checks for system-file edits. The guardrails operate by applying pre-edit validation and non-invasive tool loading to enforce frontmatter integrity and reference validation directly during the editing process.