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 agentmods add commands/primeline-ai/evolving-lite/create-hookgit clone --depth 1 https://github.com/primeline-ai/evolving-liteWhat 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 | $0.00006 | $0.00433 |
| Opus 5 | $0.00003 | $0.00217 |
| Sonnet 5 | $0.00001 | $0.00087 |
| Haiku 4.5 | $0.00001 | $0.00043 |
Grade A, and why
create-hook scanned grade A with 0 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Create a new hook that runs automatically on Claude Code events.
Input: $ARGUMENTS
If empty: "What should the hook do? Which event should trigger it?"
Available Events
| Event | When it fires | Common use |
|---|---|---|
| SessionStart | Session begins | Init, health checks |
| UserPromptSubmit | User sends a message | Input analysis, routing |
| PreToolUse | Before any tool runs | Validation, security |
| PostToolUse | After any tool runs | Logging, tracking |
| PreCompact | Before context compaction | Save important data |
| Stop | Session ends | Cleanup, summaries |
Process
- Name: kebab-case (e.g.,
my-validator) - Event: Which event triggers it
- Matcher: Which tools/patterns (e.g., "Bash" for PreToolUse, ".*" for all)
- Language: Python or Bash
- Write script to
${CLAUDE_PLUGIN_ROOT}/hooks/scripts/{name}.pyor.sh - Register in
${CLAUDE_PLUGIN_ROOT}/hooks/hooks.json
Template (Python)
#!/usr/bin/env python3
import json, sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent / "lib"))
from common import PLUGIN_ROOT, write_sentinel, read_hook_input
def main():
hook_input = read_hook_input()
# Your logic here
write_sentinel("{name}", "ok")
sys.exit(0)
if __name__ == "__main__":
main()
Important
- Every hook MUST call
write_sentinel()for health monitoring - Keep hooks under 200ms to avoid perceptible lag
- Use
sys.exit(0)for success,sys.exit(2)to block a tool call - Read input from stdin (JSON from Claude Code)
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 · 57 lines · 6 tokens per session scan A b4c45b7a6a43
create-hook is a command published in the GitHub repository primeline-ai/evolving-lite (48 stars, last pushed 15d ago), licensed MIT. It adds 6 tokens to every session and 433 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
deploy
Command "deploy" from PraveenJayaprakash-JP/repomemory, covering deployment workflow, 1. pre-deploy checks, 2. build verification, 3. environment validation and 4. deployment steps (platform detection).
review
Performs a structured code review on unstaged/staged changes (git diff) or a specified file/scope. Runs consistency checks against project conventions (CLAUDE.md) and outputs findings with severity levels.
test
Command "test" from PraveenJayaprakash-JP/repomemory, covering test command, steps, flags, zero test found and examples.
my_brand
Interactive brand identity creation with archetypes, colors, typography, and voice guidelines. Use when user mentions "brand", "colors", "typography", "brand.md", "design system", or "visual identity".
my_setup
Create optimized CLAUDE.md using project.md, brand.md, and codebase analysis. Use when user mentions "setup", "CLAUDE.md", "configure Claude", "claude code setup", or "technical docs".
my_commit
Create a well-formatted commit following project conventions (auto-detects Conventional Commits, Gitmoji, or Simple style).