From reactant
Generates figures using Google Gemini API from prompts or surrounding context, saves PNGs in the file directory, and replaces <@figure> tags with Markdown or LaTeX image references.
How this skill is triggered — by the user, by Claude, or both
Slash command
/reactant:figureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a figure from the prompt and surrounding context.
Generate a figure from the prompt and surrounding context.
<@figure ...> tag appears.figure_system_architecture.png).<@figure> tag with a format-appropriate image reference:
.md): .tex): \includegraphics{filename.png}Requires GEMINI_API_KEY environment variable.
Run the entire generate-and-save flow in a single Bash command to avoid redundant API calls. Use single-quoted JSON with the prompt inserted via variable substitution to avoid escaping issues.
source ~/.bashrc && RESPONSE=$(curl -s -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{
"parts": [{"text": "Generate an image: YOUR_PROMPT_HERE"}]
}],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"]
}
}') && echo "$RESPONSE" | python -c "
import json, sys, base64
r = json.load(sys.stdin)
if 'error' in r:
print('API error: ' + r['error'].get('message', 'unknown')); sys.exit(1)
if 'candidates' not in r:
print('No candidates in response'); sys.exit(1)
for part in r['candidates'][0]['content']['parts']:
if 'inlineData' in part:
data = base64.b64decode(part['inlineData']['data'])
with open('OUTPUT_PATH.png', 'wb') as f:
f.write(data)
print(f'Saved {len(data)} bytes')
break
"
The prompt may contain context references wrapped in double backticks ( ``). These point to external resources.
<@figure: a diagram based on the architecture in ``system.md``> — read system.md for context.<@figure: pipeline diagram, save to ``figures/pipeline.png``> — save to figures/pipeline.png. delimiters from the output.GEMINI_API_KEY is not set, warn the user and skip.python (not python3) for base64 decoding. ``) in the prompt before generating.npx claudepluginhub a554b554/reactant --plugin reactantGenerates AI images using Google Gemini for UI placeholders, documentation illustrations, diagrams, icons, logos, and design assets.
Generates AI images via Gemini API for artwork, photos, banners, logos, thumbnails. Configures models and aspect ratios like 16:9 or 1:1. Requires GEMINI_API_KEY and Python 3.
Generates and edits images using Gemini CLI image models for blog featured images, YouTube thumbnails, icons, diagrams, patterns, illustrations, and visuals. Activates on create, generate, make, draw, design, or edit image requests.