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.
npx skills add Jamkris/everything-gemini-code --skill hookify-rulesgit clone --depth 1 https://github.com/Jamkris/everything-gemini-codeWrote 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.
[](https://agentmods.dev/skills/jamkris/everything-gemini-code/hookify-rules)<a href="https://agentmods.dev/skills/jamkris/everything-gemini-code/hookify-rules"><img src="https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/hookify-rules/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.
<a href="https://agentmods.dev/skills/jamkris/everything-gemini-code/hookify-rules"><img src="https://agentmods.dev/badge/skills/jamkris/everything-gemini-code/hookify-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00047 | $0.00943 |
| Opus 5.5 | $0.00019 | $0.00377 |
| Sonnet 5.5 | $0.00009 | $0.00189 |
| Haiku 4.5 | $0.00005 | $0.00094 |
Grade C, and why
hookify-rules 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.
- **Too specific**: `rm -rf /tmp` — use `rm\s+-rf` Copies of this mod
4 near-identical copies found in the catalogue:
- hookify-rules — 88% identical, 18 lines differ
- hookify-rules — 88% identical, 18 lines differ
- hookify-rules — 88% identical, 18 lines differ
- hookify-rules — 88% identical, 18 lines differ
How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Hookify Rules
Overview
Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in .gemini/egc-hookify.{rule-name}.local.md files.
Rule File Format
Basic Structure
---
name: rule-identifier
enabled: true
event: bash|file|stop|prompt|all
pattern: regex-pattern-here
---
Message to show Gemini when this rule triggers.
Can include markdown formatting, warnings, suggestions, etc.
Frontmatter Fields
| Field | Required | Values | Description |
|---|---|---|---|
| name | Yes | kebab-case string | Unique identifier (verb-first: warn-, block-, require-*) |
| enabled | Yes | true/false | Toggle without deleting |
| event | Yes | bash/file/stop/prompt/all | Which hook event triggers this |
| action | No | warn/block | warn (default) shows message; block prevents operation |
| pattern | Yes* | regex string | Pattern to match (*or use conditions for complex rules) |
Advanced Format (Multiple Conditions)
---
name: warn-env-api-keys
enabled: true
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: new_text
operator: contains
pattern: API_KEY
---
You're adding an API key to a .env file. Ensure this file is in .gitignore!
Condition fields by event:
- bash:
command - file:
file_path,new_text,old_text,content - prompt:
user_prompt
Operators: regex_match, contains, equals, not_contains, starts_with, ends_with
All conditions must match for rule to trigger.
Event Type Guide
bash Events
Match Bash command patterns:
- Dangerous commands:
rm\s+-rf,dd\s+if=,mkfs - Privilege escalation:
sudo\s+,su\s+ - Permission issues:
chmod\s+777
file Events
Match Edit/Write/MultiEdit operations:
- Debug code:
console\.log\(,debugger - Security risks:
eval\(,innerHTML\s*= - Sensitive files:
\.env$,credentials,\.pem$
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.
- 2mo ago First seen · 129 lines · 47 tokens per session scan C 2a5a724e74e5
hookify-rules is a skill published in the GitHub repository Jamkris/everything-gemini-code (95 stars, last pushed 6mo ago), licensed MIT. It adds 47 tokens to every session and 943 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.
hookify-rules compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| hookify-rulesJamkris/everything-gemini-code | Skill | 95 | 6mo ago | MIT | C | 47 | Claude Code, Codex |
| redteamBaba01hacker666/gemini-redteam | Skill | 4 | 4mo ago | none | A | 23 | Claude Code, Codex |
| redteam-cmsBaba01hacker666/gemini-redteam | Skill | 4 | 4mo ago | none | A | 24 | Claude Code, Codex |
| redteam-exploit-validationBaba01hacker666/gemini-redteam | Skill | 4 | 4mo ago | none | A | 24 | Claude Code, Codex |
| redteam-reconBaba01hacker666/gemini-redteam | Skill | 4 | 4mo ago | none | A | 26 | Claude Code, Codex |
| redteam-reportingBaba01hacker666/gemini-redteam | Skill | 4 | 4mo ago | none | A | 22 | Claude Code, Codex |
| redteam-source-auditBaba01hacker666/gemini-redteam | Skill | 4 | 4mo ago | none | A | 25 | Claude Code, Codex |