About segment-image
segment-image is a skill for identifying objects and creating image masks with Gemini vision. It is intended for image analysis and object extraction tasks, with a command-line script and a custom segmentation prompt option.
Key features
- 01Identify objects in images
- 02Create masks for selected objects
- 03Segment images into regions
- 04Set a custom segmentation prompt
- 05Choose an output directory
Use cases
- 01Identify people or vehicles in a photo
- 02Create masks for objects in an image
- 03Separate an image into regions
- 04Extract objects for further use
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ b-open-io/ gemskills --skill segment-imageAfter installing, type/segment-imagein Claude Code to confirm it loaded.
Bundled files.clawnet/unsigned-skill.jsonscripts/segment.ts
Details
From the project READMESegment 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.