playground-examples

Automate brepjs CAD playground example authoring and validation gate compliance.

77|7|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/andymai/brepjs --skill playground-examples
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playground-examples
Source: https://github.com/andymai/brepjs/tree/main/.claude/skills/playground-examples
Command: npx skills add https://github.com/andymai/brepjs --skill playground-examples

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Contributing new or fixed examples to the brepjs browser-based CAD playground requires passing three strict validation gates (type checking, geometry meshing, and thumbnail generation), and missing any single gate breaks continuous integration or the public example gallery, creating a tedious, error-prone workflow for contributors.

Core Features & Use Cases

  • Full example authoring workflow: Guides contributors through adding new examples to the correct category file or registering new categories in the example barrel index.
  • Three-gate validation enforcement: Details exact commands, success criteria, and troubleshooting for each mandatory validation gate: type checking against ambient TypeScript definitions, geometry meshing via the OCCT kernel test harness, and committed .webp thumbnail generation for the public gallery.
  • Failure triage and edge case handling: Provides clear symptom-cause-fix mappings for common issues like stale ambient types, silent geometry fallback errors, missing thumbnails, and multi-body assembly connectivity checks.
  • Real-world use case: For example, if a contributor's new mechanical assembly example fails the geometry gate due to a silent fillet fallback, this skill guides them to replace the fallback pattern with unwrap() to ensure failures are caught during testing, and add the example to the connected body check list if it is a multi-body mechanism.

Quick Start

Use this skill to add or fix a brepjs playground example so it passes all three required validation gates and is ready for merge.

Frequently Asked Questions about playground-examples

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my brepjs playground example fail the continuous integration geometry check?

Your brepjs playground example fails the geometry gate when a silent geometry fallback occurs during OCCT kernel meshing. Replacing the silent fallback pattern with unwrap() ensures failures are caught and resolved during testing.

How do I generate .webp thumbnails for a CAD playground example gallery?

To generate .webp thumbnails for a CAD playground example gallery, use the provided helper scripts for thumbnail capture and commit the generated .webp files directly to pass the required thumbnail validation gate.

How to fix stale ambient TypeScript definitions when adding new playground examples?

Fix stale ambient TypeScript definitions by running the provided helper scripts for type generation before type checking. This updates the ambient definitions to ensure your new playground example string passes the validation gate.

What are the required validation gates to pass CI for brepjs example contributions?

The required validation gates for brepjs example contributions are type checking against ambient TypeScript definitions, geometry meshing via the OCCT kernel test harness, and committed .webp thumbnail generation for the public gallery.

How do I add a multi-body mechanical assembly to the brepjs playground?

Add a multi-body mechanical assembly to the brepjs playground by registering it in the example barrel index and adding it to the connected body check list to ensure connectivity passes the geometry validation gate.