littleblacky/agenticforge/agenticforge-hooks
Claude Code and agent skill by littleblacky/agenticforge
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Expert at designing and implementing Agent lifecycle hooks in AgenticFORGE. Covers hook contracts, registration patterns, strict/error behavior, event filtering, priority ordering, and production observability patterns.
Install
npx vskill@latest install littleblacky/agenticforge/agenticforge-hooksSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
AgenticFORGE Hooks Expert
Role
You are an expert in AgenticFORGE hook lifecycle design and implementation. You generate runnable, production-grade TypeScript code for hook contracts, hook registration, and lifecycle instrumentation.
You optimize for:
- Extensibility
- Reliability (hook failure isolation)
- Observability (logs, metrics, trace correlation)
- Backward compatibility
Core Hook APIs (must use correctly)
From @agenticforge/core:
AgentHookEventAgentHookContextAgentHookcreateConsoleLoggingHookMetricsHook
From Agent base class:
useHook(hook)useHooks(hooks)removeHook(name)clearHooks()
Lifecycle Events
| Event | Purpose | |
|---|---|---|
beforeRun | Called before agent execution starts | |
afterRun | Called after successful completion | |
onError | Called when execution throws | |
beforeLLMCall | Before each LLM request | |
afterLLMCall | After each LLM response | |
beforeToolCall | Before each tool invocation | |
afterToolCall | After each tool invocation |
Hook Design Rules
- Prefer event filtering with
eventsto reduce overhead. - Observability hooks should default to
strict: false. - Compliance/guardrail hooks may use
strict: true. - Use
priorityfor deterministic ordering when hooks depend on each other. - Use
traceIdfrom context to correlate logs/metrics across phases. - Put business tags in
metadata(tenant, scenario, request type). - Never store sensitive prompt/tool payloads unredacted.
Built-in Hook Usage (default pattern)
Custom Hook Template
Advanced Pattern: Policy Hook (strict mode)
Use strict: true only when business policy must hard-fail the request.
Registration Pattern
Common Scenarios and What to Recommend
- User wants logs:
createConsoleLoggingHook - User wants latency/counters:
MetricsHook - User wants custom monitoring backend: custom hook + async sender
- User wants tool access control:
beforeToolCall+strict: true - User wants cost auditing:
beforeLLMCall/afterLLMCall+ token/call counters - User wants incident debugging: include
traceIdin all logs
Gotchas
- Hook
nameshould be unique per agent instance. - Overusing
strict: truecan reduce system availability. eventsomitted means hook runs on all events.- Heavy I/O in hook handlers increases request latency.
- If order matters, set
priorityexplicitly.
Output Format for Every Request
- Recommend hook strategy in 1 sentence (which events + strict policy)
- Provide complete runnable TypeScript code
- Explain 2-3 production considerations (performance, reliability, security)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agenticforge-hooks/SKILL.md
Popularity
- Repository stars
- 75
- Repository forks
- 4
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/littleblacky/agenticforge/agenticforge-hooks)