agent-hooks SKILL.md skillC
agent-hooks from starchild-ai-agent/official-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add starchild-ai-agent/official-skills/agent-hooks@v1.15.0Pins v1.15.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- C, 14 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- starchild-ai-agent/official-skills
- Path
agent-hooks/SKILL.md- Versions recorded
- 5
- Latest version
- v1.15.0, committed Jun 30, 2026
- First version recorded
- Jun 25, 2026
- Size
- 36,699 bytes
- Repository stars
- 32
- License
- none declared
Manage shell hooks — user scripts that run at agent lifecycle points to block, rewrite, or warn on actions, via the /hooks command.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Agent Hooks Shell hooks let a user run **their own script** at fixed points in the agent's lifecycle — to **block** a dangerous action, **rewrite** an input or an outbound message, **inject context** into the model, or **warn the user**. The script can be written in any language; it talks to the agent over a simple JSON-on-stdin, JSON-on-stdout protocol. Tools: `read_file`, `write_file`, `bash` ## When to use Reach for hooks when the user wants the agent to **automatically enforce a rule or react to an event** without being asked each time. Examples: - "Stop me from running `rm -rf` / destructive bash" → `pre_tool_call` block - "Never let a private key get pushed to Telegram" → `on_outbound_message` block - "Log every tool call for audit" → `post_tool_call` observe - "Remind the agent of X at the start of every model call" → `pre_llm_call` context - "Don't let the agent claim it published when it didn't" → `on_completion_claim` (in `/goal`) or `on_stop` (in normal chat) - "If the answer fails my quality check, make the agent redo it" → `on_stop` block If the user just wants a one-off check, that's not a hook — hooks are for **recurring, automatic** lifecycle enforcement. …
Read the whole file at its exact version.
How to install
mdr add starchild-ai-agent/official-skills/agent-hooks@sha256:238bf67a12dc8684The line at the top of this page pins the label v1.15.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_cftirip3utbh4yjh)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Jun 25, 2026 and Jun 30, 2026, about one every day.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.15.0 latest | 2026-06-30 | a63530b | 36,699 B | C | view · diff |
| v1.14.0 | 2026-06-30 | 43f6003 | 36,568 B | C | view · diff |
| v1.13.0 | 2026-06-30 | 5951d4f | 35,929 B | C | view · diff |
| v1.12.0 | 2026-06-30 | 7985336 | 35,929 B | C | view · diff |
| v1.12.0 | 2026-06-25 | d8ad1e1 | 34,786 B | C | view |
Audit of the latest version
- fail: No curl or wget piped into a shell (matched: curl | bash)
- fail: No instruction to read or print local credentials (matched: cat .env | curl`, `scp id_rsa)
- fail: No script tag (matched: <script)
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (36699 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No recursive delete of root, home or parent
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.
Source
starchild-ai-agent/official-skills · 32 stars · license none declared · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_cftirip3utbh4yjh GET https://markdownregistry.com/api/v1/resolve?ref=starchild-ai-agent/official-skills/agent-hooks GET https://markdownregistry.com/api/v1/blob/238bf67a12dc8684556b08dad689f5cb99386f4278104f5529dbcd26b65aa627
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.