Automates image generation directly from the command line for your projects.
Install
mkdir -p .claude/skills/t2i && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10467" && unzip -o skill.zip -d .claude/skills/t2i && rm skill.zipInstalls to .claude/skills/t2i
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
This skill teaches AI agents (GitHub Copilot, Claude Code, and MCP-aware assistants) how to use the **t2i** command-line tool for image generation. Learn the commands, workflows, and best practices for automating text-to-image tasks in scripts and terminal environments.Key capabilities
- →Generate images
- →Configure providers
- →Manage secrets
- →Batch process prompts
How it works
It provides a CLI interface to cloud-based image generation providers, handling configuration and secure credential storage.
Inputs & outputs
When to use t2i
- →Generating placeholder images
- →Automating image creation in CI/CD
- →Testing image models
- →Generating project assets
About this skill
t2i — Text-to-Image CLI Skill
This skill teaches AI agents (GitHub Copilot, Claude Code, and MCP-aware assistants) how to use the t2i command-line tool for image generation. Learn the commands, workflows, and best practices for automating text-to-image tasks in scripts and terminal environments.
When to Use This Skill
Activate this skill when:
- User asks to generate an image from a text prompt
- User mentions text-to-image, image generation, or AI images
- User wants to automate image generation in a script or pipeline
- User needs batch image generation across multiple prompts
- User is setting up image generation for CI/CD or deployment workflows
- User requests help with t2i command syntax or configuration
Quick Reference
| Command | Purpose |
|---|---|
t2i config | Interactive setup wizard (provider, API keys) |
t2i "<prompt>" | Generate one image from a text prompt |
t2i "<prompt>" --provider <p> --output <file> | Generate with specific provider and filename |
t2i providers | List available image generation providers |
t2i secrets set <provider> | Configure or rotate API credentials securely |
t2i secrets list | Show stored secrets (redacted) |
t2i doctor | Run diagnostics (config, API connectivity, secrets) |
t2i version | Show version and commit SHA |
t2i init | Write .github/skills/t2i/SKILL.md and .claude/skills/t2i/SKILL.md to current repo |
Providers
Two cloud providers available in the Lite edition:
| Provider | Model | Use For |
|---|---|---|
foundry-flux2 | FLUX.2 Pro | High-quality images, fine-grained control, batch jobs |
foundry-mai2 | MAI-Image-2 | Fast iteration, rich prompt understanding, synchronous API |
Default: foundry-flux2 if user doesn't specify --provider.
Common Workflows
1. First-Time Setup
# Step 1: Interactive config
t2i config
# Step 2: Enter API credentials when prompted
# (CLI stores securely via DPAPI on Windows, encrypted on macOS/Linux)
# Step 3: Verify connection
t2i doctor
# Step 4: Generate your first image
t2i "a robot painting a landscape"
Agent tip: If user skips t2i config, they'll get a "not configured" error. Always suggest running it first.
2. Generate One Image
# Basic: uses default provider and outputs to current directory
t2i "a cyberpunk city at night, neon lights"
# With custom filename
t2i "a robot waving" --output my-robot.png
# Specific provider and dimensions
t2i "minimalist line art of a cat" \
--provider foundry-mai2 \
--width 1024 \
--height 1024 \
--output cat.png
3. Batch Generate via Shell Loop
Bash:
#!/bin/bash
prompts=(
"a robot painting a landscape"
"a cyberpunk city at night"
"a watercolor painting of a castle"
)
for prompt in "${prompts[@]}"; do
echo "Generating: $prompt"
t2i "$prompt" --output "image-$(date +%s).png"
sleep 2 # rate limiting
done
PowerShell:
$prompts = @(
"a robot painting a landscape",
"a cyberpunk city at night",
"a watercolor painting of a castle"
)
foreach ($prompt in $prompts) {
Write-Host "Generating: $prompt"
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
& t2i $prompt --output "image-$timestamp.png"
Start-Sleep -Seconds 2 # rate limiting
}
Important Rules for Agents
-
Always verify config first — Before suggesting any image generation command, check if the user has run
t2i config. If they haven't, suggest it: "Runt2i configfirst to set up your provider and credentials." -
Never expose API keys — Do not include API keys, tokens, or secrets in code examples, commit messages, or logs. Always direct users to
t2i secrets setfor credential management. -
Use environment variables in CI/CD — For GitHub Actions, Azure Pipelines, or other CI systems, prefer setting
T2I_FOUNDRY_FLUX2_API_KEYorT2I_FOUNDRY_MAI2_API_KEYas secrets, not hardcoded in scripts. -
Default to foundry-flux2 — If the user doesn't specify a provider, use
foundry-flux2. It offers the best quality and control. Only suggestfoundry-mai2if the user prefers speed or has specific MAI compatibility needs. -
Use
--output <file>for predictable filenames — When scripting batch jobs, always specify--outputto ensure consistent, parseable filenames. Without it, images go togenerated_<random>.png. -
Run
t2i doctorto diagnose issues — If the user reports generation failures or API errors, always suggestt2i doctorfirst. It checks config, secrets, API connectivity, and permission issues in one command. -
Suggest
t2i initfor new repos — When onboarding a new project or repo, offer to runt2i initso future AI agents (Copilot, Claude Code) working on that repo will know how to use t2i.
Secrets & Security
Storage Priority (checked in this order):
- Environment variables —
T2I_<PROVIDER>_<FIELD>(best for CI/CD) - DPAPI (Windows) —
%LOCALAPPDATA%\t2i\secrets.dpapiencrypted per-user - Plaintext file (macOS/Linux) —
~/.config/t2i/secrets.jsonwith0600permissions
In CI/CD:
# GitHub Actions example
env:
T2I_FOUNDRY_FLUX2_API_KEY: ${{ secrets.T2I_API_KEY }}
T2I_FOUNDRY_FLUX2_ENDPOINT: ${{ secrets.T2I_ENDPOINT }}
steps:
- run: t2i "your prompt" --output image.png
For local development:
- Run
t2i secrets set foundry-flux2to store credentials securely - Never commit secrets files — add
~/.config/t2i/and%APPDATA%\t2i\to.gitignore
More Info
- Full documentation: docs/cli-tool.md
- GitHub repository: elbruno/ElBruno.Text2Image
- Package: NuGet: ElBruno.Text2Image.Cli
- Report issues: GitHub Issues
When not to use it
- →Exposing API keys
- →Direct API calls
Prerequisites
Limitations
- →Requires initial configuration
- →Rate limiting recommended
How it compares
It abstracts provider-specific complexities into a unified CLI, enabling image generation in scripts and CI/CD pipelines.
Compared to similar skills
t2i side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| t2i (this skill) | 0 | 3mo | Review | Beginner |
| gemini-logo-remover | 9 | 8mo | Review | Beginner |
| ai-media | 0 | 2mo | No flags | Intermediate |
| asset-spec | 0 | 3mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
gemini-logo-remover
bear2u
Remove Gemini logos, watermarks, or AI-generated image markers using OpenCV inpainting. Use this skill when the user asks to remove Gemini logo, AI watermark, or any logo/watermark from images.
ai-media
arcasilesgroup
Generates images, videos, and audio via AI models (fal-ai MCP): cheap iteration models, expensive production finals, cost-estimate before generation. Trigger for 'generate an image', 'create a thumbnail', 'make a voiceover', 'AI video', 'text to speech for'. Not for design composition; use /ai-visua
asset-spec
rakhnianskii9
Generate per-asset visual specifications and AI generation prompts from GDDs, level docs, or character profiles. Produces structured spec files and updates the master asset manifest. Run after art bible and GDD/level design are approved, before production begins.
convert-slides-to-images
pamelafox
>-
skills
Sergio-prog
Fram is a compact media workshop for the terminal, API, and Telegram. The current primary surface is the `fram` CLI, backed by the same typed processing core used by the API and bot.
planning-visual-tasks
ShinyGua
v1.2 LLM-driven planner. Turns a natural-language instruction into a structured Plan envelope (`contracts/agent/plan.schema.json`) of typed sub-goals (workflow_search → model_resolve → comfyui_execute → llm_transform → evaluate → mcp_tool → checkpoint → wait_user). Use whenever a user instruction ne