vibegameengine/web-starter-kit/source-part-segmentation
Claude Code and agent skill by vibegameengine/web-starter-kit
- community
Checking that the SKILL.md file is still in the repository.
Segment overlapping visual parts from source images, wireframes, texture atlases, and decals before mesh reconstruction. Use when a mascot/logo/template contains touching or overlapping components and exact structural part masks are needed before contour-to-mesh, UV fitting, or landmark repair.
Install
npx vskill@latest install vibegameengine/web-starter-kit/source-part-segmentationSKILL.md
The same SKILL.md was published earlier as vibegameengine/web-starter-kit/source-part-segmentation.
Source Part Segmentation
Use this before contour-to-mesh when a source image contains overlapping or touching designed parts. The output is not “nice masks”; it is a source-of-truth part inventory that downstream geometry must obey.
Inputs
- source image, wireframe, decal, or texture atlas;
- optional manual seed manifest with named parts, polygons, seed points, rough rectangles, or HSV/color ranges;
- source manifest with structural/decorative/context classification and expected part count.
Workflow
- Choose the cleanest modality: alpha, edge, dark-line, bright-on-dark, color-band, or atlas region.
- Extract contours and hierarchy to identify candidate objects, holes, nested details, and strokes.
- If components touch, run distance-transform marker watershed first.
- If watershed over/under-splits, switch to seeded segmentation:
- create named part seeds (
bbox,polygon, orseed_point+ optional flood/HSV tolerance); - save one mask per named structural part;
- mark ambiguous overlaps explicitly instead of merging them.
- Classify masks as
structural,decorative,face_feature,aura_context, orvalidation_only. - Pass structural masks to
contour-to-mesh; pass feature masks/landmarks tolandmark-fit-repair; pass atlas regions toatlas-uv-fitting.
Hard rules
- Do not infer repeated parts from symmetry; segment what the source shows.
- Do not merge overlapping components if the manifest expects separate structural meshes.
- Do not proceed to final modeling when part count differs between source images; write a conflict report or canonical policy.
- If automatic segmentation is ambiguous, write an ambiguity report and require or create manual seed rectangles/points.
- Keep stroke/line masks separate from filled-part masks; wireframe strokes are guides unless explicitly used as the contour boundary.
Seed manifest schema
Allowed mode values: polygon, bbox, non_background, dark_lines, bright_on_dark, hsv_range.
Scripts
scripts/segment_source_parts.pyproduces component masks and a JSON report from an image, with optional watershed.scripts/seeded_part_masks.pyconverts a named seed manifest into deterministic named masks and a part inventory.
Sources distilled
- OpenCV contours/hierarchy/moments are the base measurement layer.
- OpenCV distance transform + marker watershed is the first automated split method for touching components.
- Active contour refinement can improve a rough mask boundary after segmentation.
Edge treatment
Chamfer every edge that is not deliberately sharp: a perfectly sharp arris is one pixel wide at every distance, so it aliases when the camera moves and disappears when it stops. The sizes, the exceptions, and the reason they are optical rather than decorative are in `../_conventions/edge-treatment.md` — one copy, because a rule kept in seventeen places is a rule that is right in some of them. Treat its figures as a default for metre-scale work and set your own if your project's scale or look differs.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/skills/source-part-segmentation/SKILL.md
Popularity
- Repository stars
- 117
- Repository forks
- 22
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vibegameengine/web-starter-kit/source-part-segmentation)