$npx -y skills add thanh-abaii/gstack-windows-port --skill gstack-carefulSafety guardrails for destructive commands. Warns before rm -rf, DROP TABLE, force-push, git reset --hard, kubectl delete, and similar destructive operations. User can override each warning. Use when touching prod, debugging live systems, or working in a shared environment. Use w
| 1 | <!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> |
| 2 | |
| 3 | ## Preamble (run first) |
| 4 | |
| 5 | ```bash |
| 6 | python "bin/gstack-boot.py" --skill careful | iex |
| 7 | ``` |
| 8 | |
| 9 | <!-- Regenerate: bun run gen:skill-docs --> |
| 10 | |
| 11 | > **Safety Advisory:** This skill includes safety checks that check bash commands for destructive operations (rm -rf, DROP TABLE, force-push, git reset --hard, etc.) before execution. When using this skill, always pause and verify before executing potentially destructive operations. If uncertain about a command's safety, ask the user for confirmation before proceeding. |
| 12 | |
| 13 | # /gs:careful — Destructive Command Guardrails |
| 14 | |
| 15 | Safety mode is now **active**. Every bash command will be checked for destructive |
| 16 | patterns before running. If a destructive command is detected, you'll be warned |
| 17 | and can choose to proceed or cancel. |
| 18 | |
| 19 | ```bash |
| 20 | New-Item -ItemType Directory -Force ~/.gstack/analytics |
| 21 | echo '{"skill":"careful","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel | Out-Null)" | Out-Null ; echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl | Out-Null ; true |
| 22 | ``` |
| 23 | |
| 24 | ## What's protected |
| 25 | |
| 26 | | Pattern | Example | Risk | |
| 27 | |---------|---------|------| |
| 28 | | `rm -rf` / `rm -r` / `rm --recursive` | `rm -rf /var/data` | Recursive delete | |
| 29 | | `DROP TABLE` / `DROP DATABASE` | `DROP TABLE users;` | Data loss | |
| 30 | | `TRUNCATE` | `TRUNCATE orders;` | Data loss | |
| 31 | | `git push --force` / `-f` | `git push -f origin main` | History rewrite | |
| 32 | | `git reset --hard` | `git reset --hard HEAD~3` | Uncommitted work loss | |
| 33 | | `git checkout .` / `git restore .` | `git checkout .` | Uncommitted work loss | |
| 34 | | `kubectl delete` | `kubectl delete pod` | Production impact | |
| 35 | | `docker rm -f` / `docker system prune` | `docker system prune -a` | Container/image loss | |
| 36 | |
| 37 | ## Safe exceptions |
| 38 | |
| 39 | These patterns are allowed without warning: |
| 40 | |
| 41 | - `rm -rf node_modules` / `.next` / `dist` / `__pycache__` / `.cache` / `build` / `.turbo` / `coverage` |
| 42 | |
| 43 | ## How it works |
| 44 | |
| 45 | The hook reads the command from the tool input JSON, checks it against the |
| 46 | patterns above, and returns `permissionDecision: "ask"` with a warning message |
| 47 | if a match is found. You can always override the warning and proceed. |
| 48 | |
| 49 | To deactivate, end the conversation or start a new one. Hooks are session-scoped. |