Image Pipeline
Generate images from markdown prompts, upload to Cloudinary, and return optimized URLs. Composes gemini-api-dev for generation and cloudinary for CDN delivery.
Behavioral Classification
Type: Guided Decision
Directive: ASK, THEN EXECUTE
Ask the user for the markdown file, article slug, style preferences, and output directory before executing the pipeline. Then run the full workflow autonomously.
Execution
When triggered, immediately:
- Read
~/.claude/skills/image-pipeline/agent-prompt.md - Spawn a single Task with
subagent_type: "general-purpose"passing the agent-prompt content as the prompt - Include in the prompt: the user's request, the markdown file path, article slug, any style/brand guide, and current working directory
- Wait for the agent to complete
- Present the agent's summary to the user (Cloudinary URLs and metadata)
Do NOT execute the pipeline workflow in this session. The subagent handles everything including Gemini API calls, file I/O, Cloudinary uploads, and URL generation.
Environment Variables
| Variable | Required | Sensitive | Description |
|---|---|---|---|
GEMINI_API_KEY | Yes | Yes | Google Gemini API key for image generation |
CLOUDINARY_URL | Yes | Yes | Cloudinary connection string |
Both injected via varlock run --.
Quick Reference
# Full pipeline: generate + upload + get URLs
/image-pipeline docs/articles/my-post.md --slug my-post
# With brand guide
/image-pipeline docs/articles/my-post.md --slug my-post --style brand-guide.md
# Generate only (no upload)
/image-pipeline docs/articles/my-post.md --generate-only --output ./tmp/images
Changelog
v1.0.0
- Initial release with thin dispatcher pattern
- Composes gemini-api-dev + cloudinary
- Supports IMAGE REQUIREMENT comment blocks in markdown
- Style/brand guide support