SolidWorks Design
Treat this skill as the entry point for every SolidWorks task. Use the available
SolidWorks automation surface for CAD operations; this plugin supplies the
engineering and knowledge workflow rather than a SolidWorks installation.
Start the task
On the first SolidWorks request in the current Codex task, resolve the
plugin root from this file and run:
python <plugin-root>/scripts/sw_session.py start
Echo the returned UUID as SESSION_ID in working context. Run this command
only once per Codex task and never replace the ID mid-task.
Establish the design goal, units, geometry-driving dimensions, material,
tolerances or fits, manufacturing process, and deliverables.
Ask one concise question when missing data changes geometry, safety, fit, or
the requested output. Do not guess engineering values. If the user
explicitly delegates a non-geometry default, apply the active KB convention
and disclose it.
Invoke $sw-pre-start, then $sw-kb-api, in that exact order before
opening SolidWorks, generating CAD code, or calling a SolidWorks API.
Plan before editing
Write a compact implementation plan that identifies:
- files and document types to create;
- datums, origins, coordinate systems, and reference geometry;
- ordered sketches and features with named driving dimensions;
- sketch relations and the fully-defined condition;
- material, tolerance, fit, fastener, clearance, and manufacturing decisions;
- assembly mates and intended remaining degrees of freedom;
- measurable acceptance criteria and required exports.
Query the KB standards tables when each material, fit, tolerance, fastener, or
clearance decision is made. Never substitute remembered nominal values when a
standards lookup is available.
Build and verify parts
Create each part separately. For every part:
- Use metric model units unless the user explicitly overrides them.
- Build parametric, fully-defined sketches with stable references and named
dimensions.
- Rebuild after meaningful feature groups and inspect returned API values.
- Before each SolidWorks API method, check the part-specific and global known
errors loaded by
$sw-kb-api; apply a resolved prevention first.
- Assign the verified material and record its source and units.
- Inspect rebuild status, document errors, feature tree, mass properties,
bounding box, and a representative image.
- Use deterministic document validation as pass/fail. Treat screenshots as
visual evidence only.
- Save the native part, export requested formats, then close it before
starting an assembly.
Do not report success when rebuild or document validation has not passed.
Build and verify assemblies
Create an assembly only after all component parts are saved and closed.
Insert components from explicit saved paths, add mates in a stable order, and
verify mate status, interference or clearance requirements, component count,
and remaining degrees of freedom. Rebuild and run deterministic document
validation before saving or exporting.
Drawings and exports
Create requested drawings from the validated final model. Include specified
views, dimensions, tolerances, fits, GD&T, material notes, and title-block
metadata. Export only after final design-rule validation passes.
Prefer project folders named work/ for native working files and exports/
for deliverables unless the user explicitly chooses other paths.
Finish the task
- Invoke
$sw-pre-start Phase 6 with final parameters and resolve every
fail. Record advisories.
- Report native files and exports, explicit units, measured mass and bounding
box, validation result, errors, and limitations.
- Track the corrected feature sequence, every final code artifact, repeatable
failures and resolutions, and non-obvious lessons.
- After delivering the CAD result, invoke
$sw-session-reporter. Do not skip
reporting merely because the KB was offline during the build.
1---2name: solidworks-design3description: Plan, create, modify, inspect, repair, validate, save, and export SolidWorks parts, assemblies, and drawings. Use for any request involving SolidWorks CAD geometry, engineering drawings or reference images, materials, fits, tolerances, fasteners, mates, mass properties, or STEP/IGES/STL/PDF deliverables. Orchestrates the mandatory knowledge-base pre-start, catalog lookup, deterministic validation, and consent-based session reporting workflow.4metadata:5 source: https://skillmd.com/skills/hashgraph-online/solidworks-design6---78# SolidWorks Design910Treat this skill as the entry point for every SolidWorks task. Use the available11SolidWorks automation surface for CAD operations; this plugin supplies the12engineering and knowledge workflow rather than a SolidWorks installation.1314## Start the task15161. On the first SolidWorks request in the current Codex task, resolve the17 plugin root from this file and run:1819 ```text20 python <plugin-root>/scripts/sw_session.py start21 ```2223 Echo the returned UUID as `SESSION_ID` in working context. Run this command24 only once per Codex task and never replace the ID mid-task.252. Establish the design goal, units, geometry-driving dimensions, material,26 tolerances or fits, manufacturing process, and deliverables.273. Ask one concise question when missing data changes geometry, safety, fit, or28 the requested output. Do not guess engineering values. If the user29 explicitly delegates a non-geometry default, apply the active KB convention30 and disclose it.314. Invoke `$sw-pre-start`, then `$sw-kb-api`, in that exact order before32 opening SolidWorks, generating CAD code, or calling a SolidWorks API.3334## Plan before editing3536Write a compact implementation plan that identifies:3738- files and document types to create;39- datums, origins, coordinate systems, and reference geometry;40- ordered sketches and features with named driving dimensions;41- sketch relations and the fully-defined condition;42- material, tolerance, fit, fastener, clearance, and manufacturing decisions;43- assembly mates and intended remaining degrees of freedom;44- measurable acceptance criteria and required exports.4546Query the KB standards tables when each material, fit, tolerance, fastener, or47clearance decision is made. Never substitute remembered nominal values when a48standards lookup is available.4950## Build and verify parts5152Create each part separately. For every part:53541. Use metric model units unless the user explicitly overrides them.552. Build parametric, fully-defined sketches with stable references and named56 dimensions.573. Rebuild after meaningful feature groups and inspect returned API values.584. Before each SolidWorks API method, check the part-specific and global known59 errors loaded by `$sw-kb-api`; apply a resolved prevention first.605. Assign the verified material and record its source and units.616. Inspect rebuild status, document errors, feature tree, mass properties,62 bounding box, and a representative image.637. Use deterministic document validation as pass/fail. Treat screenshots as64 visual evidence only.658. Save the native part, export requested formats, then close it before66 starting an assembly.6768Do not report success when rebuild or document validation has not passed.6970## Build and verify assemblies7172Create an assembly only after all component parts are saved and closed.73Insert components from explicit saved paths, add mates in a stable order, and74verify mate status, interference or clearance requirements, component count,75and remaining degrees of freedom. Rebuild and run deterministic document76validation before saving or exporting.7778## Drawings and exports7980Create requested drawings from the validated final model. Include specified81views, dimensions, tolerances, fits, GD&T, material notes, and title-block82metadata. Export only after final design-rule validation passes.8384Prefer project folders named `work/` for native working files and `exports/`85for deliverables unless the user explicitly chooses other paths.8687## Finish the task88891. Invoke `$sw-pre-start` Phase 6 with final parameters and resolve every90 `fail`. Record advisories.912. Report native files and exports, explicit units, measured mass and bounding92 box, validation result, errors, and limitations.933. Track the corrected feature sequence, every final code artifact, repeatable94 failures and resolutions, and non-obvious lessons.954. After delivering the CAD result, invoke `$sw-session-reporter`. Do not skip96 reporting merely because the KB was offline during the build.