fvtt-hooks

Register and manage Foundry VTT hooks with Hooks.on, once, call, and callAll.

1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fvtt-hooks
Source: https://github.com/ImproperSubset/hh-agentics/tree/main/fvtt-dev/skills/fvtt-hooks
Command: npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps Foundry VTT module developers implement and debug hooks safely, ensuring proper registration, lifecycle order, and cleanup.

Core Features & Use Cases

  • Register persistent and one-time hooks using Hooks.on and Hooks.once.
  • Trigger hooks with Hooks.call and Hooks.callAll.
  • Debug hook execution order, cancellation behavior, and memory management across client sessions.
  • Understand and apply the Foundry VTT hook lifecycle: init → i18nInit → setup → ready.

Quick Start

Register a simple hook sequence to verify lifecycle:

  • Hooks.once("init", () => { console.log("Init complete"); });
  • Hooks.on("ready", () => { console.log("App ready"); });

Frequently Asked Questions about fvtt-hooks

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

FAQPage Schema
How do I register Foundry VTT hooks safely during module development?

To register Foundry VTT hooks safely, use Hooks.on for persistent events and Hooks.once for one-time lifecycle events. This ensures proper execution order and prevents memory leaks across client sessions.

What is the Foundry VTT hook lifecycle order for module initialization?

The Foundry VTT hook lifecycle order follows init → i18nInit → setup → ready. Registering hooks in this sequence ensures modules initialize correctly and avoids common lifecycle event pitfalls.

How do I debug Foundry VTT hook execution and cancellation behavior?

Debug Foundry VTT hook execution by tracking hook call order, cancellation behavior, and memory management. Analyze Hooks.call and Hooks.callAll outputs to identify registered hooks failing to trigger properly.

What is the difference between Hooks.on and Hooks.once in Foundry VTT?

Hooks.on registers persistent Foundry VTT hooks that trigger every time an event fires, while Hooks.once registers hooks that execute only a single time before automatic cleanup, ideal for initialization.

Why does my Foundry VTT module hook not trigger on client sessions?

Foundry VTT hooks fail to trigger across client sessions due to improper registration, lifecycle order issues, or missing cleanup. Verify Hooks.on placement within the init → ready lifecycle phases.

Do I need to manually clean up Foundry VTT hooks to prevent memory leaks?

Manual cleanup of Foundry VTT hooks prevents memory management issues across client sessions. Unregister persistent Hooks.on events when modules are disabled to ensure safe lifecycle execution.