safety-scoping

Monitor destructive commands and restrict file edits in Bash sessions.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/QuestionPilot/authored-skills --skill safety-scoping
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safety-scoping
Source: https://github.com/QuestionPilot/authored-skills/tree/main/skills/safety-scoping
Command: npx skills add https://github.com/QuestionPilot/authored-skills --skill safety-scoping

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides session safety guardrails to prevent accidental destructive actions and unauthorized file edits during coding sessions.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before destructive commands like rm -rf, git push --force, and kubectl delete.
  • Edit Restriction: Restricts file edits to a chosen directory to prevent accidental changes outside the boundary.
  • Guard Mode: Combines both warnings and restrictions for comprehensive session safety.
  • Use Case: Ideal for environments where users require strict guardrails, such as production codebases or sensitive systems.

Quick Start

To enable safety guardrails, run the command '/safety-scoping careful' in your coding session.

Frequently Asked Questions about safety-scoping

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

FAQPage Schema
How do I prevent accidental destructive bash commands during a coding session?

You can restrict file edits to a specific directory boundary using safety-scoping, which prevents Claude Code from making accidental changes to files outside your chosen directory scope.

How do I restrict Claude Code file edits to a specific directory?

You can restrict file edits to a specific directory boundary using safety-scoping, which prevents Claude Code from making accidental changes to files outside your chosen directory scope.

Can I enable both command warnings and file edit restrictions simultaneously?

Yes, you can enable both command warnings and file edit restrictions simultaneously by using Guard Mode, which combines destructive command monitoring and directory boundary enforcement for comprehensive session safety.

Does safety-scoping work with Claude Code hooks for bash environments?

You need a Bash environment with Claude Code PreToolUse hooks integration, as safety-scoping relies on these hooks to enforce state management and boundary mechanisms for monitoring commands.

Do I need Claude Code PreToolUse hooks to enforce coding session guardrails?

You need a Bash environment with Claude Code PreToolUse hooks integration, as safety-scoping relies on these hooks to enforce state management and boundary mechanisms for monitoring commands.

What is the best way to protect a production codebase from accidental file modifications?

The best way to protect a production codebase is applying safety-scoping guardrails, which restrict file edits to chosen directories and warn before destructive commands to prevent unauthorized changes in sensitive systems.