Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计通过

text-to-cad-harness文本到 cad 线束

Agent Skill

text-to-cad-harness 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,764

周安装

75

GitHub Stars

39

下载量

618
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:text-to-cad-harness(文本到 cad 线束)
来源仓库:https://github.com/aradotso/trending-skills
仓库路径:skills/text-to-cad-harness
安装命令:
npx skills add https://github.com/aradotso/trending-skills --skill text-to-cad-harness
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aradotso/trending-skills --skill text-to-cad-harness

简介

text-to-cad-harness 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在需要围绕仓库状态、代码变更或协作事项进行整理时使用。
  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 建议进一步查阅原始 README 了解实际功能和调用方式。

SKILL.md

⚙ Text-to-CAD Harness

Skill by ara.so — Daily 2026 Skills collection.

An open source harness that lets AI coding agents (Claude Code, Codex, Cursor, etc.) generate, export, and preview 3D CAD models from natural language descriptions. Models are written in Python using build123d on top of OpenCascade (OCP), exported to STEP/STL/DXF/GLB/URDF, and inspected in a local React/Vite CAD Explorer viewer.


How It Works

User prompt → Agent edits models/*.py → Python skill regenerates artifacts → Viewer previews geometry
  • models/ — Source-controlled Python CAD files (build123d scripts)
  • skills/cad/ — Bundled CAD skill (STEP, STL, DXF, GLB, snapshots, @cad[...] references)
  • skills/urdf/ — Bundled URDF skill (robot links, joints, validation)
  • viewer/ — Local React/Vite CAD Explorer (no backend required)

Installation

1. Clone the repo

git clone https://github.com/earthtojake/text-to-cad.git
cd text-to-cad

2. Set up Python CAD environment

python3.11 -m venv .venv
./.venv/bin/python -m pip install --upgrade pip
./.venv/bin/pip install -r requirements-cad.txt
Requires Python 3.11+. The requirements-cad.txt pins build123d, OCP, and all geometry dependencies.

3. Install viewer dependencies

cd viewer
npm install

4. Start the CAD Explorer

npm run dev

Open http://localhost:4178 to browse generated models.


Project Structure

text-to-cad/
├── models/                  # Your CAD source files live here
│   └── my_part/
│       ├── part.py          # build123d Python source
│       ├── part.step        # Generated STEP export
│       ├── part.stl         # Generated STL export
│       └── part.glb         # Generated GLB for viewer
├── skills/
│   ├── cad/
│   │   ├── SKILL.md         # CAD skill documentation
│   │   └── ...
│   └── urdf/
│       ├── SKILL.md         # URDF skill documentation
│       └── ...
├── viewer/                  # React/Vite local viewer
│   ├── package.json
│   └── src/
├── requirements-cad.txt     # Python dependencies
└── assets/

Writing CAD Models (build123d)

All models live under models/ as Python scripts using build123d.

Basic Part Example

# models/bracket/bracket.py
from build123d import *

with BuildPart() as bracket:
    # Base plate
    with BuildSketch(Plane.XY):
        Rectangle(80, 60)
    extrude(amount=5)

    # Vertical wall
    with BuildSketch(Plane.XZ.offset(30)):
        Rectangle(80, 40)
    extrude(amount=5)

    # Fillets on all edges
    fillet(bracket.edges(), radius=2)

    # Mounting holes
    with BuildSketch(bracket.faces().filter_by(Axis.Z).sort_by(Axis.Z)[-1]):
        with Locations((-25, -15), (25, -15), (-25, 15), (25, 15)):
            Circle(3.5)
    extrude(amount=-5, mode=Mode.SUBTRACT)

# Export
export_step(bracket.part, "models/bracket/bracket.step")
export_stl(bracket.part, "models/bracket/bracket.stl")

Running a Model to Generate Artifacts

./.venv/bin/python models/bracket/bracket.py

Parametric Part with Variables

# models/hex_spacer/hex_spacer.py
from build123d import *

# Parameters — agent edits these values
OUTER_DIAMETER = 12.0   # mm, across-flats
HEIGHT = 10.0           # mm
HOLE_DIAMETER = 5.0     # mm (M5 clearance)
WALL_THICKNESS = 2.0    # mm

with BuildPart() as spacer:
    with BuildSketch(Plane.XY):
        RegularPolygon(radius=OUTER_DIAMETER / 2, side_count=6)
    extrude(amount=HEIGHT)

    with BuildSketch(Plane.XY):
        Circle(HOLE_DIAMETER / 2)
    extrude(amount=HEIGHT, mode=Mode.SUBTRACT)

    fillet(spacer.edges().filter_by(Axis.Z), radius=0.5)

export_step(spacer.part, "models/hex_spacer/hex_spacer.step")
export_stl(spacer.part, "models/hex_spacer/hex_spacer.stl")

Assembly Example

# models/assembly/assembly.py
from build123d import *

# Base
with BuildPart() as base:
    with BuildSketch(Plane.XY):
        Rectangle(100, 80)
    extrude(amount=10)

# Post
with BuildPart() as post:
    with BuildSketch(Plane.XY):
        Circle(8)
    extrude(amount=50)

# Combine into assembly
assembly = Compound(
    children=[
        base.part,
        post.part.move(Location((0, 0, 10))),
    ]
)

export_step(assembly, "models/assembly/assembly.step")
export_stl(assembly, "models/assembly/assembly.stl")

Exporting Formats

From within any models/*.py script, use build123d export functions:

from build123d import *

# STEP — full geometry, use for CAD interchange
export_step(part, "models/my_part/my_part.step")

# STL — mesh for 3D printing / simulation
export_stl(part, "models/my_part/my_part.stl")

# DXF — 2D drawing / laser cutting
section = part.section(Plane.XY)
export_dxf(section, "models/my_part/my_part.dxf")

# GLB — viewer-compatible 3D web format
export_gltf(part, "models/my_part/my_part.glb")

URDF Robot Descriptions

The bundled URDF skill generates robot description files. See skills/urdf/SKILL.md for full docs.

URDF Example Structure

models/my_robot/
├── robot.py          # build123d geometry for each link
├── robot.urdf        # Generated URDF XML
└── meshes/
    ├── base.stl
    ├── arm.stl
    └── gripper.stl

Minimal URDF Output Pattern

<!-- models/my_robot/robot.urdf (generated) -->
<?xml version="1.0"?>
<robot name="my_robot">
  <link name="base_link">
    <visual>
      <geometry>
        <mesh filename="meshes/base.stl"/>
      </geometry>
    </visual>
  </link>
  <link name="arm_link">
    <visual>
      <geometry>
        <mesh filename="meshes/arm.stl"/>
      </geometry>
    </visual>
  </link>
  <joint name="base_to_arm" type="revolute">
    <parent link="base_link"/>
    <child link="arm_link"/>
    <origin xyz="0 0 0.1" rpy="0 0 0"/>
    <axis xyz="0 0 1"/>
    <limit lower="-1.57" upper="1.57" effort="10" velocity="1"/>
  </joint>
</robot>

CAD Explorer Viewer

The local viewer reads exported files from models/ and renders them in browser using WebAssembly (WASM).

Viewer Commands

cd viewer

# Start dev server
npm run dev          # → http://localhost:4178

# Build for static hosting
npm run build

# Preview production build
npm run preview

Viewer Features

  • Browse all models in models/ directory
  • Inspect STEP/GLB geometry in 3D
  • Copy @cad[...] geometry references for agent follow-up edits
  • Quick snapshot renders for iteration review

@cad[...] Geometry References

After generating a model, the viewer provides stable @cad[...] handles. Paste these into your agent prompt to give it geometry-aware context for precise edits.

# Example agent follow-up using a reference
@cad[models/bracket/bracket.step#face:top] — add a countersunk hole at center

Agent Workflow (Step-by-Step)

Typical session with Claude Code or Codex

1. User: "Create a parametric L-bracket with 4 mounting holes, 5mm thick"

2. Agent: creates models/l_bracket/l_bracket.py using build123d

3. Agent runs: ./.venv/bin/python models/l_bracket/l_bracket.py
   → generates l_bracket.step, l_bracket.stl, l_bracket.glb

4. User: opens http://localhost:4178, inspects the model

5. User copies @cad[...] reference from viewer

6. User: "Make the wall taller — @cad[models/l_bracket/l_bracket.step#face:wall]"

7. Agent edits WALL_HEIGHT parameter in l_bracket.py, reruns script

8. User commits models/l_bracket/ (source + artifacts together)

Common Patterns

Pattern: Slot / Cutout

with BuildPart() as panel:
    with BuildSketch(Plane.XY):
        Rectangle(100, 60)
    extrude(amount=3)

    # Horizontal slot
    with BuildSketch(Plane.XY):
        SlottedHole(length=30, radius=3, rotation=0, align=Align.CENTER)
    extrude(amount=-3, mode=Mode.SUBTRACT)

Pattern: Mirrored Geometry

with BuildPart() as symmetric_part:
    with BuildSketch(Plane.XY):
        Rectangle(40, 20)
    extrude(amount=10)
    mirror(about=Plane.YZ)

Pattern: Shelling a Solid

with BuildPart() as box:
    Box(60, 40, 30)
    # Remove top face to shell into an open container
    shell(box.faces().sort_by(Axis.Z)[-1:], thickness=-2)

Troubleshooting

ProblemFix
ModuleNotFoundError: build123dRun with ./.venv/bin/python, not system python
Viewer shows no modelsCheck that .glb files exist in models/ subdirectories
npm run dev port conflictChange port in viewer/vite.config.*
STEP export fails silentlyEnsure the part solid is valid — check for part.is_valid before export
Python 3.12+ OCP errorsPin to Python 3.11 as required by requirements-cad.txt
Fillet fails on sharp geometryReduce fillet radius or apply after all cuts

Validate a Part Before Export

from build123d import *

with BuildPart() as my_part:
    Box(50, 50, 20)

# Check validity
assert my_part.part.is_valid, "Part geometry is invalid — check for bad operations"

export_step(my_part.part, "models/my_part/my_part.step")
print(f"Exported: volume={my_part.part.volume:.2f} mm³")

Skills Reference

SkillDocsStandalone Repo
CAD (STEP/STL/DXF/GLB)skills/cad/README.mdearthtojake/cad-skill
URDF (robots)skills/urdf/README.mdearthtojake/urdf-skill

Key Dependencies

PackagePurpose
build123dPythonic 3D CAD modelling API
OCP / OpenCascadeGeometry kernel (STEP, Boolean ops)
cadqueryUnderlying geometry utilities
React 18 + Vite 7Viewer frontend
WASMIn-browser geometry rendering

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.91%
按下载量换算222

Claude

27.16%
按下载量换算168

Cursor

19.76%
按下载量换算122

Gemini CLI

8.37%
按下载量换算52

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills