Agent skill

Gen Part

by partcad in partcad/partcad

Generate a PartCAD part from a natural-language description (and optional reference images/requirements) by authoring a CAD script and validating it with the PartCAD CLI.

Apache-2.0Auto-check passedGame Development

Install Gen Part

skills CLI
$ npx skills add partcad/partcad --skill gen-part -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install partcad/partcad gen-part --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/partcad/partcad.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ai-agents/common/skills/gen-part .claude/skills/gen-part && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gen-part
GitHub stars
503
Token cost
~1.9k tokens
SKILL.md length
1,049 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Generate a PartCAD part from a natural-language description (and optional reference images/requirements) by authoring a CAD script and validating it with the PartCAD CLI.

  • Works in 8 steps: Understand the request → Make sure PartCAD is available → Choose a representation → …
  • The user asks to generate
  • SKILL.md covers 1. Understand the request, 2. Make sure PartCAD is…, 3. Choose a representation and 4. (Optional) Plan the geometry, plus 4 more sections
  • Calls python

What it does

Gen Part is an agent skill from partcad/partcad. Generate a PartCAD part from a natural-language description (and optional reference images/requirements) by authoring a CAD script and validating it with the PartCAD CLI. Use for /pc:gen-part or when the user asks to generate, create, or model a single mechanical part.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering 3D graphics and WebGL. It works with Python. The repository describes itself as: Package manager for things. Start designing modular hardware! PartCAD is the standard for documenting manufacturable physical products (a.k.a. Digital Thread or TDP). It comes… The licence is Apache-2.0.

When your agent uses it

  • The user asks to generate
  • Model a single mechanical part

Example prompts

  • “/gen-part”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Understand the request
  2. Make sure PartCAD is available
  3. Choose a representation
  4. (Optional) Plan the geometry
  5. Author, register, and mark it
  6. Validate
  7. Render it from several angles, compare, and iterate
  8. Finalize

What it can do on your machine

Read from SKILL.md and the folder at commit e08683a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gen Part loads about 1.9k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 1,049 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from partcad/partcad at commit e08683a, republished under its Apache-2.0 licence (© partcad). 1,049 words, ~1,917 tokens.

Download SKILL.mdSave it as .claude/skills/gen-part/SKILL.md (or your agent's skills folder).
name
gen-part
description
Generate a PartCAD part from a natural-language description (and optional reference images/requirements) by authoring a CAD script and validating it with the PartCAD CLI. Use for /pc:gen-part or when the user asks to generate, create, or model a single mechanical part.

pc:gen-part

Generate one PartCAD part. The text after the command ($ARGUMENTS) is the part description — what to build. You author the CAD script yourself and prove it works with the PartCAD CLI; do not use any built-in ai-* part type or generation pipeline. Hard requirement: the finished part passes pc test (its geometry instantiates cleanly).

Steps 4–7 are the reference flow — the same shape the legacy pc add part --ai pipeline used (plan geometry → write script → validate → compare → refine). Treat it as a strong default, not a script: skip, reorder, or replace steps as the part warrants, but always finish by validating.

1. Understand the request

  • $ARGUMENTS is the description. Read it and any requirements, and view reference images directly. Ask the user to clarify only genuinely load-bearing ambiguities; otherwise proceed and state your assumptions.
  • Work in millimeters and degrees unless told otherwise.

2. Make sure PartCAD is available

Resolve a command as /pc:init does (pc, then partcad, then python -m partcad_cli.click.command). If none is found, stop and run /pc:setup executable first.

3. Choose a representation

Pick the script kind that best fits the part — you decide:

KindGood for
build123dgeneral parametric solids (recommended default)
cadqueryfluent / CSG-style modeling
scad (OpenSCAD)simple constructive geometry, no Python
sdforganic / implicit shapes

4. (Optional) Plan the geometry

For anything non-trivial, sketch the constructive-solid-geometry plan first — coordinate system, primitives with dimensions/positions/orientations, then unions/differences/intersections and fillets/chamfers. This mirrors the legacy "CSG" step and usually cuts iterations. Skip it for simple parts.

5. Author, register, and mark it

Write the script file first from $ARGUMENTS (plain type — never ai-*), then register it — pc add part requires the file to already exist:

sh
pc --no-ansi add part --desc "<the description>" <kind> <name>.<ext>   # e.g. build123d bracket.py

Language conventions for the script:

  • build123d / cadquery / sdf (Python): import everything you use (including math and the library itself); call show_object(<result>) to expose the part; do not export anything. For cadquery, avoid tetrahedron / hexahedron.
  • OpenSCAD: a complete script defining all functions and constants; no external modules; no export.

Then mark the part not manufacturable in partcad.yaml — a generated part is not a catalog/supplier item, and this is what lets pc test pass:

yaml
parts:
  <name>:
    type: <kind>
    path: <name>.<ext>
    desc: <the description>
    manufacturable: false

If the part was modelled from reference images — a drawing, a photo, a sketch — name them under images: as well, as paths relative to the package. That is what puts them beside the part in the README pc render writes, so a reader sees what the model was made to match; nothing else reads them.

yaml
    images:
      - drawing.png
      - photo.jpg

If you started the project with pc init, also delete the empty sketches: and assemblies: sections it leaves — a null section crashes pc render on older PartCAD (fixed in partcad/partcad#470).

6. Validate

pc test is the build gate: with manufacturable: false, its CAD check passes only if the geometry instantiates cleanly, and the manufacturability checks are skipped.

sh
pc --no-ansi test <name>

Three of its checks fail geometry that instantiates perfectly, and all three are about a part that would look right in the pictures rendered below: shell (the part is a surface rather than a body — the faces do not close, so it has no inside and every boolean against it is meaningless), degenerate (it has no size left in some direction) and solidity (its faces are oriented inward, so its volume is negative). None of them can be turned off on the part — there is no such setting, and inventing one is rejected by pc lint. Fix the geometry: close the shape, keep the feature that collapsed, orient the faces outward. A part that fails one of these is a part nothing downstream can compute with, however good the picture of it looks.

Show full SKILL.md (455 more words)Show less

7. Render it from several angles, compare, and iterate

pc test proves the geometry instantiates. It says nothing about whether the geometry is the part that was asked for — that is decided by looking at it.

One picture is not enough to decide it. A projection hides everything behind it, so a hole in the wrong face, a feature on the wrong side, a chamfer that never got cut, or a shape that is right in outline and wrong in depth all survive the one view that happens to conceal them. Render four: front, top and right to read proportions and dimensions off, and iso to see how the features go together. A rendered file is named after the object, so give each view a directory of its own or they overwrite each other:

sh
for view in front top right iso; do
  mkdir -p /tmp/pc-render/$view                  # -O expects it to exist
  pc --no-ansi render -t png --view $view -O /tmp/pc-render/$view <name>
done

Then view all four — /tmp/pc-render/<view>/<name>.png — and compare them against the description and any reference images:

  • the overall form and the bounding size, in all three axes;
  • every dimension the description states — each is measurable in one of the orthographic views, and a dimension no view confirms is one still assumed;
  • every feature that was asked for, on the face it was asked for, and nothing present that was not.

Add back, left or bottom whenever the part is not symmetric about the axis in question: an asymmetric part has a face you have not seen, and a face you have not seen is a face you are guessing about. When no named view shows the feature you need to check, --viewport-origin X,Y,Z and --viewport-up X,Y,Z look from an arbitrary direction. /pc:render covers these options in full.

Fix any error or mismatch, then re-test and re-render. Iterate until every view matches — no fixed retry count. If the part is right and the numbers are what need checking, /pc:describe renders a dimensioned drawing of it.

8. Finalize

Summarize what you built — key dimensions and assumptions — and how to view it: pc ide view <name>.

If the part is meant to connect to something — a bolt pattern, a plug, a rail — say so and offer /pc:add-interfaces, which adds the ports and interfaces that let PartCAD mate it automatically. Once it has them, --with-all draws them on the very views you have been comparing against, so a port that is in the wrong place or facing the wrong way is visible rather than inferred:

sh
for view in front top right iso; do
  mkdir -p /tmp/pc-render/ports/$view
  pc --no-ansi render -t png --view $view -O /tmp/pc-render/ports/$view --with-all <name>
done

Four views again, and for the same reason: a port is a coordinate frame, and one projection collapses the axis it is offset along just as it does for geometry. --no-ansi because every port drawn is also named on stderr, which is where the exact string to write in an ASSY file comes from. /pc:add-interfaces covers reading these drawings in full.

© partcad, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in ai-agents/common/skills/gen-part of partcad/partcad.

Open the folder on GitHubat commit e08683a

Compare with similar skills

Gen Part next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gen Part compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gen Part this skillpartcad/partcad503—~1.9kAutomated safety check: PassApache-2.0
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Bambu Studio AIheyixuan2/bambu-studio-ai220—~4.3kAutomated safety check: PassMIT
Text To 3D AssetLaurentiuGabriel/unreal-game-assets-creation-skill148—~2.1kAutomated safety check: PassNone
Build123drawwerks/VibeCAD121—~1.4kAutomated safety check: NotesMIT
SimplecadapiPhySpace/SimpleCADAPI142—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Bambu Studio AI

    heyixuan2/bambu-studio-ai

    End-to-end 3D printing for Bambu Lab printers. An agent skill from heyixuan2/bambu-studio-ai.

    220 GitHub stars~4.3k tokensUpdated 19 days ago
    Game DevelopmentAuto-check passed
  • Text To 3D Asset

    LaurentiuGabriel/unreal-game-assets-creation-skill

    Generate a game-ready 3D asset by running the local AI pipeline sequentially: Fooocus (SDXL text-to-image) - Hunyuan3D-2 (image-to-textured-GLB) - optional Blender FBX convert + Unreal import.

    148 GitHub stars~2.1k tokensUpdated 2 mo ago
    Game DevelopmentAuto-check passed
  • Build123d

    rawwerks/VibeCAD

    CAD modeling with build123d Python library. An agent skill from rawwerks/VibeCAD.

    121 GitHub stars~1.4k tokensUpdated 9 mo ago
    Game DevelopmentAuto-check: notes
  • Simplecadapi

    PhySpace/SimpleCADAPI

    Build, assemble, inspect, reconstruct, and export parametric CAD models with the SimpleCADAPI Python SDK.

    142 GitHub stars~2.5k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Blender Web Export Pipeline

    freshtechbro/claudedesignskills

    Exports and optimizes Blender 3D models and animations for the web as glTF, covering batch Python scripting, texture baking, decimation and LOD generation for Three.js and Babylon.js.

    1k GitHub stars~4.2k tokensUpdated 10 mo ago
    Game DevelopmentAuto-check passed

More from partcad/partcad

All 12 skills in this repo
  • Add Interfaces

    partcad/partcad

    Enrich an existing PartCAD part with connection interfaces and ports (mating metadata) so it can be mated to other parts automatically.

    503 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Convert

    partcad/partcad

    Convert a CAD file or a PartCAD object to another geometry format - STEP, BREP, STL, 3MF, OBJ, IGES, glTF, three.js, SVG, DXF, URDF, ASSY - with pc convert for an object a package declares (which…

    503 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Describe

    partcad/partcad

    Write a narratable, accessibility-oriented text description of an existing PartCAD part, assembly, or sketch from its measured bounding box and volume, from renders taken at several viewing angles…

    503 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Export

    partcad/partcad

    Write a CAD file out of an object a PartCAD package declares - STEP, BREP, STL, 3MF, OBJ, IGES, glTF, three.js, URDF for 3D, SVG or DXF for a sketch, or a file type the package implements itself -…

    503 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Gen Sketch

    partcad/partcad

    Generate a PartCAD 2D sketch from a natural-language description by authoring the sketch (build123d / cadquery / dxf / svg / basic) and validating it with the PartCAD CLI.

    503 GitHub stars~672 tokensUpdated today
    Auto-check passed
  • Init

    partcad/partcad

    Initialize a PartCAD package in the current directory by running the installed PartCAD CLI (pc init / partcad init).

    503 GitHub stars~492 tokensUpdated today
    Auto-check passed

Works with

Questions about Gen Part

What does Gen Part do?

Generate a PartCAD part from a natural-language description (and optional reference images/requirements) by authoring a CAD script and validating it with the PartCAD CLI. Gen Part is an agent skill from partcad/partcad. Generate a PartCAD part from a natural-language description (and optional reference images/requirements) by authoring a CAD script and validating it with the PartCAD CLI.

When should I use Gen Part?

Gen Part fits situations like: the user asks to generate; model a single mechanical part.

How do I install Gen Part in Claude Code?

Run `npx skills add partcad/partcad --skill gen-part -a claude-code`. Or copy the skill folder (ai-agents/common/skills/gen-part in partcad/partcad) into .claude/skills/gen-part in your project. Claude Code loads it when a task matches its description.

How do I install Gen Part in Codex?

Run `npx skills add partcad/partcad --skill gen-part -a codex`. Or copy the skill folder (ai-agents/common/skills/gen-part in partcad/partcad) into .agents/skills/gen-part in your project. Codex loads it when a task matches its description.

Can I use Gen Part in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add partcad/partcad --skill gen-part -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gen-part, .gemini/skills/gen-part, .github/skills/gen-part and .opencode/skills/gen-part in your project.

What does Gen Part need to run?

Going by SKILL.md and its folder, Gen Part needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Gen Part access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gen Part safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gen Part use?

Gen Part is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gen Part use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gen Part?

Skills that share tags, products or a category with Gen Part: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Bambu Studio AI (heyixuan2/bambu-studio-ai, 220 stars), Text To 3D Asset (LaurentiuGabriel/unreal-game-assets-creation-skill, 148 stars) and Build123d (rawwerks/VibeCAD, 121 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gen Part?

partcad (a GitHub organization) maintains it in partcad/partcad, which has 503 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

Source: partcad/partcad on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.