AGENT SKILL

safety-guard

本番システムでの作業時や、エージェントを自律的に実行する際に破壊的な操作を防ぐためにこのスキルを使用してください。

License 许可
MIT
最近更新
2026-11-04
Stars
★ 2
Forks
0

01 前言 Front Matter

name
safety-guard
origin
ECC
description
本番システムでの作業時や、エージェントを自律的に実行する際に破壊的な操作を防ぐためにこのスキルを使用してください。

03 SKILL.md 正文

Safety Guard — 破壊的な操作の防止

使用するタイミング

  • 本番システムでの作業時
  • エージェントが自律的に動作している場合(フルオートモード)
  • 特定のディレクトリへの編集を制限したい場合
  • センシティブな操作時(マイグレーション、デプロイ、データ変更)

動作の仕組み

3つの保護モードがあります:

モード1: Careful モード

実行前に破壊的なコマンドを検知して警告します:

監視するパターン:
- 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 を含む全コマンド

検知した場合: コマンドの内容を示し、確認を求め、より安全な代替手段を提示します。

モード2: Freeze モード

特定のディレクトリツリーへのファイル編集をロックします:

/safety-guard freeze src/components/

src/components/ 外への Write/Edit は説明付きでブロックされます。エージェントを特定の領域に集中させ、無関係なコードに触れないようにしたい場合に便利です。

モード3: Guard モード(Careful + Freeze の組み合わせ)

両方の保護が有効になります。自律エージェントのための最大安全モードです。

/safety-guard guard --dir src/api/ --allow-read-all

エージェントはすべてを読み取れますが、src/api/ にのみ書き込めます。破壊的なコマンドはどこでもブロックされます。

ロック解除

/safety-guard off

実装

PreToolUse フックを使用して Bash、Write、Edit、MultiEdit ツールの呼び出しを検知します。実行前に、アクティブなルールに対してコマンド/パスを確認します。

統合

  • codex -a never セッションでデフォルトで有効化する
  • ECC 2.0 の可観測性リスクスコアリングと組み合わせる
  • ブロックされた全アクションを ~/.claude/safety-guard.log に記録する

04 同仓库更多 Skills

Cyrilthetecchieee
Cyrilthetecchieee/cyril-code-

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 2
Cyrilthetecchieee
Cyrilthetecchieee/cyril-code-

youtube-downloader

Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. Supports various quality settings (best, 1080p, 720p, 480p, 360p), multiple formats (mp4, webm, mkv), and audio-only downloads as MP3.

★ 2
Cyrilthetecchieee
Cyrilthetecchieee/cyril-code-

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

★ 2
Cyrilthetecchieee
Cyrilthetecchieee/cyril-code-

template-skill

Replace with description of the skill and when Claude should use it.

★ 2
Cyrilthetecchieee
Cyrilthetecchieee/cyril-code-

tailored-resume-generator

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

★ 2
Cyrilthetecchieee
Cyrilthetecchieee/cyril-code-

slack-gif-creator

Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like "make me a GIF for Slack of X doing Y".

★ 2