-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.universal.yaml
More file actions
81 lines (66 loc) · 2.56 KB
/
plugin.universal.yaml
File metadata and controls
81 lines (66 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# example/plugin.universal.yaml — minimal hookbridge example
# Compile with: hookbridge compile
meta:
name: my-plugin
version: "1.0.0"
description: "My plugin for Claude Code and Codex"
author: "Your Name"
homepage: "https://github.com/yourname/my-plugin"
repository: "https://github.com/yourname/my-plugin"
license: "MIT"
keywords: ["tag1", "tag2"]
platforms: [claude-code, codex]
hooks:
# Run on session start (both platforms)
- event: SessionStart
command: "node {PLUGIN_ROOT}/hooks/session-start.js"
platforms: [claude-code, codex]
# Run when user submits a prompt (both platforms)
- event: UserPromptSubmit
command: "node {PLUGIN_ROOT}/hooks/on-prompt.js"
platforms: [claude-code, codex]
# Track file edits — Claude Code native, Codex: approximated via transcript analysis
- event: PostToolUse
matcher: "Edit|Write"
command: "node {PLUGIN_ROOT}/hooks/track-edits.js"
platforms: [claude-code]
# Run on session stop (both platforms)
- event: Stop
command: "node {PLUGIN_ROOT}/hooks/on-stop.js"
platforms: [claude-code, codex]
# --- New Claude Code events (v2) ---
# Re-inject context after compaction (Claude Code only — Codex: hard-limit)
- event: PostCompact
command: "node {PLUGIN_ROOT}/hooks/reinject-context.js"
platforms: [claude-code]
# Desktop notification when Claude needs input (Claude Code only — Codex: hard-limit)
- event: Notification
command: "node {PLUGIN_ROOT}/hooks/desktop-notify.js"
platforms: [claude-code]
# Audit config changes (Claude Code only — Codex: hard-limit)
- event: ConfigChange
command: "node {PLUGIN_ROOT}/hooks/audit-config.js"
platforms: [claude-code]
# --- New hook types (Claude Code only) ---
# HTTP hook — POST event data to an audit endpoint (Claude Code only — Codex: hard-limit)
- event: PostToolUse
type: http
url: "https://audit.example.com/tool-use"
platforms: [claude-code]
# Prompt hook — LLM evaluates whether all tasks are done (Claude Code only — Codex: hard-limit)
- event: Stop
type: prompt
prompt: "Check if all tasks the user requested are complete. Return {\"ok\": true} if done, or {\"ok\": false, \"reason\": \"what remains\"} if not."
platforms: [claude-code]
skills:
- path: skills/
recursive: true
extensions:
claude-code:
env_var: MY_PLUGIN_ROOT
description: "My plugin for Claude Code"
codex:
install_path: "$HOME/.codex/{meta.name}"
description: "My plugin for Codex"
display_name: "My Plugin"
short_description: "One-liner shown in Codex UI"