运维审查
- 作者仓库星标 5,552
- 作者更新于 实时读取
- 作者仓库 text-to-cad
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @earthtojake · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- Python
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: cad
description: Create, modify, inspect, and validate STEP-first build123d/Python CAD parts and assemblies. Use…
category: 工程开发
runtime: Python
---
# cad 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Purpose / Use this skill when / Default assumptions”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Purpose / Use this skill when / Default assumptions”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Purpose / Use this skill when / Default assumptions”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: cad
description: Create, modify, inspect, and validate STEP-first build123d/Python CAD parts and assemblies. Use…
category: 工程开发
source: earthtojake/text-to-cad
---
# cad
## 什么时候使用
- 把工程方向的常用动作沉淀成 Agent 可调用的技能 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Purpose / Use this skill when / Default assumptions」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "cad" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Purpose / Use this skill when / Default assumptions
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} CAD generation, inspection, and validation
Provenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.
Purpose
Create or modify parametric CAD models from natural-language requirements, generate validated STEP/STP artifacts, inspect geometry references, and return checked outputs. Treat STEP as the primary CAD artifact. Treat DXF, STL, 3MF, and native GLB as secondary workflows that branch from, or accompany, a STEP-first process. For assemblies, prefer source-level build123d joints and named mating datums when the parts have functional assembly relationships.
Use this skill when
Use this skill when the user asks for CAD files, STEP/STP files, build123d source, @cad[...] references, mechanical parts, assemblies, enclosures, brackets, fixtures, holes, counterbores, countersinks, slots, pockets, bosses, standoffs, ribs, fillets, chamfers, shells, source-level joints, mating, or measurements.
Also use it when the user asks for DXF, STL, 3MF, or native GLB output from CAD geometry. Keep those workflows secondary and load dxf.md or supported-exports.md for details.
Do not use this skill for render-only concept art, CAM toolpaths, engineering certification, FEA conclusions, architectural BIM, or freehand illustration unless the user also needs CAD geometry.
Default assumptions
Use these defaults unless the user specifies otherwise. These are first-pass modeling defaults, not manufacturability, tolerance, or certification claims:
- Units: millimeters.
- Origin: center of the main part or assembly unless a mating interface or fixed root component suggests a better origin.
- Base plane: XY.
- Up/extrusion axis: positive Z.
- Output geometry: closed, positive-volume solids unless the user requests surfaces or construction geometry.
- STEP structure: one valid solid, a compound of solids, or a labeled assembly compound.
- Assembly structure: fixed root part, part-local frames, named mating datums, build123d joints where applicable, and explicit generated placements.
- Small plastic enclosure wall: 2.0-3.0 mm when unspecified.
- Cosmetic fillet: 1.0-3.0 mm when safe for local geometry.
- M3/M4/M5 normal clearance holes: 3.4/4.5/5.5 mm unless another standard is requested.
Ask one focused clarification question only when missing information makes the model impossible, fit-critical, safety-critical, or compliance-bound. Otherwise proceed with explicit assumptions.
Natural-language specs only
Do not ask the user to provide a JSON specification and do not make JSON the user-facing workflow. Convert the user's prose into an internal CAD brief with dimensions, features, assumptions, output paths, and validation criteria. Use references/natural-language-specs.md for brief-writing patterns.
Root model
Keep these roots separate:
- CAD skill directory: this folder. Tool launchers live here as
scripts/step,scripts/snapshot,scripts/inspect, andscripts/dxf. - Tool process cwd: relative CAD targets are resolved from the command's current working directory. Use absolute target paths when running from the skill directory, or run from the workspace root and invoke the launchers with a path to this skill directory.
Short command examples in this skill use launcher paths relative to the CAD skill directory. Adapt the launcher path or target path so project CAD files resolve from the intended workspace, not accidentally under the skill directory.
Prefer keeping a STEP output and its Python generator in the same directory so the source stays easy to discover. Unless the user explicitly requests otherwise, keep the STEP basename and generator basename the same even when they cannot live side by side.
Available tools
From the CAD skill directory, the launcher shape is:
python scripts/step ...
python scripts/snapshot ...
python scripts/inspect ...
python scripts/dxf ...
Use the active project Python interpreter. Treat python in examples as an interpreter placeholder; if bare python is unavailable or lacks dependencies, substitute python3, a project virtualenv interpreter, or the configured interpreter path while keeping the root model above explicit.
Use python scripts/<tool> --help for the complete current command interface; reference docs show recommended workflows, not every flag.
Required workflow
- Classify the task. Identify whether this is a new part, new assembly, source modification, direct STEP/STP inspection, reference selection, measurement/mating check, snapshot review, or secondary output request.
- Load only the needed references. Use the triggers below instead of reading the whole reference set.
- Create a natural-language CAD brief. Extract dimensions, units, coordinate convention, feature intent, output paths, assumptions, and validation targets.
- Check named purchasable components. When an assembly includes named off-the-shelf actuators, servos, motors, electronics boards, connectors, or other purchasable components, search
$step-partsbefore creating simplified placeholder geometry. If no exact match is found, record the miss and then use a documented envelope. - Plan before coding. Define parameters, labels, source paths, expected bounding boxes, and any mating/positioning datums before editing.
- Edit source, not generated artifacts. Prefer build123d Python with
gen_step()for STEP generation. - Generate explicit targets. Use
scripts/stepfor STEP/STP generation, GLB/topology artifacts, and sidecars. When a Python generator exists, its GLB/topology artifact is Python-backed even when the STEP is also written. Use--kind partor--kind assemblyonly for direct STEP/STP imports. Use--skip-step-writeonly when explicitly generating a Python-backed GLB/topology artifact without writing STEP. Do not run directory-wide generation. - Validate geometrically. Use
scripts/inspect refs --facts --planes --positioning, then targetedmeasure,mate,frame, ordiffwhen needed. - Verify primary STEP visually with snapshots. After creating or visibly updating a primary STEP/STP part or assembly, ALWAYS run CAD
scripts/snapshotagainst the primary STEP/STP artifact for visual verification/review. Do not skip snapshots for speed, convenience, confidence, or because deterministic checks passed. Skip only whenreferences/snapshot-review.mdsays no visible geometry changed or no valid artifact exists, and report that reason. Use PNGs for static reviews and GIFs for motion/animation reviews;scripts/inspect, measurements, mating checks, frames, and diffs are complementary, not replacements. - Repair and rerun. If a check fails, change the smallest responsible source section, regenerate, and rerun the failed validation.
Handoff
After completing CAD work that creates or modifies .step, .stp, .stl, .3mf, .dxf, or native .glb artifacts, you must ALWAYS hand the explicit file path(s) to $cad-viewer when that skill is installed. $cad-viewer must start CAD Viewer if it is not already running and return link(s) to the relevant created or updated file(s); include those live viewer link(s) in the final response. If $cad-viewer is unavailable or startup fails, report that instead of silently omitting the handoff.
When verification snapshots are generated, also include the saved PNG/GIF snapshot(s) in the final response. If no snapshot applies, or if snapshot generation fails, say why and report the deterministic validation that still ran.
Non-negotiables
- Treat generated STEP/STP, STL, 3MF, GLB/topology, DXF outputs, and render sidecars as derived artifacts.
- Keep STEP as the primary validated CAD artifact; DXF/STL/3MF are secondary unless the user explicitly says otherwise.
- When a Python generator exists, run
scripts/stepon the generator. Use a direct STEP/STP target only when the generator is unavailable or the user explicitly identifies that STEP/STP file as the target. - Use named parameters, closed solids, explicit labels, and source-controlled geometry intent.
- Author assembly positioning in source with part-local datums, explicit
Locationtransforms, or build123d joints. Treat CLIinspect mateas read-only validation, not as a source-editing API. - Do not use
git status,git diff, or file-size churn as CAD comparison for large exported STEP/STP, GLB/topology, STL, 3MF, or DXF artifacts. Compare source changes,scripts/inspectsummaries, primary STEP/STP CADscripts/snapshotoutputs, or generated topology output instead; use path-limited git status only for bookkeeping. - Report only checks that actually ran or are directly supported by tool output.
- If
$cad-vieweris unavailable or fails, say so and rely on CLI inspection for validation.
Progressive references
Load these files only when their trigger applies:
references/natural-language-specs.md— converting prose requirements into a CAD brief without requiring user JSON.references/parameters.md— parameter, control, and animation design best practices.references/step-generation.md— STEP generation, direct STEP/STP targets, part-vs-assembly behavior, and post-generation inspection.references/inspection-and-validation.md— validation gates,@cad[...]refs, facts, planes, topology, measurements, mating, diff, frame, and final validation reporting.references/snapshot-review.md— risk-based snapshot triggers, small snapshot packets, targeted visual views, multimodal critique, and converting visual findings into geometry checks.references/positioning.md— part-local datums, assembly transforms, build123d joints, CLI mate validation, and positioning reports.references/dxf.md— secondary DXF workflow.references/supported-exports.md— secondary STL/3MF/native GLB sidecar workflows.references/build123d-modeling.md— build123d modeling patterns, topology, selectors, features, assemblies.references/repair-loop.md— diagnosis and repair procedures.
Final responses should include generated files, returned $cad-viewer viewer links, verification snapshots, validation actually run, assumptions, and caveats. Use references/inspection-and-validation.md for report structure.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核