Integrate image generation models with Token Plan through tool extension mechanisms
Image generation models must be integrated through each tool's extension mechanism (Skill, Slash Command, or Agent).
AI coding tools cannot call image generation models directly through model configuration. Integrate them through each tool's extension mechanism instead.
This example shows how to integrate an image generation model in Claude Code using a Slash Command. The process is similar for other tools, with differences in extension mechanism and configuration file path.
Create the file
In Claude Code, type
The following table lists the extension mechanism and configuration file path for each tool. Save the same content from the Claude Code example to the corresponding path.
OpenCode Agent requires a different front matter format:
Overview
AI coding tools cannot call image generation models directly through model configuration. Integrate them through each tool's extension mechanism instead.
Example: Claude Code
This example shows how to integrate an image generation model in Claude Code using a Slash Command. The process is similar for other tools, with differences in extension mechanism and configuration file path.
Step 1: Create a Slash Command
Create the file .claude/commands/text-to-image.md in your project root directory with the following content:
Step 2: Generate an image
In Claude Code, type /text-to-image draw a cat.
Other tools
The following table lists the extension mechanism and configuration file path for each tool. Save the same content from the Claude Code example to the corresponding path.
| Tool | Extension mechanism | Configuration file path |
|---|---|---|
| Claude Code | Slash Command | .claude/commands/text-to-image.md |
| Codex | Skill | ~/.codex/skills/token-plan-image/SKILL.md |
| Qwen Code | Skill | ~/.qwen/skills/text-to-image/SKILL.md |
| OpenCode | Agent | .opencode/agents/text-to-image.md |
| OpenClaw | Skill | ~/.openclaw/workspace/skills/token-plan-image/SKILL.md |
| Hermes Agent | Skill | ~/.hermes/skills/media/text-to-image/SKILL.md |
Skill-based tools (Codex, Qwen Code, OpenClaw, Hermes Agent) require YAML front matter at the beginning of the file: