Agent skill

Gen Sketch

by partcad in 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.

Apache-2.0Auto-check passedGame Development

Install Gen Sketch

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

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

GitHub CLI
$ gh skill install partcad/partcad gen-sketch --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-sketch .claude/skills/gen-sketch && 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-sketch
GitHub stars
503
Token cost
~672 tokens
SKILL.md length
297 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

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.

  • Works in 6 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. Author and register, plus 2 more sections
  • Calls python

What it does

Gen Sketch is an agent skill from 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. Use for /pc:gen-sketch or when the user asks to generate, create, or draw a 2D sketch, profile, outline, or blueprint.

Its SKILL.md is about 670 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. 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
  • Draw a 2D sketch

Example prompts

  • “/gen-sketch”

Requirements

  • Python 3

Workflow steps

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

  1. Understand the request
  2. Make sure PartCAD is available
  3. Choose a representation
  4. Author and register
  5. Render, compare, and iterate
  6. Finalize

What it can do on your machine

Read from SKILL.md and the folder at commit b34918a. 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 Sketch loads about 672 tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 297 words of instructions outside code blocks.

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

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 b34918a, republished under its Apache-2.0 licence (© partcad). 297 words, ~672 tokens.

Download SKILL.mdSave it as .claude/skills/gen-sketch/SKILL.md (or your agent's skills folder).
name
gen-sketch
description
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. Use for /pc:gen-sketch or when the user asks to generate, create, or draw a 2D sketch, profile, outline, or blueprint.

pc:gen-sketch

Generate one PartCAD sketch — a 2D profile — from a description. You author the sketch yourself and prove it renders with the PartCAD CLI. There is no built-in ai-* sketch type; you are the model. The hard requirement: the sketch renders without errors.

The flow mirrors /pc:gen-part, adapted to 2D. Treat it as a strong default, not a script — but always finish by rendering. (Sketches are not manufacturable, so unlike parts they need no manufacturable: flag and skip the cam tests.)

1. Understand the request

$ARGUMENTS is the description. Read it and any requirements, and view reference images directly. Ask the user to clarify only load-bearing ambiguities. Work in millimeters 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

KindGood for
build123dparametric 2D sketches (recommended default)
cadqueryfluent 2D sketching
dxfa DXF outline
svgan SVG outline
basicsimple primitive-based sketches

4. Author and register

Write the sketch file first, then register it:

sh
pc add sketch <kind> <name>.<ext>       # e.g. pc add sketch build123d profile.py
  • build123d / cadquery (Python): import everything you use (including math and the library itself); expose the 2D result with show_object(<sketch>); do not export anything.
  • dxf / svg: write the outline file directly.

Record the description in the sketch's desc: in partcad.yaml. If you started the project with pc init, delete the empty null sections it leaves.

5. Render, compare, and iterate

Rendering is the build gate. Sketches render to SVG:

sh
mkdir -p /tmp/pc-render                          # the -O directory must already exist
pc render -s -t svg -O /tmp/pc-render <name>     # writes /tmp/pc-render/<name>.svg

View /tmp/pc-render/<name>.svg and compare it against the description — the outline and every stated dimension. Fix any error or mismatch, then re-render. Iterate until it is right.

6. Finalize

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

© 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-sketch of partcad/partcad.

Open the folder on GitHubat commit b34918a

Compare with similar skills

Gen Sketch 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 Sketch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gen Sketch this skillpartcad/partcad503—~672Automated safety check: PassApache-2.0
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
Bambu Studio AIheyixuan2/bambu-studio-ai223—~4.3kAutomated safety check: PassMIT
Spine AnimationGenielabsOpenSource/spine-animation-ai521—~17kAutomated safety check: PassCC-BY-NC-4.0
Unreal BridgeTornLux/UnrealBridge306—~8.4kAutomated safety check: NotesMIT

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
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 4 days ago
    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.

    223 GitHub stars~4.3k tokensUpdated 21 days ago
    Game DevelopmentAuto-check passed
  • Spine Animation

    GenielabsOpenSource/spine-animation-ai

    Create Spine 2D skeletal animations from pre-existing character assets (separated body-part PNGs, atlas spritesheet, or a full character image).

    521 GitHub stars~17k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Unreal Bridge

    TornLux/UnrealBridge

    Execute Python scripts inside a running Unreal Engine 5.3+ editor via TCP bridge.

    306 GitHub stars~8.4k tokensUpdated 9 days ago
    Game DevelopmentAuto-check: notes
  • 2D Sprite Generator

    0x0funky/agent-sprite-forge

    Produces game-ready 2D characters, creatures, props, icons and effects as master stills, sheets or clips, and exports frames for common game engines.

    4.4k GitHub stars~3.6k tokensUpdated 4 days 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 Part

    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.

    503 GitHub stars~1.9k 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 Sketch

What does Gen Sketch do?

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. Gen Sketch is an agent skill from 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.

When should I use Gen Sketch?

Gen Sketch fits situations like: the user asks to generate; draw a 2D sketch.

How do I install Gen Sketch in Claude Code?

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

How do I install Gen Sketch in Codex?

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

Can I use Gen Sketch 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-sketch -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-sketch, .gemini/skills/gen-sketch, .github/skills/gen-sketch and .opencode/skills/gen-sketch in your project.

What does Gen Sketch need to run?

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

Does Gen Sketch 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 Sketch 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 Sketch use?

Gen Sketch 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 Sketch use?

About 672 tokens (SKILL.md is roughly 2.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 Sketch?

Skills that share tags, products or a category with Gen Sketch: Image to Three.js Model (img2threejs/img2threejs, 18k stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars), Bambu Studio AI (heyixuan2/bambu-studio-ai, 223 stars) and Spine Animation (GenielabsOpenSource/spine-animation-ai, 521 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gen Sketch?

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 10, 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.