segment-image
This skill should be used when the user asks to "segment an image", "identify objects", "extract objects", "generate masks", "find objects in image", or needs AI-powered image segmentation.
How do I install this agent skill?
npx skills add https://github.com/b-open-io/gemskills --skill segment-imageIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides image segmentation capabilities using Google Gemini. It processes local images and user-supplied prompts. The analysis identified potential attack surfaces for indirect prompt injection and dynamic path resolution for module imports, which are standard for this vendor's infrastructure.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerpass
2/2 files flagged
What does this agent skill do?
Segment Image
Segment and identify objects in images using Gemini's vision capabilities.
When to Use
Use this skill when the user asks to:
- Identify objects in an image
- Generate masks for specific objects
- Segment an image into regions
- Extract objects from an image
Usage
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/segment-image/scripts/segment.ts <input-image> [options]
Options
--prompt <text>- Custom segmentation prompt--output <dir>- Output directory for mask files
Examples
# Segment all objects
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/segment-image/scripts/segment.ts photo.jpg
# Segment with custom prompt
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/segment-image/scripts/segment.ts photo.jpg --prompt "identify all people and vehicles"
# Save masks to directory
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/segment-image/scripts/segment.ts photo.jpg --output ./masks
Context Discipline
Do not read generated mask images back into context. The script outputs file paths. Ask the user to visually inspect the masks. To inspect programmatically, optimize the images first (via the optimize-images skill).
Model
Uses gemini-3.5-flash (Gemini 3 Flash) for image segmentation.
Last verified: February 2026. If a newer generation exists, STOP and suggest a PR to
b-open-io/gemskills. See the ask-gemini skill'sreferences/gemini-api.mdfor current models and Google's officialgemini-api-devskill for the canonical source.
Provider support
Gemini vision only (gemini-3.5-flash), so it needs GEMINI_API_KEY. OpenAI and xAI keys are not used by this skill.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/b-open-io/gemskills/segment-image">View segment-image on skillZs</a>