workflow-completion-hooks

Register and fire per-workflow completion hooks with structured completionInfo.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/transreal/claudecode --skill workflow-completion-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow-completion-hooks
Source: https://github.com/transreal/claudecode/tree/main/Claude%20Directives/skills/workflow-completion-hooks
Command: npx skills add https://github.com/transreal/claudecode --skill workflow-completion-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you react to ClaudeOrchestrator Workflow completion without writing fragile polling loops or relying on timing assumptions.

Core Features & Use Cases

  • Event-driven completion notification: Register completion hooks for a workflow so you get a single, reliable callback when it reaches a final state.
  • Status-rich termination reporting: Receive Mode, Status, TerminationReason, timing, step count, and FinalMarking in a structured Association.
  • Safe execution semantics: Ensures one-time firing per workflow id, isolates hook exceptions, and supports Immediate firing when registering after completion.
  • Supports integration patterns: Enables completion-driven orchestration across multiple parallel workflows and adapter-based forwarding from shim layers.

Quick Start

Register a completion hook for your workflow id so your function is invoked automatically when the workflow ends, including whether it completed, failed, or was cancelled.

Frequently Asked Questions about workflow-completion-hooks

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

FAQPage Schema
How do I get notified when an async workflow finishes without polling?

You can use event-driven completion hooks to receive a reliable callback exactly when your workflow finishes. This requires registering a per-workflow hook function that fires automatically with status and timing data, eliminating the need for polling loops.

What completion details are returned when a workflow finishes?

When a workflow finishes, the hook fires with a completionInfo structure containing WorkflowId, Status, TerminationReason, Mode, ElapsedSec, Steps, FinalMarking, and EndTime. This structured data provides full context for downstream processing.

Can I register a completion hook after a workflow has already finished?

Yes, you can register a hook after completion. The system supports Immediate firing for hooks registered after a workflow reaches a final state, ensuring you still receive the completion callback without missing the event.

Does ClaudeOrchestrator support event-driven callbacks for parallel workflows?

Yes, ClaudeOrchestrator supports completion-driven orchestration across multiple parallel workflows. You can register hooks for each workflow id to coordinate downstream processing exactly when each parallel workflow finishes.

What happens if my registered hook function throws an exception?

Hook exceptions are isolated by the system to ensure safe execution semantics. This prevents your callback errors from disrupting the workflow completion process or interfering with other registered hooks.

How do I stop receiving completion callbacks for a specific workflow?

You need to unregister the per-workflow hook function. The system ensures one-time firing per workflow id, so unregistering after the hook fires prevents duplicate callbacks and cleans up the registry.