Install the global draw skill, and afterward you can say "draw a picture of XX" in any project to generate AI images.
Prerequisites
-
~/.openai.envalready includesOPENAI_API_KEY - Python
openaipackage is installed:pip install openai
Steps
1. Copy the skill files
mkdir -p ~/.config/opencode/skills/draw
curl -o ~/.config/opencode/skills/draw/SKILL.md https://raw.githubusercontent.com/mathruffian-dot/opencode-lazy-packs/main/skills/08-draw/SKILL.md
curl -o ~/.config/opencode/skills/draw/draw.py https://raw.githubusercontent.com/mathruffian-dot/opencode-lazy-packs/main/scripts/draw.py
2. Confirm the location of draw.py
Make sure ~/.config/opencode/skills/draw/draw.py already exists. Do not mix it in from Claude Code's ~/.claude/skills/ to avoid different tool versions overwriting each other.
3. Set opencode.json permissions
"draw": "allow"
4. Test
python ~/.config/opencode/skills/draw/draw.py "一隻橘貓坐在窗邊,水彩風格" --name test --quality low
Usage
After installation, simply say "draw a picture of XXX" in any conversation, and the agent will automatically load the skill and call draw.py to generate the image.
Output directory: current project slides/generated/。
Report format: API key status,draw: allow permission settings, test image generation result.