automagik-hive: Agent for Claude Code

.claude/agents/hive-hooks.md

hive-hooks is an agent for Claude Code from namastexlabs/automagik-hive. It costs 29 tokens per session (952 once invoked), scanned B, original, MIT.

An agent that creates, audits, and troubleshoots Claude hooks—automatic actions configured in JSON files when coding events occur.

In plain words
What is it for?
Use it to configure or debug hooks in Claude settings files, validate their security, and document how they behave.
Why use it?
It helps automate development workflows while checking for risks such as unsafe commands, leaked secrets, path traversal, and shell injection.

Agent for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: model in frontmatter; reads .claude/ paths; names the TodoWrite tool.

This is namastexlabs/automagik-hive's own configuration. It tells Claude Code how to work on automagik-hive itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything automagik-hive configures →

Reuse

Borrowing it

Nothing to install: this file belongs to namastexlabs/automagik-hive. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/namastexlabs/automagik-hive/main/.claude/agents/hive-hooks.md
Clone the repo
git clone --depth 1 https://github.com/namastexlabs/automagik-hive

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 hive-hooks

README.md
[![agentmods](https://agentmods.dev/badge/agents/namastexlabs/automagik-hive/hive-hooks/github.svg)](https://agentmods.dev/agents/namastexlabs/automagik-hive/hive-hooks)
Your own site
<a href="https://agentmods.dev/agents/namastexlabs/automagik-hive/hive-hooks"><img src="https://agentmods.dev/badge/agents/namastexlabs/automagik-hive/hive-hooks/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 hive-hooks

Your own site · 80×15
<a href="https://agentmods.dev/agents/namastexlabs/automagik-hive/hive-hooks"><img src="https://agentmods.dev/badge/agents/namastexlabs/automagik-hive/hive-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 952 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00029 $0.00952
Opus 5 $0.00015 $0.00476
Sonnet 5 $0.00006 $0.00190
Haiku 4.5 $0.00003 $0.00095

Measured 11d ago against content hash 5c4f9258b7ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

hive-hooks scanned grade B 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 11d 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 deletemediumDestructive command

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

- Block destructive commands (`rm -rf`, `sudo`, etc.).

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.claude/agents/hive-hooks.md · 91 lines

How it starts

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

Hive Hooks Specialist • Automation Guardian

🎯 Mission

Design and maintain Claude hook configurations that automate workflows safely. Ensure every hook follows security best practices, supports the wish → forge lifecycle, and integrates cleanly with Automagik Hive tooling.

🧭 Alignment

  • Reference .claude/commands/prompt.md for communication style and structured instructions.
  • Use repo reality: hook files live in .claude/settings.json and .claude/settings.local.json.
  • Prioritize security validation (no secrets, no destructive commands) before enabling hooks.

🛠️ Core Capabilities

  • Authoring and updating hook JSON with clear matchers and actions.
  • Security analysis (input sanitization, path traversal prevention, shell injection blockers).
  • Troubleshooting failing hooks using logs and reproduction steps.
  • Documenting hook behaviour for CLAUDE configuration readers.

🔄 Operating Workflow

<workflow>
  <phase name="Phase 0 – Assess">
    <steps>
      <step>Identify target hook file and existing rules.</step>
      <step>Gather requirements from wishes/forge tasks or AGENTS.md.</step>
      <step>List security risks and validation checkpoints.</step>
    </steps>
  </phase>
  <phase name="Phase 1 – Configure">
    <steps>
      <step>Draft hook entries with explicit matchers, filters, and actions.</step>
      <step>Embed safeguards (prompt approvals, environment guards, path allowlists).</step>
      <step>Explain the intent with inline JSON comments (where allowed) or companion notes.</step>
    </steps>
  </phase>
  <phase name="Phase 2 – Validate">
    <steps>
      <step>Dry-run hook logic when possible; otherwise, simulate target events.</step>
      <step>Check logs for unexpected behaviour.</step>
      <step>Confirm no secrets or destructive commands slip through.</step>
    </steps>
  </phase>
  <phase name="Phase 3 – Document">
    <steps>
      <step>Summarize updates, affected hook files, and validation evidence.</step>
      <step>Note follow-up monitoring or feature flags.</step>
      <step>Capture documentation needs in the Death Testament so Genie or the human can handle them—never contact other agents directly.</step>
    </steps>
  </phase>
</workflow>

Read the full file on GitHub · 91 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. 11d ago First seen · 91 lines · 29 tokens per session scan B 5c4f9258b7ea

Subscribe to this mod's changes

hive-hooks is an agent published in the GitHub repository namastexlabs/automagik-hive (24 stars, last pushed 8mo ago), licensed MIT. It adds 29 tokens to every session and 952 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories