Adapters translate the resolved plugin set into tool-specific configuration. Each adapter reads the same .devkit/toolkit.json project config and generates output appropriate for its target AI tool.
| Adapter | Target Tool | Output |
|---|---|---|
claude |
Claude Code | .claude-plugin/marketplace.json, .claude/settings.json (permissions + hooks) |
cursor |
Cursor IDE | .cursor/skills/devkit-*--*/, .cursor/rules/devkit-*.mdc, .cursor/mcp.json, .cursor/hooks/hooks.json |
codex |
OpenAI Codex | .codex/skills/devkit-*--*/, AGENTS.md section (conduct + hook instructions) |
# From project root (toolkit submodule at toolkits/agentic-devkit)
toolkits/agentic-devkit/bin/devkit-resolve --adapter=claude
toolkits/agentic-devkit/bin/devkit-resolve --adapter=cursor
toolkits/agentic-devkit/bin/devkit-resolve --adapter=codexCursor core skills are installed globally. Stack skills are project-scoped; after upgrading from an older global-skill
installation, rerun the Cursor adapter in each project to create its resolved .cursor/skills/devkit-*--* links.
- Create
adapters/<name>/generate(executable shell script). - Source the shared libraries at the top:
source "$ADAPTER_DIR/../_lib/resolve.sh" source "$ADAPTER_DIR/../_lib/hooks.sh"
- Call
resolve_pluginsto get the ordered list of resolved plugin names. - Call
resolve_plugin_dirsif you need absolute directory paths. - Use
toolkit_relpathto get the relative path from project root to toolkit root. - Use
_build_plugin_index+jqto read individual plugin manifests. - Generate whatever files your target tool expects.
| Function | Returns |
|---|---|
resolve_plugins |
Newline-separated plugin names, layer-sorted |
resolve_plugin_dirs |
Newline-separated absolute plugin directory paths |
toolkit_relpath |
Relative path from $PROJECT_ROOT to $TOOLKIT_ROOT |
_build_plugin_index |
JSON object keyed by plugin name with full manifest + _dir |
_check_jq |
Exits with error if jq is not installed |
| Function | Returns |
|---|---|
merge_plugin_hooks |
Merged JSON of all hooks from resolved plugins (Claude Code format) |
translate_hooks_to_cursor |
Hooks translated from Claude Code event names to Cursor event names |
inject_cursor_edit_gates |
Adds devkit coder-gate and comment-gate to Cursor preToolUse hooks JSON |
flatten_hooks_for_text |
Pipe-delimited lines (`event |
Plugins define hooks once in Claude Code format (the common denominator). Each adapter is responsible for translating event names to its target tool's format. This avoids duplicating hook definitions per tool.
Event name mapping:
| Claude Code | Cursor | Codex |
|---|---|---|
PreToolUse |
preToolUse |
instruction-based |
PostToolUse |
afterFileEdit |
instruction-based |
Stop |
afterResponse |
instruction-based |
Notification |
(no equivalent) | instruction-based |
SubagentStop |
(no equivalent) | (no equivalent) |
Codex does not support native hooks; the Codex adapter embeds hook commands as instructions in AGENTS.md.
| Variable | Default | Description |
|---|---|---|
DEVKIT_PROJECT_ROOT |
CWD | Override the project root directory |