docs/ja-JP/skills/safety-guard/SKILL.md
本番システムでの作業時や、エージェントを自律的に実行する際に破壊的な操作を防ぐためにこのスキルを使用してください。
npx skillsauth add affaan-m/everything-claude-code safety-guardInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
3つの保護モードがあります:
実行前に破壊的なコマンドを検知して警告します:
監視するパターン:
- rm -rf(特に /、~、またはプロジェクトルート)
- git push --force
- git reset --hard
- git checkout .(全変更を破棄)
- DROP TABLE / DROP DATABASE
- docker system prune
- kubectl delete
- chmod 777
- sudo rm
- npm publish(誤公開)
- --no-verify を含む全コマンド
検知した場合: コマンドの内容を示し、確認を求め、より安全な代替手段を提示します。
特定のディレクトリツリーへのファイル編集をロックします:
/safety-guard freeze src/components/
src/components/ 外への Write/Edit は説明付きでブロックされます。エージェントを特定の領域に集中させ、無関係なコードに触れないようにしたい場合に便利です。
両方の保護が有効になります。自律エージェントのための最大安全モードです。
/safety-guard guard --dir src/api/ --allow-read-all
エージェントはすべてを読み取れますが、src/api/ にのみ書き込めます。破壊的なコマンドはどこでもブロックされます。
/safety-guard off
PreToolUse フックを使用して Bash、Write、Edit、MultiEdit ツールの呼び出しを検知します。実行前に、アクティブなルールに対してコマンド/パスを確認します。
codex -a never セッションでデフォルトで有効化する~/.claude/safety-guard.log に記録するdata-ai
Design task-local harnesses, eval gates, and reusable skill extraction for Claude dynamic workflow mode and other adaptive agent harnesses.
development
React component testing with React Testing Library, Vitest/Jest, MSW for network mocking, accessibility assertions with axe, and the decision boundary between component tests and Playwright/Cypress end-to-end runs. Use when writing or fixing tests for React components, hooks, or pages.
tools
React and Next.js performance optimization patterns adapted from Vercel Engineering's React Best Practices (https://github.com/vercel-labs/agent-skills). Organizes 70+ rules across 8 priority categories — waterfalls, bundle size, server-side, client fetching, re-render, rendering, JS micro-perf, advanced. Use when writing, reviewing, or refactoring React/Next.js code for performance.
tools
React 18/19 patterns including hooks discipline, server/client component boundaries, Suspense + error boundaries, form actions, data fetching, state management decision trees, and accessibility-first composition. Use when writing or reviewing React components.