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 ayushcodes10/echo-mem --skill hooks-automationgit clone --depth 1 https://github.com/ayushcodes10/echo-memWrote 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/ayushcodes10/echo-mem/hooks-automation)<a href="https://agentmods.dev/skills/ayushcodes10/echo-mem/hooks-automation"><img src="https://agentmods.dev/badge/skills/ayushcodes10/echo-mem/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/ayushcodes10/echo-mem/hooks-automation"><img src="https://agentmods.dev/badge/skills/ayushcodes10/echo-mem/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.00046 | $0.07561 |
| Opus 5.5 | $0.00018 | $0.03024 |
| Sonnet 5.5 | $0.00009 | $0.01512 |
| Haiku 4.5 | $0.00005 | $0.00756 |
Grade C, and why
Hooks Automation 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 1mo 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.
npx Codex-flow hook pre-bash -c "rm -rf /tmp/cache" This is a copy
100% identical to Hooks Automation — 244 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 1,202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hooks Automation
Intelligent automation system that coordinates, validates, and learns from Codex operations through hooks integrated with MCP tools and neural pattern training.
What This Skill Does
This skill provides a comprehensive hook system that automatically manages development operations, coordinates swarm agents, maintains session state, and continuously learns from coding patterns. It enables automated agent assignment, code formatting, performance tracking, and cross-session memory persistence.
Key Capabilities:
- Pre-Operation Hooks: Validate, prepare, and auto-assign agents before operations
- Post-Operation Hooks: Format, analyze, and train patterns after operations
- Session Management: Persist state, restore context, generate summaries
- Memory Coordination: Synchronize knowledge across swarm agents
- Git Integration: Automated commit hooks with quality verification
- Neural Training: Continuous learning from successful patterns
- MCP Integration: Seamless coordination with swarm tools
Prerequisites
Required:
- Codex Flow CLI installed (
npm install -g Codex-flow@alpha) - Codex with hooks enabled
.Codex/settings.jsonwith hook configurations
Optional:
- MCP servers configured (Codex-flow, ruv-swarm, flow-nexus)
- Git repository for version control
- Testing framework for quality verification
Quick Start
Initialize Hooks System
# Initialize with default hooks configuration
npx Codex-flow init --hooks
This creates:
.Codex/settings.jsonwith pre-configured hooks- Hook command documentation in
.Codex/commands/hooks/ - Default hook handlers for common operations
Basic Hook Usage
# Pre-task hook (auto-spawns agents)
npx Codex-flow hook pre-task --description "Implement authentication"
# Post-edit hook (auto-formats and stores in memory)
npx Codex-flow hook post-edit --file "src/auth.js" --memory-key "auth/login"
# Session end hook (saves state and metrics)
npx Codex-flow hook session-end --session-id "dev-session" --export-metrics
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.
- 1mo ago Changed 5e045782bcfa
- 1mo ago First seen · 1,202 lines · 46 tokens per session scan C 748868e06e46
Hooks Automation is a skill published in the GitHub repository ayushcodes10/echo-mem (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 46 tokens to every session and 7,561 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). It is 100% identical to Hooks Automation, differing in 244 lines, and is treated as a copy.
Other skills, from other repositories
end
Close a work session — log what happened, update state and the decision log, propose durable memory updates, and check for uncommitted or unpushed work.
commit-history
List recent git commits linked to agent sessions, optionally filtered by branch or repo. Use when the user asks "show agent commits", "what has the agent shipped", "list linked commits", or wants commits with their session context.
git-ops
Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving. Push reaches only the bare replica; prod-triggering tags are refused.
github-ops
GitHub CLI for issues, PRs, code search, CI logs, releases, and API queries. Requires gh CLI and auth.
memorix-git-memory
Use when the task depends on commit history, what changed, when a fix shipped, or linking engineering evidence to reasoning memory.
pre-pr
Prepare a Honcho change for a pull request to plastic-labs/honcho. Invoke before opening a PR, when drafting a PR body, when asked if a branch is PR-ready, or when filling the pull request template. Checks the linked issue, required tests and docs, then writes Description / Proofs / Fixes.