cadquery

cadquery is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 47 tokens per session (2,689 once invoked), scanned A, original, MIT.

A Python library for creating adjustable 3D computer-aided design models from code. It can generate parts and export them in formats such as STEP and STL.

In plain words
What is it for?
Use it to script 3D parts, build parameter-based designs, optimize dimensions, create assemblies, and export models for manufacturing or other 3D tools.
Why use it?
It lets you change dimensions and design rules in code, so you do not have to redraw similar parts by hand. This is useful when designs need repeated adjustments or automated generation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to script 3D parts, build parameter-based designs, optimize dimensions, create assemblies, and export models for manufacturing or other 3D tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/cadquery
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill cadquery
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cadquery

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/cadquery/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/cadquery)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/cadquery"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/cadquery/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cadquery

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/cadquery"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/cadquery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.02689
Opus 5 $0.00023 $0.01345
Sonnet 5 $0.00009 $0.00538
Haiku 4.5 $0.00005 $0.00269

Measured yesterday against content hash 9f7a8f9b0c39, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cadquery scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cad/cadquery/SKILL.md · 289 lines

How it starts

The opening of the file, as written. The whole thing — 289 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: https://github.com/CadQuery/cadquery

官方文档: https://cadquery.readthedocs.io/en/latest/

GUI: CQ-editor(https://github.com/CadQuery/CQ-editor

许可证: Apache-2.0

概述

CadQuery 与 OpenSCAD 的对比:

维度 OpenSCAD CadQuery
语言 自有 DSL Python
几何内核 CGAL/Manifold OCCT
模型 CSG(实体加减) BREP(带圆角/曲面/约束)
装配 手动 内置 Assembly
特征命名 通过 Selector 访问面/边/顶点
输出 STL/OFF/DXF STEP/IGES/STL/glTF/DXF/SVG

安装

# Conda(推荐,自动带 OCCT)
conda install -c conda-forge cadquery
# pip
pip install cadquery
# 安装 GUI
pip install cq-editor

当前稳定版参见 CadQuery GitHub Releases。pip 支持 Python 3.9–3.12,conda-forge 可扩展至 3.13+(经由 cadquery-ocp,基于 OCCT)。


Hello CadQuery

import cadquery as cq

result = (
    cq.Workplane("XY")
      .box(80, 60, 10)            # 立方体
      .faces(">Z").workplane()     # 选择 +Z 面,建立工作平面
      .hole(8)                    # 钻孔
      .edges("|Z").fillet(2)      # Z 方向边圆角 2
)

cq.exporters.export(result, "out.step")
cq.exporters.export(result, "out.stl")

工作平面(Workplane)

wp = cq.Workplane("XY")               # XY/YZ/XZ 或自定义
wp = (cq.Workplane("front")           # 命名平面
        .center(10, 0)                # 偏移工作平面原点
        .rotateAboutCenter((0,0,1), 30))

二维草图与拉伸

result = (cq.Workplane("XY")
            .moveTo(0, 0)
            .lineTo(50, 0)
            .lineTo(50, 30).lineTo(0, 30).close()
            .extrude(20))

# 圆形 → 拉伸为圆柱
cyl = cq.Workplane("XY").circle(10).extrude(50)

# 矩形阵列
plate = (cq.Workplane("XY").rect(100, 60).extrude(2)
          .faces(">Z").workplane()
          .rarray(10, 10, 8, 5).hole(3))   # 8x5 阵列孔

Selector(核心特性)

result = result.faces(">Z")        # 最大 Z 的面
              .edges("|X")         # 平行 X 方向的边
              .vertices("<Y")       # 最小 Y 的顶点
              .faces("not >Z and %CIRCLE")  # 复合

Read the full file on GitHub · 289 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed eaeb1cfea41c
  2. 11d ago First seen · 289 lines · 47 tokens per session scan A 9f7a8f9b0c39

Subscribe to this mod's changes

cadquery is a skill published in the GitHub repository znlgis/opengis-skills (60 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 2,689 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.