AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Pre-Action Guard

skill-sounder25-foundational-agent-skills-18-pre-action-guard · by Sounder25

A QA gate that validates potentially destructive or irreversible actions before execution.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-sounder25-foundational-agent-skills-18-pre-action-guard

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sounder25-foundational-agent-skills-18-pre-action-guard)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Pre-Action Guard? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 safety
  • verify action
  • is this safe
  • guard 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)

{
  "allowed": false,
  "risk_level": "CRITICAL",
  "reason": "Root directory deletion detected.",
  "warnings": ["Target matches blocked pattern '/*'."]
}

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

  1. Valid tool/action inputs.
  2. PowerShell 5.1+ or Core 7+.

Safety/QA Checks

  1. Auto-Block: Root deletions (/, C:\) are automatically blocked.
  2. Context Awareness: Checks .env and config keywords for higher sensitivity.
  3. 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:

  1. Call this skill BEFORE running write_to_file on existing files.
  2. Call this skill BEFORE running any run_command containing rm, del, drop.
  3. If allowed is false, STOP and ask user for confirmation.

Source & license

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

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

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.