Agent skill · security · affaan-m
gateguard
API、エージェント、およびLLMエンドポイントのアクセス制御と認可パターン。
Why this skill is useful
Provides a structured approach to access control and authorization patterns that the AI wouldn't reliably generate on its own.
What it needs
Requires gateguard-ai installed locally. About 5k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.
What this skill does
GateGuard — Fact-Forcing Pre-Action Gate A PreToolUse hook that forces Claude to investigate before editing. Instead of self-evaluation ("are you sure?"), it demands concrete facts. The act of investigation creates awareness that self-evaluation never did. When to Activate Working on any codebase where file edits affect multiple modules Projects with data files that have specific schemas or date formats Teams where AI-generated code must match existing patterns Any workflow where Claude tends to guess instead of investigating Core Concept LLM self-evaluation doesn't work. Ask "did you violate any policies?" and the answer is always "no." This is verified experimentally. But asking "list every file that imports this module" forces the LLM to run Grep and Read. The investigation itself creates context that changes the output. Three-stage gate: No competitor does all three. Most stop at deny. Evidence Two independent A/B tests, identical agents, same task: Task Gated Ungated Gap --- --- --- --- Analytics module 8.0/10 6.5/10 +1.5 Webhook validator 10.0/10 7.0/10 +3.0 Average 9.0 6.75 +2.25 Both agents produce code that runs and passes tests. The difference is design depth. Gate Types Edit / MultiEdit Gate (first edit per file) MultiEdit is handled identically — each file in the batch is gated individually. NotebookEdit は notebookpath への Edit として扱われます(同じクラス・チェック済みキー・クレジット・上限の規則。セル内容は読まないため常に完全な質問になり、コメントのみの通過はありません)。 質問内容は対象ファイルのクラスによって変わります(対象クラス別の質問を参照)。以下は code クラスの Edit ゲートの質問です。 Write Gate (first new file creation) 以下は code クラスの Write ゲートの質問です。 対象クラス別の質問 初回の Edit/Write ゲートは対象ファイルを分類し、最初に一致したクラスの質問を使います。分類にはプロジェクトルート(CLAUDEPROJECTDIR、次にペイロードの cwd、次にプロセスのディレクトリ)からの相対パスを使うため、~/work/tests/ のような場所にあるプロジェクトでも全ファイルが test になることはありません。先頭の .claude/worktrees/<name>/ は <root>/.claude/worktrees/<name>/.git が存在する場合にだけ取り除きます。Windows 形式のパスでは末尾のドット・空白と :stream 接尾辞を除いてから分類します(CLAUDE.md. や CLAUDE.md::$DATA は CLAUDE.md として扱います)。ルート外の対象は絶対パスで分類します。パスは小文字化・/ 区切りで、次の順に判定します。 1. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/gateguard