imagegen-smarto
v0.2.1
Published
Install the imagegen-smarto Codex skill on Windows and Linux.
Maintainers
Readme
imagegen-smarto
Codex skill for natural-language image generation and editing through a custom SmartO OpenAI-compatible VPS relay.
It implicitly handles requests to create, draw, generate, modify, perform image-to-image, or perform text-to-image generation. Requests to view, analyze, describe, or recognize an image remain ordinary requests.
Install with npm
The recommended installation is the same on Windows, Linux, and macOS:
npm install --global imagegen-smartoThe npm postinstall step copies the skill to CODEX_HOME/skills/imagegen-smarto
or, when CODEX_HOME is not set, ~/.codex/skills/imagegen-smarto.
To update to the latest published package:
npm install --global imagegen-smartoTo recopy the skill from the already installed npm package:
imagegen-smarto installTo print the target directory:
imagegen-smarto pathIf npm lifecycle scripts are disabled, run imagegen-smarto install once after
the global npm installation.
Uninstall globally
Remove the Codex skill first, then remove the npm package:
imagegen-smarto uninstall
npm uninstall --global imagegen-smartoThe uninstall command removes only
CODEX_HOME/skills/imagegen-smarto (or ~/.codex/skills/imagegen-smarto when
CODEX_HOME is not set). It does not remove other Codex skills.
If the npm package has already been removed, delete the skill directory manually:
Linux/macOS:
rm -rf ~/.codex/skills/imagegen-smartoWindows PowerShell:
Remove-Item -Recurse -Force "$env:USERPROFILE\.codex\skills\imagegen-smarto"When using a custom CODEX_HOME, replace ~/.codex or
%USERPROFILE%\.codex with that directory.
Install with the Codex installer
The preinstalled Codex skill installer remains available as a fallback:
python3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \
--repo 24kmojito763/imagegen-smarto \
--path imagegen-smarto \
--method gitAfter installation, use the profile that points requests to SmartO. The skill
is configured for implicit invocation, so an image request can be written in
natural language without first typing $imagegen-smarto.
Image generation workflow
When the skill is triggered, Codex first turns the request into the same kind of structured, production-oriented prompt used by the official image skill. Detailed prompts are preserved and normalized; generic prompts receive only useful composition or presentation detail. Edits explicitly lock the parts that must remain unchanged.
Codex then runs the installed imagegen-smarto command. The command uses the
active SmartO provider and credential, saves the returned PNG locally, and
prints an absolute IMAGE_MARKDOWN=... line so Codex can display it inline.
You can also test the execution path directly:
imagegen-smarto generate --prompt "一只戴红色围巾的小猫,儿童绘本风格"For editing, add one or more reference images:
imagegen-smarto generate \
--prompt "把背景改成海边日落,保留主体" \
--image /absolute/path/to/source.pngThe command handles its relay protocol internally; the skill only prepares the final image prompt, supplies reference-image paths, and consumes the returned image result.
While the relay is producing an image, the command writes a periodic status
heartbeat with elapsed time to stderr. This is a waiting indicator, not an
upstream completion percentage. The final IMAGE_PATH= and IMAGE_MARKDOWN=
records remain on stdout. Pass --quiet to suppress status messages while
keeping those final records.
Local profile switch
The two profiles used by the author are:
codex --profile smarto
codex --profile officialsmarto selects the custom relay and enables this skill.
