Skip to content

jev-agent-hooks

Hooks for Claude Code, Codex and pi that use Jev to suggest a skill each turn, plus a rule gate for subagent model routing.

HookbetaMIT

Overview

jev-agent-hooks puts Jev into a coding agent's loop to pick which skill to load for a turn, with one shared implementation for Claude Code, Codex and pi. The skill-suggestion hook runs on every user prompt following TypeSafe's skill-suggestion cookbook. It makes two requests: a Choice over the whole skill roster (descriptions as criteria) plus three Nouls asking whether the turn wants an action at all, then a Choice over the top three with 700 characters of each SKILL.md and a per-candidate Noul asking whether that skill does what was asked. If the best fit clears 0.7, it injects one line naming the skill, which the agent may ignore.

Each host builds its own roster from its skill directories and plugins. A separate rule gate, which does not call Jev, runs before subagents start: it denies subagents without an explicit model alias, with a disallowed or concrete model id, or with a mismatched preset, and scans Workflow scripts for literal models. Every hook fails open on Jev outages, missing keys or bad responses. It is MIT licensed.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich skill in the roster best fits this turn?—
Yes / noDoes this turn want an action at all?yes · no
Yes / noDoes this skill do the thing that was asked?yes · no

How it works

  1. User prompt triggers the hook
  2. Choice over all skills plus action Nouls
  3. Choice over top 3 with SKILL.md excerpts plus fit Nouls
  4. If best fit >= 0.7, inject a one-line suggestion
  5. Separate rule gate validates subagent models

Strengths

  • Same implementation across three agents
  • Fails open, never blocking a turn on errors
  • Two-stage narrowing keeps requests small

Caveats

  • Suggestion only; agent may ignore it
  • Subagent gate encodes specific model aliases

At a glance

Type
Hook
Status
beta
Language
JavaScript
Runtime
agent hooks (Claude Code, Codex, pi)
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • TypeSafe Jev hooks for Claude Code, Codex and pi: per-turn skill suggestion and subagent model routing

    logicrw/awesome-jev-projects
  • TypeSafe Jev hooks for Claude Code, Codex and pi: per-turn skill suggestion and subagent model routing.

    hellogumbo/awesome-jev

Frequently asked questions

What does Jev decide here?

Which skill, if any, fits the current turn, using a two-stage Choice with Noul checks.

Does subagent routing use Jev?

No. It is a deterministic rule gate shipped alongside.

What happens if Jev is down?

Every hook fails open and lets the turn through.

Related projects

  • Orchestrator that probes which coding agents are installed and logged in, then has Jev pick the best one for a task.

    Agent skillbetaPython
  • Chooses the model tier, skills and MCP servers for each coding-agent session with two Jev requests, then launches Claude Code or Codex.

    MCP serverbetaPython
  • Claude Code plugin that asks Jev before each turn for reasoning effort, subagent model, strategy and skill, with a decision log.

    Agent skillbetaTypeScript
  • Experimental plugin wiring Jev into coding-agent harnesses to pick skills, tools, models and browser moves, starting with OpenCode.

    Agent skillprototypeTypeScript
  • Per-turn router: one ~350 ms Jev call picks model tier, effort, tools and skill, with a hard deadline and regex fallback.

    Agent skillbetaTypeScript
  • Per-prompt capability router for coding agents that picks at most one installed skill, MCP server, subagent or command via Jev, or none.

    MCP serverbetaTypeScript