Source profileQuality 95/100

brucesongs/kali-claw/skills/safety-guard/SKILL.md

safety-guard

Before executing ANY potentially destructive or irreversible command - When a command targets production or critical infrastructure - When operating under a defined rules of engagement (ROE) - When a loop or automated sequence is about to start - User says "safe?

Source repository stars
67
Declared platforms
2
Static risk flags
0
Last source update
2026-08-19
Source checked
2026-08-28

Decision brief

What it does: where it fits

Before executing ANY potentially destructive or irreversible command - When a command targets production or critical infrastructure - When operating under a defined rules of engagement (ROE) - When a loop or automated sequence is about to start - User says "safe?

Best for

  • Scope Enforcement — Verify every command and target stays within authorized engagement boundaries before execution
  • Dangerous Command Interception — Block or require confirmation for destructive commands (rm, format, drop table, mass delete)
  • Rate Limiting — Prevent excessive requests that could trigger target IPS/IDS alerts or cause denial of service

Not for

  • Skipping scope checks — "I'm sure it's in scope" is not acceptable
  • Disabling safety for speed — Safety never slows you down as much as an incident

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeDeclaredSource recordInstall path and trigger
CursorDeclaredSource recordInstall path and trigger
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/brucesongs/kali-claw --skill "skills/safety-guard"
Safe inspection promptEditorial

Inspect the Agent Skill "safety-guard" from https://github.com/brucesongs/kali-claw/blob/a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e/skills/safety-guard/SKILL.md at commit a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Summary

    Safety Guard skill domain covering defense operations.

    Safety Guard skill domain covering defense operations.
  2. 02

    Use Cases

    1. Scope Enforcement — Verify every command and target stays within authorized engagement boundaries before execution 2. Dangerous Command Interception — Block or require confirmation for destructive commands (rm, format, drop table, mass delete) 3. Rate Limiting — Prevent exces…

    Scope Enforcement — Verify every command and target stays within authorized engagement boundaries before executionDangerous Command Interception — Block or require confirmation for destructive commands (rm, format, drop table, mass delete)Rate Limiting — Prevent excessive requests that could trigger target IPS/IDS alerts or cause denial of service
  3. 03

    Activation

    Before executing ANY potentially destructive or irreversible command

    Before executing ANY potentially destructive or irreversible commandWhen a command targets production or critical infrastructureWhen operating under a defined rules of engagement (ROE)
  4. 04

    Three Safety Modes

    Standard safety checks applied to every operation:

    Verify target is within authorized scopeCheck command for known dangerous patternsConfirm no unintended side effects
  5. 05

    Mode 1: Careful (Default)

    Standard safety checks applied to every operation:

    Verify target is within authorized scopeCheck command for known dangerous patternsConfirm no unintended side effects

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score95/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars67SourceRepository attention, not individual Skill quality
Compatibility2 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
brucesongs/kali-claw
Skill path
skills/safety-guard/SKILL.md
Commit
a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

Safety Guard

Summary

Safety Guard skill domain covering defense operations.

Domain: defense

Use Cases

  1. Scope Enforcement — Verify every command and target stays within authorized engagement boundaries before execution
  2. Dangerous Command Interception — Block or require confirmation for destructive commands (rm, format, drop table, mass delete)
  3. Rate Limiting — Prevent excessive requests that could trigger target IPS/IDS alerts or cause denial of service
  4. Incident Response — Provide structured response procedures when a safety violation or unexpected event occurs
  5. Rules of Engagement Compliance — Track and enforce client-specified constraints (no social engineering, no exfiltration, time windows)

Activation

  • Before executing ANY potentially destructive or irreversible command
  • When a command targets production or critical infrastructure
  • When operating under a defined rules of engagement (ROE)
  • When a loop or automated sequence is about to start
  • User says "safe?", "is this safe?", "check scope", "safety check"

Three Safety Modes

Mode 1: Careful (Default)

Standard safety checks applied to every operation:

  • Verify target is within authorized scope
  • Check command for known dangerous patterns
  • Confirm no unintended side effects
  • Log operation with evidence protocol

Applied to: All normal penetration testing operations

Mode 2: Freeze

Pause and require explicit operator confirmation:

  • Any command that modifies the target system
  • Any operation that could cause service disruption
  • Any credential-based attack (brute force, password spray)
  • Any exploit that could cause system instability

Applied to: Operations that cross from passive to active

Mode 3: Guard

Block the operation entirely:

  • Commands targeting out-of-scope systems
  • Operations that could cause irreversible damage
  • Attacks that could propagate beyond the target
  • Commands that could expose or exfiltrate real user data

Applied to: Operations that violate safety boundaries

Scope Enforcement

Scope Check Protocol

Before any operation, verify:

## Scope Check
- **Target:** [IP / hostname / URL / CIDR]
- **Operation:** [What will be done]
- **In authorized scope?** [YES / NO / UNCLEAR]
- **Potential impact:** [None / Low / Medium / High / Critical]
- **Reversible?** [YES / NO]
- **Third-party systems affected?** [YES / NO]
- **User data at risk?** [YES / NO]

Decision rules:

In Scope?ImpactReversible?Action
YESLow-MediumYESProceed with Careful mode
YESHighYESSwitch to Freeze mode
YESAnyNOSwitch to Freeze mode
NOAnyAnySwitch to Guard mode (block)
UNCLEARAnyAnySwitch to Freeze mode, ask operator

Dangerous Command Patterns

The following command patterns trigger enhanced safety checks:

Block (Guard Mode)

PatternWhyExample
Mass deletionIrreversible data lossrm -rf /, DROP DATABASE
Public network exposureUnauthorized service exposureBinding to 0.0.0.0
Credential exfiltrationData breach riskUploading /etc/shadow to external service
Fork bombSystem crash`:(){ :
Writing to critical system filesSystem instabilityOverwriting /etc/passwd, /etc/shadow
Mass scanning of public rangesLegal/ethics violationnmap -sS 0.0.0.0/0

Pause (Freeze Mode)

PatternWhyExample
Exploit executionTarget may crashRunning exploit/multi/handler
Brute force attacksAccount lockout riskhydra, medusa, ncrack
Denial of service patternsService disruptionhping3 --flood, slowloris
Modification of target filesSystem changesUploading web shells, modifying configs
Privilege escalation commandsSystem state changesudo commands on target
Network tunnelingTraffic routing changesssh -R, chisel, proxychains

Warn (Careful Mode)

PatternWhyExample
Active port scanningMay trigger IDSnmap -sS, nmap -sV
Vulnerability scanningMay trigger alertsnessus, openvas, nikto
Directory enumerationAccess logsgobuster, dirb, ffuf
DNS enumerationMay trigger rate limitsdnsrecon, dnstracer

Rate Limiting Guidance

Per-Target Rate Limits

Target TypeMax Requests/secBurst Allowance
Web application1020
API endpoint510
SSH service13
DNS resolver2050
SMB service510
Database510

Backoff Strategy

When rate limiting is detected (HTTP 429, connection drops, etc.):

1st detection: Wait 5 seconds, reduce rate by 50%
2nd detection: Wait 30 seconds, reduce rate by 75%
3rd detection: STOP, report to operator

Engagement Rules Template

## Rules of Engagement: [Engagement Name]

### Authorized Scope
- **IP ranges:** [CIDR blocks]
- **Domains:** [hostname list]
- **Applications:** [URL list]
- **Excluded:** [What is explicitly OUT of scope]

### Authorized Activities
- [ ] Passive reconnaissance (OSINT, DNS lookups)
- [ ] Active scanning (port scan, service enumeration)
- [ ] Vulnerability scanning (automated tools)
- [ ] Manual exploitation (specific techniques)
- [ ] Post-exploitation (privilege escalation, lateral movement)
- [ ] Social engineering (phishing, vishing)
- [ ] Physical security testing
- [ ] Denial of service testing

### Constraints
- **Time window:** [Start datetime] to [End datetime]
- **Max concurrent connections:** [Number]
- **Credentials provided:** [Yes/No, details]
- **Notification required before:** [Specific actions]

### Emergency Contact
- **Client contact:** [Name, phone, email]
- **Abort procedure:** [What to do if something goes wrong]

### Reporting
- **Evidence format:** [Required format]
- **Encryption required:** [Yes/No, method]
- **Delivery method:** [How to deliver report]

Pre-Action Safety Checklist

Before any potentially impactful operation:

## Pre-Action Checklist
- [ ] Target confirmed in authorized scope
- [ ] Operation type authorized in ROE
- [ ] Current time within authorized time window
- [ ] Rate limits respected
- [ ] Evidence capture ready (terminal-ops protocol)
- [ ] Rollback plan identified
- [ ] No third-party systems will be affected
- [ ] No real user data will be accessed or modified
- [ ] Operator available for escalation if needed

Incident Response Protocol

If something goes wrong during testing:

Level 1: Minor Issue

Service restarted, non-critical log entry generated, test visible to target admin.

Response:

  1. Stop current operation
  2. Log the incident with timestamp
  3. Continue testing after a brief pause
  4. Note in final report

Level 2: Service Impact

Target service degraded or temporarily unavailable, unexpected data exposure.

Response:

  1. Stop ALL operations immediately
  2. Log the incident with full evidence
  3. Notify operator within 5 minutes
  4. Wait for operator decision before continuing
  5. Document in final report with root cause analysis

Level 3: Critical Incident

Target system crashed, data loss occurred, unauthorized access to production data, out-of-scope system affected.

Response:

  1. Stop ALL operations immediately
  2. Disconnect from target network if applicable
  3. Log ALL evidence immediately (before cleanup)
  4. Notify operator IMMEDIATELY
  5. Do NOT attempt to fix or cover up
  6. Preserve all logs and evidence
  7. Full incident report required before any further testing

Integration with Other Skills

SkillSafety Guard Role
autonomous-loopsScope lock enforcement, rate limiting, abort conditions
terminal-opsPre-action safety checks before evidence-captured operations
verification-loopSafety checks before verification execution
network-pentestScope checking for network operations
web-sqli / web-xssDangerous command pattern checks
post-exploitationFreeze mode for privilege escalation and lateral movement
docker-patternsEnsure lab environments don't leak to public interfaces
all skillsUniversal safety layer applied to every operation

Detection Methods

Safety Guard Service Audit

  • Safety bypass attempts: Patterns indicating attempts to bypass safety checks (jailbreak signatures).
  • False negative rates: Safety guard approving known-malicious content.
  • Latency anomalies: Safety guard slower than baseline; service degradation.

SIEM Detection Rules

  • Splunk SPL: index=safety guard.action="*" | stats count by action, reason | sort -count
  • Custom safety metrics: Per-rule precision/recall tracking.

Defense Evasion Techniques

Safety Guard Bypass

  • Indirect bypass: Embed bypass in tool result (e.g., file content) rather than user prompt.
  • Multi-turn bypass: Spread bypass across multiple turns; each looks benign individually.
  • Encoding tricks: Base64, hex, Unicode normalization to evade content filters.
  • Long-context dilution: Embed bypass in 50K+ token context; dilute attention.
  • Cognitive hacking: Frame as hypothetical, fictional, or academic exercise.

Anti-Patterns

  • Skipping scope checks — "I'm sure it's in scope" is not acceptable
  • Disabling safety for speed — Safety never slows you down as much as an incident
  • Assuming test data — Always verify you're not affecting real user data
  • Not having a rollback plan — If you can't undo it, don't do it
  • Ignoring rate limits — Target stability is always more important than test speed
  • Testing without ROE — Never test without defined rules of engagement

Orchestration

ECC Loop Pattern

  • Pattern: Cross-cutting Interceptor (pre-action check on every operation across all skills)
  • Rationale: Safety is not a sequential step but a cross-cutting concern — it must intercept every operation from every skill, acting as a gate that blocks, pauses, or allows each action
  • Integration: All skills (pre-action safety checks), autonomous-loops (scope lock enforcement, rate limiting), terminal-ops (pre-execution safety verification), docker-patterns (localhost-only binding verification)

Cross-Skill Pipeline

[any skill] → safety-guard → [proceed / freeze / block]
                   ↓
              autonomous-loops (abort conditions)
                   ↓
              chronicle (incident logging)

Quality Gate

  • Pre-condition: Every operation passes through scope check and danger pattern matching
  • Post-condition: Operation classified as safe (proceed), risky (freeze for confirmation), or dangerous (blocked)
  • Verification: No operation executes without passing safety classification

Frequently asked questions

What to verify before installation and use

What does the safety-guard source document cover?

Before executing ANY potentially destructive or irreversible command - When a command targets production or critical infrastructure - When operating under a defined rules of engagement (ROE) - When a loop or automated sequence is about to start - User says "safe?

How do I install safety-guard?

The source record exposes this install command: npx skills add https://github.com/brucesongs/kali-claw --skill "skills/safety-guard". Inspect the command and pinned source before running it.

Which Agent platforms does the source record declare?

The pinned source record declares support for: claude code, cursor.

Alternatives

Compare before choosing