onshape

Guides Claude through building Onshape CAD models via the onshape-mcp plugin protocols.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/adityacodepublic/onShape-cad --skill onshape-adityacodepublic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: onshape
Source: https://github.com/adityacodepublic/onShape-cad/tree/main/skills/onshape
Command: npx skills add https://github.com/adityacodepublic/onShape-cad --skill onshape-adityacodepublic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Driving Onshape CAD through an MCP plugin fails silently without the right protocols: sketches drift, REMOVE extrudes cut into air, variables get wiped, and regen errors go unnoticed. This Skill encodes the render-first, entity-first, and regen-check workflows that keep parametric CAD builds correct. ## Core Features & Use Cases - Render-first verification: After every feature, call describe_part_studio, verify the feature tree and mass properties in text, then inspect the iso render and crop into suspicious regions. - Sketch discipline: Choose coordinate-first sketches for simple geometry or constraint-first sketches with the 14 constraint types for drawing transcription, and iterate with edit_sketch instead of rebuilding. - Entity-first targeting: Use list_entities to pick faces and edges by type, normal axis, and position before filleting, chamfering, or mating. - Parametric variables: Manage Variable Studios as separate elements, upsert variables by name, and avoid the known-broken variableCenter path. - FeatureScript escape hatch: Write custom features for threads, lofts, sweeps, and helical cuts when primitive tools cannot express the geometry. - Use Case: A user asks Claude to model a NEMA 17 motor mount from a drawing. The Skill walks through setting up a Variable Studio, building a constraint-first sketch, extruding with the correct direction, verifying via describe_part_studio, and reparametrizing to NEMA 23 by changing a few variable values. ## Quick Start Load this skill before building anything in Onshape so the MCP tool surface, unit conventions, and verification protocols are in context.

Frequently Asked Questions about onshape

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

FAQPage Schema
How do I build a parametric Onshape part with Claude and MCP?

Create a Variable Studio element first, then set variables with set_variable and reference them as #name in sketch tools. Build features incrementally, calling describe_part_studio after each one to verify the feature tree and mass properties before continuing.

How do I choose between coordinate-first and constraint-first sketches in Onshape?

Use coordinate-first sketches for simple geometry with one to three primitives like mounting plates or single holes. Use constraint-first sketches with the 14 constraint types when transcribing drawings that specify tangencies, concentricities, or dimensional chains.

Why does my Onshape REMOVE extrude cut nothing?

The default extrude direction follows the sketch normal, which points away from the material on a picked face, so the cut removes nothing and returns INFO. The plugin auto-sets oppositeDirection=true for REMOVE extrudes on picked faces; pass oppositeDirection explicitly to override.

When should I use FeatureScript instead of Onshape MCP primitive tools?

Use FeatureScript via write_featurescript_feature for threads, lofts, sweeps, helical cuts, drafts, and variable-radius fillets that have no primitive tool. Check the fs-cookbook for proven snippets before authoring from scratch, since direct authorship often burns many turns on regen errors.

Why do my Onshape variables disappear after setting them?

Variables live in a separate Variable Studio element, not the Part Studio, so reading variables from the Part Studio element returns an empty list. Older set_variable calls replaced the entire Variable Studio contents; the current version upserts by name, so verify the studio still contains all expected variables.

What are the limitations of the Onshape sketch constraint solver via API?

Onshape's REST API returns no per-constraint diagnostics when a solve fails, only SKETCH_SOLVE_FAILED warnings. Recovery requires client-side bisection: give every constraint an explicit id and use edit_sketch with removeIds to binary-search the conflicting constraints.