Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/monoes/monomindnpx agentmods add skills/monoes/monomind/hooks-automationWrote 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/monoes/monomind/hooks-automation)<a href="https://agentmods.dev/skills/monoes/monomind/hooks-automation"><img src="https://agentmods.dev/badge/skills/monoes/monomind/hooks-automation/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/monoes/monomind/hooks-automation"><img src="https://agentmods.dev/badge/skills/monoes/monomind/hooks-automation.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.00038 | $0.04291 |
| Opus 5.5 | $0.00015 | $0.01716 |
| Sonnet 5.5 | $0.00008 | $0.00858 |
| Haiku 4.5 | $0.00004 | $0.00429 |
Grade D, and why
hooks-automation scanned grade D with 2 findings 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 2d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
(The generated commands also walk up the directory tree to find `.claude/helpers`; the version above is simplified.) Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
npx monomind hooks pre-command -c "rm -rf ./build" How it starts
The opening of the file, as written. The whole thing — 497 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hooks Automation
Coordinate, validate, and learn from Claude Code operations through the monomind hooks command group and the hook handlers that monomind init installs into .claude/settings.json.
What This Skill Does
The hooks system records what happens during a session (edits, commands, tasks) and uses that history to suggest agents, assess command risk, and persist session state. It enables:
- Pre-operation hooks: context and agent suggestions before an edit, risk assessment before a command, agent suggestions before a task
- Post-operation hooks: record edit, command, and task outcomes in local logs that routing statistics read
- Session management: persist state at session end and restore it later
- Routing: route a task to the best agent (or model) and explain the decision
- Pattern store: log trajectories and search stored patterns (
hooks intelligence);hooks pretrainscans the repository (file types, import lines) into the memory store and local pattern log — no model is trained - Background workers: run
@monoes/hooksworkers in-process
Prerequisites
Required:
- Monomind CLI (
npm install -g monomind@latest, or usenpx monomind) - Claude Code with hooks enabled in
.claude/settings.json
Optional:
- Git repository (for the Git hook examples)
- A test framework (for quality gates)
Quick Start
Initialize Hooks
# Write the hooks configuration into .claude/settings.json
npx monomind init hooks
# Only the essential hooks
npx monomind init hooks --minimal
This wires Claude Code's PreToolUse, PostToolUse, and session events to the helper .claude/helpers/hook-handler.cjs (installed by monomind init), which handles pre-bash, pre-search (Grep/Glob), pre-agent, post-edit, session-restore, session-end, and related events.
Basic Hook Usage
# Record task start and get agent suggestions
npx monomind hooks pre-task --description "Implement authentication"
# Record an edit outcome
npx monomind hooks post-edit --file "src/auth.js" --success true
# End the session and persist state
npx monomind hooks session-end
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.
- 2d ago First seen · 497 lines · 38 tokens per session scan D 56b776a7e9d6
hooks-automation is a skill published in the GitHub repository monoes/monomind (23 stars, last pushed 2d ago), licensed Apache-2.0. It adds 38 tokens to every session and 4,291 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.
Other skills, from other repositories
agent-user-tools
Agent skill for user-tools - invoke with $agent-user-tools.
mailbox
A guide for performing email and mailbox tasks through the QwenPaw mailbox system. It covers supported personal email providers, credentials, configuration, and the required mailbox workflow.
channel_message
Use this skill to proactively send a one-way message to a user/session/channel, usually only when the user explicitly asks to send to a channel/session or when proactive notification is needed. First query sessions with qwenpaw chats list, then push with qwenpaw channels send.
mission-slice-sop
Use when starting, building, handing off, restoring, or closing a mission or slice under the default lightweight SDLC.
oma-recap
Summarize AI conversation histories for a specified date or period. Use for daily work recaps and cross-tool activity summaries.
todos
Handle the agent personal todos.md file.