sounder25/foundational-agent-skills/18-pre-action-guard
Claude Code and agent skill by sounder25/foundational-agent-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
A QA gate that validates potentially destructive or irreversible actions before execution.
Install
npx vskill@latest install sounder25/foundational-agent-skills/18-pre-action-guardSKILL.md
SKILL-018: Pre-Action Guard
Overview
Enforces a "Measure Twice, Cut Once" philosophy. This skill intercepts high-stakes actions (file writes, command execution) and validates them against safety rules and the current active plan to prevent accidental data loss or system corruption.
Trigger Phrases
check safetyverify actionis this safeguard check
Inputs
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
--Action | string | Yes | - | The tool/verb being performed (e.g. write_to_file, rm) | |
--Target | string | Yes | - | The file path or command argument | |
--Plan | string | No | $null | The current plan context for alignment check |
Outputs
1. Assessment Result (JSON)
2. Risk Levels
NONE: Read-only operations.LOW: Safe writes (files in temp, new files).MEDIUM: Modifying existing non-critical files.HIGH: Modifying config/env files.CRITICAL: Destructive delete/format commands.
Preconditions
- Valid tool/action inputs.
- PowerShell 5.1+ or Core 7+.
Safety/QA Checks
- Auto-Block: Root deletions (
/,C:\) are automatically blocked. - Context Awareness: Checks
.envandconfigkeywords for higher sensitivity. - Command-Only Discipline:
- Rejects output containing shell prompts (
PS C:\,>). - Rejects lines that look like terminal output (e.g.,
Everything up-to-date,At line:,CategoryInfo:). - Rejects mixed snippets containing both commands and output.
- Enforcement: All runnable commands must be isolated in a clean, validated block.
Stop Conditions
| Condition | Action | |
|---|---|---|
| Missing Action/Target | Return error | |
| CRITICAL risk | Return allowed: false | |
| Mixed Output Detected | Return allowed: false |
Implementation
See scripts/guard_check.ps1.
Integration with Other Skills
All agents must:
- Call this skill BEFORE running
write_to_fileon existing files. - Call this skill BEFORE running any
run_commandcontainingrm,del,drop. - If
allowedis false, STOP and ask user for confirmation.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking18_pre_action_guard/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sounder25/foundational-agent-skills/18-pre-action-guard)