/codex-image
Tạo ảnh bằng Codex CLI theo prompt mô tả
Cài command này
Chạy trong terminal, sau đó restart Claude Code.
curl -fsSL https://raw.githubusercontent.com/kaiitc/helloai-kit/main/install.sh | bash -s -- command codex-image Paste prompt dưới vào Claude Code / Codex CLI chat, AI sẽ chạy cài giúp.
Cài giúp mình command "codex-image" từ HelloAI Kit nhé. Chạy trong terminal:
curl -fsSL https://raw.githubusercontent.com/kaiitc/helloai-kit/main/install.sh | bash -s -- command codex-image
Xong check file ~/.claude/commands/codex-image.md có chưa rồi báo lại. Nhiệm vụ
Người dùng muốn tạo ảnh bằng Codex CLI với prompt sau:
Cách chạy
- Nếu
$ARGUMENTStrống, hỏi user prompt ảnh trước, sau đó tiếp tục. - Gọi Codex CLI để sinh ảnh:
codex exec "Generate an image based on this description and save to the current working directory with a descriptive kebab-case filename: $ARGUMENTS"
- Sau khi codex chạy xong, kiểm tra file ảnh mới sinh trong working directory (
ls -lt *.png *.jpg *.jpeg *.webp 2>/dev/null | head -5). - Nếu có ảnh: dùng
SendUserFilegửi ảnh cho user với caption ngắn về prompt. - Nếu codex không có khả năng sinh ảnh (không có tool image gen được config), báo user rõ và gợi ý cấu hình MCP image tool trong
~/.codex/config.toml.
Ghi chú
Codex CLI mặc định không có image gen. Cần config MCP tool (vd: OpenAI image API) trong Codex config trước khi command này chạy được.