gateguard

gateguard is a skill for Claude Code from ufy2024/AuC. It costs 58 tokens per session (1,337 once invoked), scanned C, original, MIT.

A pre-action check that pauses file edits and shell commands until the coding agent has gathered specific facts about the codebase, such as imports, data formats, or existing instructions.

In plain words
What is it for?
It helps investigate related files, schemas, date formats, and project conventions before retrying an edit, write, or shell command.
Why use it?
It reduces guesses before changes are made, especially when one edit can affect several parts of a project or must follow an existing data format.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event.

Good fit It helps investigate related files, schemas, date formats, and project conventions before retrying an edit, write, or shell command.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ufy2024/auc/gateguard
View source ↗ ufy2024/AuC
About the project

AuC is a Python framework for running a single AI agent with an asynchronous, pluggable reasoning loop, language-model adapters, permission levels, and observable events. It is used to build coding and conversational agents with tools, security checks, web interfaces, background jobs, evaluations, and isolated execution. The catalogue entries are skills for extending its agent workflow.

ufy2024/AuC · 1,067 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ufy2024/AuC --skill gateguard
Clone the repo
git clone --depth 1 https://github.com/ufy2024/AuC

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gateguard

README.md
[![agentmods](https://agentmods.dev/badge/skills/ufy2024/auc/gateguard/github.svg)](https://agentmods.dev/skills/ufy2024/auc/gateguard)
Your own site
<a href="https://agentmods.dev/skills/ufy2024/auc/gateguard"><img src="https://agentmods.dev/badge/skills/ufy2024/auc/gateguard/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gateguard

Your own site · 80×15
<a href="https://agentmods.dev/skills/ufy2024/auc/gateguard"><img src="https://agentmods.dev/badge/skills/ufy2024/auc/gateguard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,337 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.01337
Opus 5.5 $0.00023 $0.00535
Sonnet 5.5 $0.00012 $0.00267
Haiku 4.5 $0.00006 $0.00134

Measured 2mo ago against content hash 4771557cb2bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

gateguard scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Triggers on: `rm -rf`, `git reset --hard`, `git push --force`, `drop table`, etc.
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • gateguard — 95% identical, 33 lines differ
auc/skill_library/bundled/gateguard/SKILL.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

1. DENY  — block the first Edit/Write/Bash attempt
2. FORCE — tell the model exactly which facts to gather
3. ALLOW — permit retry after facts are presented

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.

Before editing {file_path}, present these facts:

1. List ALL files that import/require this file (search the tree — Glob/Grep, or find/grep via Bash)
2. List the public functions/classes affected by this change
3. If this file reads/writes data files, show field names, structure,
   and date format (use redacted or synthetic values, not raw production data)
4. Quote the user's current instruction verbatim

Read the full file on GitHub · 155 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 155 lines · 58 tokens per session scan C 4771557cb2bf

Subscribe to this mod's changes

gateguard is a skill published in the GitHub repository ufy2024/AuC (1,067 stars, last pushed 4mo ago), licensed MIT. It adds 58 tokens to every session and 1,337 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

gateguard compared with skills from other repositories

gateguard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gateguardufy2024/AuCSkill1.1k4mo agoMITC58Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k4d agoMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9k2d agoApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill339todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
triaging-web-analytics-supportPostHog/posthogSkill41ktodaynoneA151Claude Code, Codex