@tank/hook-creator

Create Tank hook atoms that intercept agent lifecycle events.

1|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/tankpkg/packages --skill tank-hook-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: @tank/hook-creator
Source: https://github.com/tankpkg/packages/tree/main/skills/hook-creator
Command: npx skills add https://github.com/tankpkg/packages --skill tank-hook-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design Tank hook atoms that intercept agent lifecycle events with clear safety rules, portable logic, and correct manifest wiring. It removes the guesswork from choosing the right event, deciding between DSL and JavaScript handlers, and building production-ready guardrails for agents.

Core Features & Use Cases

  • Canonical event selection: Choose from the standard Tank hook events for command gating, file watching, session bootstrap, stop checks, permissions, and subagent control.
  • Handler guidance: Use DSL for simple allow, block, rewrite, and context injection rules, or switch to JS when you need shell commands, parsing, delegation, or stateful behavior.
  • Production patterns: Learn how to wire hook atoms in tank.json, attach companion agents, and apply tested patterns such as pre-stop quality gates, safety gates, and session-start context injectors.
  • Reference-backed workflow: Use the included reference guides to map events, compare handler types, and follow worked examples for real deployment scenarios.

Quick Start

Ask me to create a Tank hook for your target lifecycle event, and I will draft the manifest wiring, handler choice, and supporting logic in one pass.

Frequently Asked Questions about @tank/hook-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create agent lifecycle hooks for safety gates and context injection?

To create agent lifecycle hooks, you define atoms that intercept events like command gating or session bootstrap, then wire them into the tank.json manifest. You can use DSL for simple rules or JavaScript handlers for stateful logic.

What is the difference between DSL and JavaScript handlers for agent hooks?

DSL handlers are best for simple allow, block, rewrite, and context injection rules, while JavaScript handlers are necessary when you need shell commands, parsing, delegation, or stateful behavior for your agent hooks.

How do I wire hook atoms into a tank.json manifest for production?

Wiring hook atoms into a tank.json manifest involves selecting canonical events, configuring blocking versus non-blocking behavior, and attaching companion agents for delegation to ensure production-ready agent guardrails.

When should I use blocking versus non-blocking behavior in agent lifecycle hooks?

Use blocking behavior in agent lifecycle hooks when you need safety gates or pre-stop quality checks that halt execution, and non-blocking behavior for file monitoring, context injection, and session bootstrap tasks.

Can I attach a companion agent to handle subagent control and delegation?

Yes, you can attach a companion agent to your hook atom to manage subagent control and delegation. This pattern is supported as an adapter-aware production technique within the tank.json manifest integration.