AI Agent Hub
Back to plugins
⚙️

hooks-adapter

Workflow Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install JohnXu22786/hooks-adapter

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install JohnXu22786/hooks-adapter in your shell to install from https://github.com/JohnXu22786/hooks-adapter; once loaded, dsh will automatically discover and adapt hooks configs in project and user directories.

About this plugin

You spent an evening tuning PreToolUse interceptors in Claude Code, wrote a few PostToolUse callbacks for Codex, and then switched to DeepSeek Harness only to find none of those configs are recognized. hooks-adapter is the compatibility layer built for exactly that gap: it reads your existing hook declarations read-only—never migrating or rewriting them—and maps the event names from Claude, Codex, and opencode dialects onto dsh extension points, so the same config keeps working as-is.

At execution time it supports four handler kinds: shell commands, HTTP webhooks, LLM evaluation (oracle), and subagent delegation (proxy), each with its own timeout and failure-degradation policy. Multiple hooks fold deterministically under deny > ask > allow, context accumulates in declaration order, and a validate subcommand surfaces config issues before they ever hit a live run. Zero runtime dependencies beyond Node 18 keep the footprint minimal.

If you have already built hook-based workflows—blocking risky tool calls, injecting project context into prompts, gating output quality through an LLM judge, or delegating repetitive steps to a subagent—and you do not want to rewrite any of it for dsh, hooks-adapter is the shortest bridge between your existing setup and the new harness.

Use Cases

  • Reuse PreToolUse interceptors authored for Claude Code without rewriting them for dsh
  • Gate tool-call quality through an LLM oracle and share the same prompt config across Codex and dsh
  • Wire the same webhook approval callbacks into different harnesses instead of maintaining per-platform duplicates

Best For

  • Developers who have built hook-based workflows on Claude, Codex, or opencode
  • Platform engineers standardizing interception and approval policies across multiple agent harnesses
  • Researchers evaluating tool-call quality via LLM judges without duplicating config per runtime