agentleFS
KevoyuanKevoyuan/AgentSCAD/skills/scad-library-mcad/SKILL.md

scad-library-mcad

Skill26 starsChanged 5 months agoMITView on GitHub

This skill should be used when generating OpenSCAD with MCAD, especially involute gears, bevel gears, motors, servos, regular shapes, nuts, bolts, and established mechanical primitives bundled with OpenSCAD.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use MCAD when the runtime prompt lists MCAD and the requested part needs established mechanical primitives, especially gears.

    line 13
  2. Distinctive:

    Use the narrowest MCAD file needed:

    line 17
  3. Very specific:

    Use include <MCAD/units.scad> only when constants from the file are required.

    line 23
  4. Very specific:

    Use gear() from MCAD/involute_gears.scad for spur gears when exact involute tooth geometry matters.

    line 27
  5. Very specific:

    Use bevel_gear() or bevel_gear_pair() for bevel gears when the request explicitly asks for them.

    line 28
  6. Distinctive:

    Use MCAD motor/servo helpers only when exact module names and signatures are known.

    line 29
  7. Distinctive:

    Use MCAD regular shapes when they simplify geometry without reducing editability.

    line 30
  8. Distinctive:

    Keep pressure angle default at 20 degrees unless specified.

    line 65
  9. Distinctive:

    Add bore and hub features intentionally.

    line 66
  10. Distinctive:

    Prefer MCAD gear modules over hand-drawn rectangular tooth approximations.

    line 67
  11. Very specific:

    Do not use broad include statements when use is sufficient.

    line 71
  12. Distinctive:

    Do not invent MCAD module names.

    line 72
  13. Distinctive:

    Do not copy MCAD source into generated SCAD.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SCAD Library MCAD Skill

Use MCAD when the runtime prompt lists MCAD and the requested part needs established mechanical primitives, especially gears.

Imports

Use the narrowest MCAD file needed:

use <MCAD/involute_gears.scad>

Use include <MCAD/units.scad> only when constants from the file are required. Prefer use for module-only imports because it avoids top-level demonstration geometry.

Best Uses

  • Use gear() from MCAD/involute_gears.scad for spur gears when exact involute tooth geometry matters.
  • Use bevel_gear() or bevel_gear_pair() for bevel gears when the request explicitly asks for them.
  • Use MCAD motor/servo helpers only when exact module names and signatures are known.
  • Use MCAD regular shapes when they simplify geometry without reducing editability.

Generation Pattern

Expose gear controls as top-level parameters and call MCAD inside a wrapper module:

use <MCAD/involute_gears.scad>

/* [Gear] */
teeth = 24;            // min: 8 max: 160 step: 1
circular_pitch = 220;  // min: 80 max: 600 step: 5
pressure_angle = 20;   // min: 14.5 max: 25 step: 0.5
gear_thickness = 8;    // min: 2 max: 40 step: 0.5
bore_diameter = 5;     // min: 1 max: 40 step: 0.5

module printable_gear() {
  gear(
    number_of_teeth=teeth,
    circular_pitch=circular_pitch,
    pressure_angle=pressure_angle,
    bore_diameter=bore_diameter,
    gear_thickness=gear_thickness,
    rim_thickness=gear_thickness,
    hub_thickness=gear_thickness,
    flat=true
  );
}

printable_gear();

Quality Rules

  • For gears, expose teeth count, pitch, pressure angle, bore diameter, and thickness.
  • Keep pressure angle default at 20 degrees unless specified.
  • Add bore and hub features intentionally; do not leave a solid gear when an axle hole is likely needed.
  • Prefer MCAD gear modules over hand-drawn rectangular tooth approximations.

Avoid

  • Do not use broad include statements when use is sufficient.
  • Do not invent MCAD module names.
  • Do not copy MCAD source into generated SCAD.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.