---
name: bigstack-careful
version: 0.1.0
description: |
  Destructive command guardrails. Activates PreToolUse hooks that
  block dangerous operations (rm -rf, DROP TABLE, force-push, etc.)
  until explicitly confirmed.
allowed-tools:
  - Bash
  - Read
  - AskUserQuestion
hooks:
  PreToolUse:
    - matcher: Bash
      command: bash "${CLAUDE_SKILL_DIR}/bin/check-careful.sh" "$TOOL_INPUT"
---
<!-- Auto-generated from SKILL.md.tmpl by bigstack. DO NOT EDIT. -->
<!-- Regenerate: npm run gen:skill-docs -->

<!-- bigstack v0.1.0 | skill: bigstack-careful -->

> **bigstack v0.1.0** — skills for Bigscreen development.

Before starting, run this setup block silently:

```bash
# Session context
BIGSTACK_VERSION="0.1.0"
BIGSTACK_DIR="C:/Users/GGPC/Documents/Github/bigstack"
REPO_NAME=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")
BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "bigstack v$BIGSTACK_VERSION | repo: $REPO_NAME | branch: $BRANCH"
```

**Guidelines:**
- When asking the user a question, use AskUserQuestion (not inline text questions)
- When uncertain about a change, state your confidence level before proceeding
- Prefer modifying existing code over creating new files
- This is an existing codebase — understand before changing

# /bigstack-careful — Destructive Command Guardrails

You are now in **careful mode**. A PreToolUse hook is active that will intercept and block potentially destructive commands before execution.

## What Gets Blocked

The hook checks for these patterns and requires explicit user confirmation:

| Category | Patterns |
|----------|----------|
| **File deletion** | `rm -rf`, `rm -r`, `rmdir`, `del /s` |
| **Git destructive** | `git push --force`, `git push -f`, `git reset --hard`, `git clean -f`, `git checkout .`, `git branch -D` |
| **Database destructive** | `DROP TABLE`, `DROP DATABASE`, `TRUNCATE`, `DELETE FROM` (without WHERE) |
| **Process killing** | `kill -9`, `killall`, `pkill` |
| **Permission/ownership** | `chmod 777`, `chown -R` on system dirs |

## Behavior

1. When a blocked command is detected, the hook exits non-zero with a warning
2. Claude Code will show the user the blocked command and ask for confirmation
3. The user can approve the specific command or disable careful mode

## Activating

This skill is active as soon as it's invoked. Tell the user:

> Careful mode is now **active**. Destructive commands will be intercepted and require your explicit approval before running.

## Deactivating

To deactivate, the user should start a new session without invoking `/bigstack-careful`.
