Expand description
ski hook — the hot path. Reads a hook event on stdin, decides which skills
to inject, writes the host’s injection contract on stdout.
Fail open is the contract. Any error — bad stdin, missing index, IO failure — results in an empty injection and exit 0, never a blocked prompt.
Output by host:
- Claude (
UserPromptSubmit):{hookSpecificOutput:{hookEventName, additionalContext}}, or nothing when there’s no injection. - opencode:
{skills:[...], inject:"..."}always (the TS adapter parses it).
Enums§
Functions§
- run
- Run the hook for
host. Always exits 0 (fail open); setSKI_DEBUG=1to see the swallowed error on stderr when injection silently stops.