aiblueprint-cli 1.4.99 → 1.4.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents-config/skills/agents-manager/SKILL.md +2 -2
- package/agents-config/skills/agents-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/agents-manager/assets/codex-icon.svg +20 -0
- package/agents-config/skills/apex/SKILL.md +120 -118
- package/agents-config/skills/apex/agents/openai.yaml +10 -0
- package/agents-config/skills/apex/assets/codex-icon.svg +15 -0
- package/agents-config/skills/apex/scripts/apex-state.py +740 -0
- package/agents-config/skills/apex/scripts/setup-templates.sh +27 -145
- package/agents-config/skills/apex/scripts/test_apex_state.py +413 -0
- package/agents-config/skills/apex/scripts/update-progress.sh +17 -73
- package/agents-config/skills/apex/steps/step-00-init.md +85 -231
- package/agents-config/skills/apex/steps/step-00b-branch.md +10 -118
- package/agents-config/skills/apex/steps/step-00b-economy.md +12 -239
- package/agents-config/skills/apex/steps/step-00b-interactive.md +13 -162
- package/agents-config/skills/apex/steps/step-00b-save.md +13 -114
- package/agents-config/skills/apex/steps/step-01-analyze.md +40 -361
- package/agents-config/skills/apex/steps/step-02-plan.md +55 -562
- package/agents-config/skills/apex/steps/step-02b-tasks.md +15 -291
- package/agents-config/skills/apex/steps/step-03-execute-teams.md +47 -267
- package/agents-config/skills/apex/steps/step-03-execute.md +32 -212
- package/agents-config/skills/apex/steps/step-04-validate.md +42 -246
- package/agents-config/skills/apex/steps/step-05-examine.md +47 -371
- package/agents-config/skills/apex/steps/step-06-resolve.md +19 -221
- package/agents-config/skills/apex/steps/step-07-tests.md +19 -234
- package/agents-config/skills/apex/steps/step-08-run-tests.md +13 -300
- package/agents-config/skills/apex/steps/step-09-finish.md +36 -200
- package/agents-config/skills/apex/steps/step-10-verify.md +46 -264
- package/agents-config/skills/appstore-connect/agents/openai.yaml +7 -0
- package/agents-config/skills/appstore-connect/assets/codex-icon.svg +17 -0
- package/agents-config/skills/commit/agents/openai.yaml +10 -0
- package/agents-config/skills/commit/assets/codex-icon.svg +17 -0
- package/agents-config/skills/create-pr/agents/openai.yaml +10 -0
- package/agents-config/skills/create-pr/assets/codex-icon.svg +17 -0
- package/agents-config/skills/environments-manager/SKILL.md +1 -1
- package/agents-config/skills/environments-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/environments-manager/assets/codex-icon.svg +16 -0
- package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +19 -3
- package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +1 -1
- package/agents-config/skills/environments-manager/references/claude.md +1 -1
- package/agents-config/skills/fix-pr-comments/agents/openai.yaml +10 -0
- package/agents-config/skills/fix-pr-comments/assets/codex-icon.svg +17 -0
- package/agents-config/skills/grill-me/SKILL.md +25 -4
- package/agents-config/skills/grill-me/agents/openai.yaml +8 -0
- package/agents-config/skills/grill-me/assets/codex-icon.svg +16 -0
- package/agents-config/skills/hooks-manager/SKILL.md +19 -9
- package/agents-config/skills/hooks-manager/assets/codex-icon.svg +15 -4
- package/agents-config/skills/hooks-manager/references/claude-code.md +32 -0
- package/agents-config/skills/hooks-manager/references/codex.md +23 -0
- package/agents-config/skills/hooks-manager/references/cursor.md +18 -0
- package/agents-config/skills/hooks-manager/references/hook-types.md +5 -3
- package/agents-config/skills/hooks-manager/references/input-output-schemas.md +2 -2
- package/agents-config/skills/hooks-manager/references/research-sources.md +25 -0
- package/agents-config/skills/hooks-manager/references/router.md +32 -0
- package/agents-config/skills/hooks-manager/references/troubleshooting.md +3 -3
- package/agents-config/skills/merge/agents/openai.yaml +10 -0
- package/agents-config/skills/merge/assets/codex-icon.svg +17 -0
- package/agents-config/skills/oneshot/SKILL.md +4 -0
- package/agents-config/skills/oneshot/agents/openai.yaml +10 -0
- package/agents-config/skills/oneshot/assets/codex-icon.svg +18 -0
- package/agents-config/skills/prompt-creator/agents/openai.yaml +7 -0
- package/agents-config/skills/prompt-creator/assets/codex-icon.svg +16 -0
- package/agents-config/skills/rules-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/rules-manager/assets/codex-icon.svg +23 -0
- package/agents-config/skills/skill-manager/SKILL.md +45 -3
- package/agents-config/skills/skill-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/skill-manager/assets/codex-icon.svg +23 -0
- package/agents-config/skills/skill-manager/references/skill-writing-glossary.md +201 -0
- package/agents-config/skills/skill-manager/scripts/setup-codex-icons.ts +143 -0
- package/agents-config/skills/ultrathink/agents/openai.yaml +10 -0
- package/agents-config/skills/ultrathink/assets/codex-icon.svg +20 -0
- package/agents-config/skills/use-artifacts/SKILL.md +102 -51
- package/agents-config/skills/use-artifacts/assets/local-runtime.js +299 -0
- package/agents-config/skills/use-artifacts/scripts/create_artifact.py +1 -1
- package/agents-config/skills/use-delegate/SKILL.md +4 -0
- package/agents-config/skills/use-delegate/agents/openai.yaml +10 -0
- package/agents-config/skills/use-delegate/assets/codex-icon.svg +20 -0
- package/agents-config/skills/use-goal/SKILL.md +70 -9
- package/agents-config/skills/use-goal/agents/openai.yaml +1 -1
- package/agents-config/skills/use-goal/assets/codex-icon.svg +17 -3
- package/agents-config/skills/use-goal/references/claude-code-goal.md +54 -6
- package/agents-config/skills/use-goal/references/codex-goal.md +59 -4
- package/agents-config/skills/use-goal/references/verification-harnesses.md +104 -3
- package/package.json +1 -1
- package/agents-config/skills/apex/templates/00-context.md +0 -55
- package/agents-config/skills/apex/templates/01-analyze.md +0 -10
- package/agents-config/skills/apex/templates/02-plan.md +0 -10
- package/agents-config/skills/apex/templates/03-execute.md +0 -10
- package/agents-config/skills/apex/templates/04-validate.md +0 -10
- package/agents-config/skills/apex/templates/05-examine.md +0 -10
- package/agents-config/skills/apex/templates/06-resolve.md +0 -10
- package/agents-config/skills/apex/templates/07-tests.md +0 -10
- package/agents-config/skills/apex/templates/08-run-tests.md +0 -10
- package/agents-config/skills/apex/templates/09-finish.md +0 -10
- package/agents-config/skills/apex/templates/10-verify.md +0 -9
- package/agents-config/skills/apex/templates/README.md +0 -195
- package/agents-config/skills/apex/templates/step-complete.md +0 -7
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hooks-manager
|
|
3
|
-
description: Create, edit, configure, and debug Claude Code
|
|
3
|
+
description: Create, edit, configure, and debug hooks for Claude Code, Codex, and Cursor. Use for lifecycle events, command validation, routing shared hooks, notifications, automation, or platform-specific hook configuration.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hooks Manager
|
|
7
7
|
|
|
8
|
-
Configure Claude Code hooks as event-driven commands or prompts. Use hooks for validation, logging, formatting, notifications, context injection, and bounded completion checks.
|
|
8
|
+
Configure Claude Code, Codex, and Cursor hooks as event-driven commands or prompts. Use hooks for validation, logging, formatting, notifications, context injection, and bounded completion checks. Treat platform syntax and capabilities as distinct; do not copy a Claude configuration into Codex or Cursor without adapting it.
|
|
9
9
|
|
|
10
10
|
## Quick workflow
|
|
11
11
|
|
|
12
|
-
1. Identify the
|
|
13
|
-
2.
|
|
14
|
-
3.
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
12
|
+
1. Identify the target platform and load `references/router.md`.
|
|
13
|
+
2. Load the platform reference: `claude-code.md`, `codex.md`, or `cursor.md`.
|
|
14
|
+
3. Identify the scope and file path for that platform.
|
|
15
|
+
4. Select a supported lifecycle event and adapt the shared payload/decision contract.
|
|
16
|
+
5. Choose a command hook for deterministic shell logic, or a prompt hook when natural-language reasoning is required and the platform supports it.
|
|
17
|
+
6. Validate the native config and run the platform-specific smoke check.
|
|
17
18
|
|
|
18
|
-
##
|
|
19
|
+
## Claude-shaped example
|
|
19
20
|
|
|
20
21
|
```json
|
|
21
22
|
{
|
|
@@ -43,9 +44,18 @@ Command hooks receive JSON on stdin and may return JSON on stdout. Prompt hooks
|
|
|
43
44
|
- Keep blocking rules selective so normal work is not accidentally interrupted.
|
|
44
45
|
- Ensure referenced scripts are executable.
|
|
45
46
|
|
|
47
|
+
## Shared router
|
|
48
|
+
|
|
49
|
+
When the user asks for a hook that should work across agents, define one portable script with a small adapter per platform. Keep platform-specific event names, input fields, output decisions, exit codes, timeouts, and config paths in the references rather than pretending the formats are identical. Report unsupported features explicitly.
|
|
50
|
+
|
|
46
51
|
## References
|
|
47
52
|
|
|
48
|
-
- `references/
|
|
53
|
+
- `references/router.md`: select a platform, map shared lifecycle intent, and avoid unsupported assumptions.
|
|
54
|
+
- `references/claude-code.md`: Claude settings, events, handlers, and `/hooks` verification.
|
|
55
|
+
- `references/codex.md`: Codex config layers, `hooks.json`, trust, and restart/worktree caveats.
|
|
56
|
+
- `references/cursor.md`: Cursor `.cursor/hooks.json`, hook scripts, and native response mapping.
|
|
57
|
+
- `references/research-sources.md`: first-party documentation sources and refresh policy.
|
|
58
|
+
- `references/hook-types.md`: shared event concepts, input/output, and blocking behavior.
|
|
49
59
|
- `references/command-vs-prompt.md`: choose command versus prompt hooks.
|
|
50
60
|
- `references/matchers.md`: regex and MCP matcher patterns.
|
|
51
61
|
- `references/input-output-schemas.md`: event schemas and response fields.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="hooks-manager skill icon"
|
|
3
|
+
class="lucide lucide-settings"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
|
|
15
|
+
<circle cx="12" cy="12" r="3" />
|
|
5
16
|
</svg>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Claude Code Hooks
|
|
2
|
+
|
|
3
|
+
Claude Code stores project hooks in `.claude/settings.json` or `.claude/settings.local.json`, user hooks in `~/.claude/settings.json`, managed policy settings, and plugin hooks in `hooks/hooks.json`. Skill and agent frontmatter can also scope hooks to the active component. A standalone `.claude/hooks.json` is not the native settings surface.
|
|
4
|
+
|
|
5
|
+
The native shape is `hooks.<event>[]`, then matcher groups, then handlers:
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"hooks": {
|
|
10
|
+
"PreToolUse": [
|
|
11
|
+
{
|
|
12
|
+
"matcher": "Bash",
|
|
13
|
+
"hooks": [
|
|
14
|
+
{ "type": "command", "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/check.sh", "timeout": 30 }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Supported handlers include `command`, `http`, `mcp_tool`, `prompt`, and experimental `agent` handlers, but support varies by event. Command hooks receive JSON on stdin; exit code `2` is the blocking error path for most events. Structured JSON on exit 0 can also return `decision`, `continue`, `systemMessage`, or `hookSpecificOutput`; do not mix exit-2 blocking with JSON output because the JSON is ignored. Use `/hooks` to inspect the active configuration and `claude --debug` for execution details.
|
|
23
|
+
|
|
24
|
+
Important event facts:
|
|
25
|
+
|
|
26
|
+
- `PreToolUse` matches `tool_name`; use handler `if` rules such as `Bash(git *)` for argument-aware filtering.
|
|
27
|
+
- `UserPromptSubmit`, `Stop`, `TaskCreated`, `TaskCompleted`, `WorktreeCreate`, and similar lifecycle events do not use tool matchers.
|
|
28
|
+
- `SessionStart` supports `startup`, `resume`, `clear`, and `compact` sources.
|
|
29
|
+
- `Stop` and `SubagentStop` must check `stop_hook_active` to prevent loops.
|
|
30
|
+
- HTTP failures are non-blocking; a 2xx response must carry the JSON decision if it needs to block.
|
|
31
|
+
|
|
32
|
+
Official reference: https://code.claude.com/docs/en/hooks
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAI Codex Hooks
|
|
2
|
+
|
|
3
|
+
Codex implements Claude-style lifecycle hooks behind the `CodexHooks` feature. It discovers hook configuration from its config layers, including user-level `~/.codex/hooks.json` and project-level `.codex/hooks.json`. The current upstream runtime declares these event names: `PreToolUse`, `PermissionRequest`, `PostToolUse`, `PreCompact`, `PostCompact`, `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `SubagentStart`, `SubagentStop`, and `Stop`.
|
|
4
|
+
|
|
5
|
+
The config uses Claude-style `hooks` JSON with matcher groups and handlers. Handlers can include command, prompt, or agent declarations in the upstream schema. Keep the policy script portable and adapt field names at the boundary. Validate JSON before starting a session and restart Codex after changing hook configuration when the running session does not reload it.
|
|
6
|
+
|
|
7
|
+
Matchers are meaningful for `PreToolUse`, `PermissionRequest`, `PostToolUse`, `PreCompact`, `PostCompact`, `SessionStart`, `SessionEnd`, `SubagentStart`, and `SubagentStop`. They are not meaningful for `UserPromptSubmit` and `Stop`.
|
|
8
|
+
|
|
9
|
+
Operational checks:
|
|
10
|
+
|
|
11
|
+
1. Confirm the active config layer and project root.
|
|
12
|
+
2. Check the installed Codex version and hook schema.
|
|
13
|
+
3. Validate `hooks.json` with `jq`.
|
|
14
|
+
4. Run the smallest safe lifecycle/tool event and inspect the hook log.
|
|
15
|
+
5. Re-test from a normal repository and a git worktree; project hook discovery can differ by version.
|
|
16
|
+
|
|
17
|
+
Codex uses the same event names as Claude in `hooks.json`, but feature availability and output behavior are versioned. Do not assume Claude-only environment variables or a Claude exit-code path; inspect the installed schema/runtime and write a Codex-native adapter.
|
|
18
|
+
|
|
19
|
+
Official sources:
|
|
20
|
+
|
|
21
|
+
- https://github.com/openai/codex/tree/main/codex-rs/hooks
|
|
22
|
+
- https://github.com/openai/codex/blob/main/codex-rs/hooks/src/lib.rs
|
|
23
|
+
- https://github.com/openai/codex/blob/main/codex-rs/features/src/lib.rs
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Cursor Hooks
|
|
2
|
+
|
|
3
|
+
Cursor hooks are configured in `.cursor/hooks.json` for a project or `~/.cursor/hooks.json` for the user. The official Cursor hooks surface includes lifecycle/tool events such as `sessionStart`, `sessionEnd`, `preCompact`, `stop`, `beforeSubmitPrompt`, `preToolUse`, `postToolUse`, `postToolUseFailure`, `subagentStart`, `subagentStop`, and `workspaceOpen`; the exact set can evolve by Cursor IDE/CLI version.
|
|
4
|
+
|
|
5
|
+
Use a command script that reads JSON from stdin and emits the Cursor-native response. The config normally includes a top-level `version` and an event-to-handler map, for example `{ "version": 1, "hooks": { "preToolUse": [{ "command": "./.cursor/hooks/check.sh", "timeout": 5 }] } }`. Keep the shared policy separate from the adapter. Cursor uses camelCase lifecycle names and can use response fields such as `followup_message` rather than Claude’s `decision` contract.
|
|
6
|
+
|
|
7
|
+
Validation checklist:
|
|
8
|
+
|
|
9
|
+
1. Confirm the hook file is in `.cursor/hooks.json` or `~/.cursor/hooks.json`.
|
|
10
|
+
2. Confirm the event and payload keys against the installed Cursor version.
|
|
11
|
+
3. Run the hook script directly with a fixture payload.
|
|
12
|
+
4. Trigger the smallest safe edit/tool flow and verify the log or follow-up output.
|
|
13
|
+
5. Treat beta behavior, tool-specific gaps, and unsupported blocking/context-injection events as `NOT VERIFIABLE` until a live Cursor run proves them.
|
|
14
|
+
|
|
15
|
+
Cursor references:
|
|
16
|
+
|
|
17
|
+
- https://cursor.com/docs/hooks
|
|
18
|
+
- https://cursor.com/changelog/1-7
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# Hook
|
|
1
|
+
# Shared Hook Concepts
|
|
2
|
+
|
|
3
|
+
These are semantic concepts, not a universal schema. Use the platform references for the exact event spelling and blocking contract.
|
|
2
4
|
|
|
3
5
|
| Event | Fires | Can block? |
|
|
4
6
|
| --- | --- | --- |
|
|
@@ -8,6 +10,6 @@
|
|
|
8
10
|
| `Stop` / `SubagentStop` | Before an agent stops | Yes |
|
|
9
11
|
| `SessionStart` / `SessionEnd` | At session boundaries | No |
|
|
10
12
|
| `PreCompact` | Before context compaction | Yes |
|
|
11
|
-
| `Notification` | When
|
|
13
|
+
| `Notification` / native notification event | When the agent needs input | Usually no |
|
|
12
14
|
|
|
13
|
-
Blocking responses
|
|
15
|
+
Blocking responses must use the target platform's contract. Claude/Codex commonly use `decision` and `reason`; Cursor may use a native follow-up or approval field. Stop hooks must honor the target platform's loop-prevention field, such as Claude's `stop_hook_active`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Input and Output Schemas
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Claude and Codex commonly provide `session_id`, `transcript_path`, `cwd`, `permission_mode`, and `hook_event_name`. Tool events commonly include `tool_name` and `tool_input`; prompt submission commonly includes `prompt`. Cursor payloads and response fields are platform-specific and must be checked against its current docs.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Claude/Codex-style blocking output:
|
|
6
6
|
|
|
7
7
|
```json
|
|
8
8
|
{"decision":"block","reason":"Explain what must change"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Hook Documentation Sources
|
|
2
|
+
|
|
3
|
+
This reference records the first-party sources used to maintain the platform references. Re-check them when a platform version changes.
|
|
4
|
+
|
|
5
|
+
## Claude Code
|
|
6
|
+
|
|
7
|
+
- [Hooks reference](https://code.claude.com/docs/en/hooks): configuration scopes, matcher behavior, events, handler types, input/output, exit codes, HTTP/MCP hooks, `/hooks`, and debugging.
|
|
8
|
+
- [Hooks guide](https://code.claude.com/docs/en/hooks-guide): practical setup, stdin/stdout behavior, and common workflows.
|
|
9
|
+
|
|
10
|
+
## OpenAI Codex
|
|
11
|
+
|
|
12
|
+
- [Codex hook runtime](https://github.com/openai/codex/tree/main/codex-rs/hooks): upstream hook implementation and schema modules.
|
|
13
|
+
- [Hook event declarations](https://github.com/openai/codex/blob/main/codex-rs/hooks/src/lib.rs): current event names and matcher-capable event list.
|
|
14
|
+
- [Codex feature flags](https://github.com/openai/codex/blob/main/codex-rs/features/src/lib.rs): the `CodexHooks` feature declaration.
|
|
15
|
+
- [Codex configuration](https://github.com/openai/codex/blob/main/docs/config.md): managed-hook policy controls.
|
|
16
|
+
|
|
17
|
+
## Cursor
|
|
18
|
+
|
|
19
|
+
- [Cursor hooks](https://cursor.com/docs/hooks): native hook configuration and current platform behavior.
|
|
20
|
+
- [Cursor Hooks beta announcement](https://cursor.com/changelog/1-7): hooks for auditing, blocking commands, and extending the Agent loop.
|
|
21
|
+
- [Cursor hook catalog](https://cursor.com/marketplace/hooks/pretooluse): first-party marketplace visibility for supported hook events.
|
|
22
|
+
|
|
23
|
+
## Router policy
|
|
24
|
+
|
|
25
|
+
The router treats event names and response fields as platform contracts. Shared logic can be reused, but every adapter must be validated against the target agent's current docs, installed version, and one safe live event.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Hook Router
|
|
2
|
+
|
|
3
|
+
Use this routing table before editing a hook:
|
|
4
|
+
|
|
5
|
+
| Target | Project scope | User scope | Load |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| Claude Code | `.claude/settings.json` or `.claude/settings.local.json` | `~/.claude/settings.json` | `claude-code.md` |
|
|
8
|
+
| Codex | `.codex/hooks.json` | `~/.codex/hooks.json` | `codex.md` |
|
|
9
|
+
| Cursor | `.cursor/hooks.json` | `~/.cursor/hooks.json` | `cursor.md` |
|
|
10
|
+
|
|
11
|
+
## Shared intent mapping
|
|
12
|
+
|
|
13
|
+
| Intent | Claude Code | Codex | Cursor |
|
|
14
|
+
| --- | --- | --- | --- |
|
|
15
|
+
| before a tool | `PreToolUse` | `PreToolUse` | `preToolUse` |
|
|
16
|
+
| permission request | `PermissionRequest` | `PermissionRequest` | native permission event if available |
|
|
17
|
+
| after a tool | `PostToolUse` | `PostToolUse` | `postToolUse` |
|
|
18
|
+
| prompt submitted | `UserPromptSubmit` | `UserPromptSubmit` | `beforeSubmitPrompt` |
|
|
19
|
+
| compaction | `PreCompact` / `PostCompact` | `PreCompact` / `PostCompact` | `preCompact` |
|
|
20
|
+
| agent/session finished | `Stop`, `SubagentStop`, `SessionEnd` | `Stop`, `SubagentStop`, `SessionEnd` | `stop`, `subagentStop`, `sessionEnd` |
|
|
21
|
+
|
|
22
|
+
The mapping is semantic, not a copy/paste schema. Read the platform reference and inspect the installed version before writing config. If an event or response field is not supported, use a portable command that logs/observes instead of claiming it can block.
|
|
23
|
+
|
|
24
|
+
## Portable adapter pattern
|
|
25
|
+
|
|
26
|
+
Keep policy logic in one executable that accepts JSON and emits a small internal decision. Add thin platform adapters for field extraction and response formatting:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
platform hook -> adapter -> shared policy -> adapter response
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Use platform-native config files and paths. Never make a hook depend on a Claude-only variable such as `$CLAUDE_PROJECT_DIR` without providing a fallback for Codex and Cursor.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Troubleshooting
|
|
2
2
|
|
|
3
|
-
1. Run
|
|
4
|
-
2. Check the config location: `.
|
|
5
|
-
3. Validate
|
|
3
|
+
1. Run the target agent's debug/diagnostic mode and confirm the event and matcher were found (`claude --debug` for Claude Code).
|
|
4
|
+
2. Check the platform reference for the config location: Claude settings, `.codex/hooks.json`, `~/.codex/hooks.json`, `.cursor/hooks.json`, or `~/.cursor/hooks.json`.
|
|
5
|
+
3. Validate the target JSON file with `jq`.
|
|
6
6
|
4. Confirm matcher case and regex escaping; `bash` does not match `Bash`.
|
|
7
7
|
5. Run command hooks directly with representative JSON on stdin.
|
|
8
8
|
6. Check script permissions, dependencies such as `jq`, trusted paths, and timeout values.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Merge"
|
|
3
|
+
short_description: "Intelligently merge branches with context-aware conflict..."
|
|
4
|
+
icon_small: "./assets/codex-icon.svg"
|
|
5
|
+
icon_large: "./assets/codex-icon.svg"
|
|
6
|
+
brand_color: "#764627"
|
|
7
|
+
default_prompt: "Use $merge to help with this task."
|
|
8
|
+
|
|
9
|
+
policy:
|
|
10
|
+
allow_implicit_invocation: false
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="merge skill icon"
|
|
3
|
+
class="lucide lucide-git-merge"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<circle cx="18" cy="18" r="3" />
|
|
15
|
+
<circle cx="6" cy="6" r="3" />
|
|
16
|
+
<path d="M6 21V9a9 9 0 0 0 9 9" />
|
|
17
|
+
</svg>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oneshot
|
|
3
3
|
description: Implement one focused code change quickly with minimal exploration and targeted validation. Use for small bug fixes, single feature edits, config updates, or explicit "$oneshot" requests.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
metadata:
|
|
6
|
+
opencode/autoinvoke: "false"
|
|
7
|
+
opencode/slash: "true"
|
|
4
8
|
argument-hint: <feature-description>
|
|
5
9
|
---
|
|
6
10
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Oneshot"
|
|
3
|
+
short_description: "Implement one focused code change quickly with minimal..."
|
|
4
|
+
icon_small: "./assets/codex-icon.svg"
|
|
5
|
+
icon_large: "./assets/codex-icon.svg"
|
|
6
|
+
brand_color: "#CF80EF"
|
|
7
|
+
default_prompt: "Use $oneshot to help with this task."
|
|
8
|
+
|
|
9
|
+
policy:
|
|
10
|
+
allow_implicit_invocation: false
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="oneshot skill icon"
|
|
3
|
+
class="lucide lucide-sparkles"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" />
|
|
15
|
+
<path d="M20 2v4" />
|
|
16
|
+
<path d="M22 4h-4" />
|
|
17
|
+
<circle cx="4" cy="20" r="2" />
|
|
18
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Prompt Creator"
|
|
3
|
+
short_description: "Expert prompt engineering for creating effective prompts for..."
|
|
4
|
+
icon_small: "./assets/codex-icon.svg"
|
|
5
|
+
icon_large: "./assets/codex-icon.svg"
|
|
6
|
+
brand_color: "#60524E"
|
|
7
|
+
default_prompt: "Use $prompt-creator to help with this task."
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="prompt-creator skill icon"
|
|
3
|
+
class="lucide lucide-pen-line"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<path d="M13 21h8" />
|
|
15
|
+
<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Rules Manager"
|
|
3
|
+
short_description: "Create, edit, and maintain AGENTS.md and .agents/rules/ —..."
|
|
4
|
+
icon_small: "./assets/codex-icon.svg"
|
|
5
|
+
icon_large: "./assets/codex-icon.svg"
|
|
6
|
+
brand_color: "#2F5B3E"
|
|
7
|
+
default_prompt: "Use $rules-manager to help with this task."
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="rules-manager skill icon"
|
|
3
|
+
class="lucide lucide-notebook-tabs"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<path d="M2 6h4" />
|
|
15
|
+
<path d="M2 10h4" />
|
|
16
|
+
<path d="M2 14h4" />
|
|
17
|
+
<path d="M2 18h4" />
|
|
18
|
+
<rect width="16" height="20" x="4" y="2" rx="2" />
|
|
19
|
+
<path d="M15 2v20" />
|
|
20
|
+
<path d="M15 7h5" />
|
|
21
|
+
<path d="M15 12h5" />
|
|
22
|
+
<path d="M15 17h5" />
|
|
23
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-manager
|
|
3
|
-
description: Create or
|
|
3
|
+
description: Create, edit, audit, or prune Claude, Codex, and Cursor skills/rules. Use for SKILL.md, .cursor/rules, AGENTS.md, prompts, frontmatter, references, scripts, discovery, and predictable skill design.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill Manager
|
|
@@ -19,11 +19,16 @@ Pick the platform first, then read the matching reference file:
|
|
|
19
19
|
- Codex → see [references/codex.md](references/codex.md)
|
|
20
20
|
- Cursor → see [references/cursor.md](references/cursor.md)
|
|
21
21
|
- Description quality → see [references/description-recommandation.md](references/description-recommandation.md)
|
|
22
|
+
- Skill-writing vocabulary → see [references/skill-writing-glossary.md](references/skill-writing-glossary.md)
|
|
22
23
|
|
|
23
24
|
If unsure which the user wants, ask. Default to Claude Code when working under `~/.claude/` or `.claude/`, Codex when under `~/.agents/` or `.agents/`, Cursor when under `.cursor/`.
|
|
24
25
|
|
|
25
26
|
## Core principles (all platforms)
|
|
26
27
|
|
|
28
|
+
### Optimize for predictability
|
|
29
|
+
|
|
30
|
+
A skill should make the agent follow the same process on repeated runs, even when the outputs differ. Treat predictability as the root quality; token cost and maintainability improve when the process is explicit and lean.
|
|
31
|
+
|
|
27
32
|
### Concise is key
|
|
28
33
|
|
|
29
34
|
The context window is shared with the system prompt, conversation, other skills' metadata, and the user request. Only add context the agent doesn't already have. Challenge each line: does it justify its tokens?
|
|
@@ -44,12 +49,38 @@ Three loading levels:
|
|
|
44
49
|
|
|
45
50
|
Keep references one level deep. Reference them by name in SKILL.md so the agent knows when to open them.
|
|
46
51
|
|
|
52
|
+
### Design the information hierarchy
|
|
53
|
+
|
|
54
|
+
Put ordered actions in steps and definitions or rules in reference sections. End important steps with a checkable completion criterion; vague criteria invite premature completion. Inline what every execution branch needs and move branch-specific material behind a context pointer whose wording says when to load it.
|
|
55
|
+
|
|
56
|
+
Split a skill only when the split earns its cost:
|
|
57
|
+
|
|
58
|
+
- **By invocation:** a distinct leading word must trigger the new skill independently.
|
|
59
|
+
- **By sequence:** hiding later steps prevents the agent from rushing the current step.
|
|
60
|
+
|
|
61
|
+
Every model-invoked skill spends context load through its description. Every user-only skill spends human cognitive load because the user must remember it. When user-only skills become hard to remember, add one router instead of making every skill model-invoked.
|
|
62
|
+
|
|
63
|
+
### Use leading words
|
|
64
|
+
|
|
65
|
+
A leading word is a compact pretrained concept such as `tight loop`, `tracer bullet`, or `handoff`. Reuse the same term in the description and body so it anchors both invocation and execution. Prefer one strong term over repeated prose that restates the same behavior.
|
|
66
|
+
|
|
67
|
+
### Prune aggressively
|
|
68
|
+
|
|
69
|
+
Keep each meaning in one authoritative place. Audit every sentence with the no-op test: would removing it change agent behavior? Delete no-ops instead of polishing them. Watch for:
|
|
70
|
+
|
|
71
|
+
- **Duplication:** the same rule appears in several places.
|
|
72
|
+
- **Sediment:** stale instructions remain because removal feels risky.
|
|
73
|
+
- **Sprawl:** every line may be relevant, but the active path carries too much context.
|
|
74
|
+
- **Negation:** naming forbidden behavior makes it more available; state the positive target and reserve prohibitions for hard guardrails.
|
|
75
|
+
- **Negative space:** omitted decisions silently fall back to model priors; decide whether each omission is intentional.
|
|
76
|
+
- **Premature completion:** sharpen the completion criterion before splitting the sequence.
|
|
77
|
+
|
|
47
78
|
### Online research routing
|
|
48
79
|
|
|
49
80
|
When a skill or agent needs online research, name the exact research skill to use instead of relying on vague web-search language:
|
|
50
81
|
|
|
51
|
-
- Use
|
|
52
|
-
- Use
|
|
82
|
+
- Use `~/.agents/skills/find-docs/SKILL.md` for current technical documentation, API references, config options, SDKs, CLIs, cloud services, and code examples.
|
|
83
|
+
- Use `~/.agents/skills/exa-search/SKILL.md` for broader online research, recent information, source discovery, similar pages, URL extraction, or cited web answers.
|
|
53
84
|
- Mention default harness tools for local code, file, git, shell, and browser inspection.
|
|
54
85
|
- Keep built-in `WebSearch` and `WebFetch` as fallback tools unless the user explicitly asks for them.
|
|
55
86
|
- For restricted agents, include `Skill` and `Bash` in the tool list when these skills need to run local CLIs.
|
|
@@ -107,6 +138,17 @@ For researched guidance and examples, see [references/description-recommandation
|
|
|
107
138
|
|
|
108
139
|
**Canonical personal skills:** `~/.agents/skills/` is the single source of truth (git repo `Melvynx/agents-config`). It is an official user-level root for both Cursor and Codex, so they read it directly. Write new personal skills only under `~/.agents/skills/<name>/`.
|
|
109
140
|
|
|
141
|
+
### Codex profile activity icons
|
|
142
|
+
|
|
143
|
+
Codex's Profile activity view does not resolve standalone skill icons from `agents/openai.yaml`. It resolves known built-in skill icons or the logo of a matching installed plugin. After creating, renaming, or changing the icon metadata of a personal skill, sync the identity-only personal plugin wrappers:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
bun ~/.agents/scripts/sync-codex-profile-icons.ts --install
|
|
147
|
+
bun ~/.agents/scripts/audit-codex-profile-icons.ts
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The wrappers intentionally contain no executable skills, so they provide `logo` / `logoDark` metadata without duplicating skill discovery. Keep `~/plugins` linked to `~/.agents/plugins/plugins`; the sync script creates the link when absent.
|
|
151
|
+
|
|
110
152
|
Per the official Cursor docs ([cursor.com/docs/skills](https://cursor.com/docs/skills)), user-level roots are `~/.agents/skills/` and `~/.cursor/skills/`, plus compat dirs `~/.claude/skills/` and `~/.codex/skills/`. `~/.cursor/skills-cursor/` is NOT a documented path; do not use it.
|
|
111
153
|
|
|
112
154
|
Because `~/.agents/skills/` is read directly, the only symlinks needed are the compat dirs for agents that do not read `~/.agents/skills/` themselves:
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Skill Manager"
|
|
3
|
+
short_description: "Create or edit Claude, Codex, and Cursor skills/rules"
|
|
4
|
+
icon_small: "./assets/codex-icon.svg"
|
|
5
|
+
icon_large: "./assets/codex-icon.svg"
|
|
6
|
+
brand_color: "#48AAB0"
|
|
7
|
+
default_prompt: "Use $skill-manager to help with this task."
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="skill-manager skill icon"
|
|
3
|
+
class="lucide lucide-notebook-tabs"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<path d="M2 6h4" />
|
|
15
|
+
<path d="M2 10h4" />
|
|
16
|
+
<path d="M2 14h4" />
|
|
17
|
+
<path d="M2 18h4" />
|
|
18
|
+
<rect width="16" height="20" x="4" y="2" rx="2" />
|
|
19
|
+
<path d="M15 2v20" />
|
|
20
|
+
<path d="M15 7h5" />
|
|
21
|
+
<path d="M15 12h5" />
|
|
22
|
+
<path d="M15 17h5" />
|
|
23
|
+
</svg>
|