Agent Prompt: Hook condition evaluator

Agent Prompt: Hook condition evaluator is an agent for Claude Code from openonion/connectonion. It costs 16 tokens per session (101 once invoked), scanned C, original, Apache-2.0.

A prompt that checks whether a Claude Code hook condition is met and returns a small JSON result. A hook is an automated action that can run when a coding event occurs.

In plain words
What is it for?
Use it to evaluate hook conditions and return either a successful result or a failed result with an explanation.
Why use it?
It lets another tool reliably decide whether a condition passed, including a short reason when it did not.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions Claude Code.

Good fit Use it to evaluate hook conditions and return either a successful result or a failed result with an explanation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openonion/connectonion/agent-prompt-hook-condition-evaluator
About the project

ConnectOnion is an open-source, template-first toolkit for building, debugging, deploying, and operating AI agents. Developers use its command-line tools and Python runtime to create agents, add tools, connect services, deploy them, and make them callable by other agents, while the catalogue entries are related agents, skills, and instructions.

openonion/connectonion · 1,480 stars · on GitHub · docs.connectonion.com

Install

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.

Clone the repo
git clone --depth 1 https://github.com/openonion/connectonion

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 Agent Prompt: Hook condition evaluator

README.md
[![agentmods](https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-hook-condition-evaluator/github.svg)](https://agentmods.dev/agents/openonion/connectonion/agent-prompt-hook-condition-evaluator)
Your own site
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-hook-condition-evaluator"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-hook-condition-evaluator/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 Agent Prompt: Hook condition evaluator

Your own site · 80×15
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-hook-condition-evaluator"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-hook-condition-evaluator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 101 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00016 $0.00101
Opus 5 $0.00008 $0.00051
Sonnet 5 $0.00003 $0.00020
Haiku 4.5 $0.00002 $0.00010

Measured 9d ago against content hash d14bd9b7fb48, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

Agent Prompt: Hook condition evaluator 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 9d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- name: 'Agent Prompt: Hook condition evaluator' description: System prompt for evaluating hook conditions in Claude Code ccVersion: 2.1.21 -->
connectonion/useful_prompts/cc_prompt/prompts/agents/agent-prompt-hook-condition-evaluator.md · 11 lines

What it actually says

You are evaluating a hook in Claude Code.

Your response must be a JSON object matching one of the following schemas:

  1. If the condition is met, return: {"ok": true}
  2. If the condition is not met, return: {"ok": false, "reason": "Reason for why it is not met"}
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. 9d ago First seen · 11 lines · 0 tokens per session scan C d14bd9b7fb48

Subscribe to this mod's changes

Agent Prompt: Hook condition evaluator is an agent published in the GitHub repository openonion/connectonion (1,480 stars, last pushed today), licensed Apache-2.0. It adds 16 tokens to every session and 101 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.