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

scad-library-bosl2

Skill26 starsChanged 5 months agoMITView on GitHub

This skill should be used when generating OpenSCAD with BOSL2, using rounded solids, chamfers, anchors, attachments, transforms, arrays, masks, gears, screws, or higher-quality parametric geometry.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 11 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use BOSL2 as the preferred general-purpose OpenSCAD quality library when include <BOSL2/std.scad> is listed in the runtime prompt.

    line 13
  2. Very specific:

    Place this line near the top of scad_source, before modules that call BOSL2 helpers:

    line 17
  3. Distinctive:

    Do not use BOSL2 unless the runtime prompt lists it as available.

    line 23
  4. Very specific:

    Use cuboid() instead of raw cube() for rounded or chamfered rectangular solids.

    line 27
  5. Very specific:

    Use cyl() instead of raw cylinder() when a part needs chamfers, rounding, or cleaner alignment.

    line 28
  6. Distinctive:

    Use BOSL2 transforms and anchors to place features relative to faces instead of hard-coding fragile offsets.

    line 29
  7. Distinctive:

    Use masks/cutters for bevels, chamfers, screw seats, countersinks, and visually readable edges.

    line 30
  8. Distinctive:

    Use BOSL2 path and offset helpers for swept or rounded profiles when the geometry is fundamentally sketch-based.

    line 31
  9. Very specific:

    Use BOSL2 gears or screws only when the exact helper signature is known.

    line 32
  10. Distinctive:

    Keep editable numeric values as top-level assignments before module declarations.

    line 36
  11. Very specific:

    Prefer real rounded primitives over minkowski() for simple boxes and cylinders.

    line 56
  12. Distinctive:

    Keep radii smaller than half of the smallest adjacent dimension.

    line 57
  13. Distinctive:

    Avoid decorative rounding that weakens retaining lips, snap tabs, screw bosses, or mating surfaces.

    line 58
  14. Very specific:

    Use $fn sparingly; rely on $fa and $fs for curves when practical.

    line 60
  15. Distinctive:

    Do not copy BOSL2 source into generated SCAD.

    line 64
  16. Distinctive:

    Do not use BOSL2 helpers as hidden parameter stores.

    line 65
  17. Distinctive:

    Do not mix anchor-heavy BOSL2 placement with unrelated hard-coded transforms in the same feature unless the coordinate frame is obvious.

    line 66
  18. Distinctive:

    Do not call obscure BOSL2 functions unless the signature is certain.

    line 67

≈ “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 BOSL2 Skill

Use BOSL2 as the preferred general-purpose OpenSCAD quality library when include <BOSL2/std.scad> is listed in the runtime prompt.

Import

Place this line near the top of scad_source, before modules that call BOSL2 helpers:

include <BOSL2/std.scad>

Do not use BOSL2 unless the runtime prompt lists it as available.

Best Uses

  • Use cuboid() instead of raw cube() for rounded or chamfered rectangular solids.
  • Use cyl() instead of raw cylinder() when a part needs chamfers, rounding, or cleaner alignment.
  • Use BOSL2 transforms and anchors to place features relative to faces instead of hard-coding fragile offsets.
  • Use masks/cutters for bevels, chamfers, screw seats, countersinks, and visually readable edges.
  • Use BOSL2 path and offset helpers for swept or rounded profiles when the geometry is fundamentally sketch-based.
  • Use BOSL2 gears or screws only when the exact helper signature is known; otherwise prefer MCAD for gears and threadlib/threads.scad for threaded connectors.

Generation Pattern

Keep editable numeric values as top-level assignments before module declarations. Use BOSL2 inside reusable modules:

include <BOSL2/std.scad>

/* [Dimensions] */
width = 80;       // min: 20 max: 200 step: 1
depth = 50;       // min: 20 max: 200 step: 1
height = 24;      // min: 8 max: 120 step: 1
corner_radius = 4; // min: 0 max: 16 step: 0.5

module body() {
  cuboid([width, depth, height], rounding=corner_radius, edges="Z", anchor=CENTER);
}

body();

Quality Rules

  • Prefer real rounded primitives over minkowski() for simple boxes and cylinders.
  • Keep radii smaller than half of the smallest adjacent dimension.
  • Avoid decorative rounding that weakens retaining lips, snap tabs, screw bosses, or mating surfaces.
  • For printable parts, keep wall thickness and clearances explicit as parameters.
  • Use $fn sparingly; rely on $fa and $fs for curves when practical.

Avoid

  • Do not copy BOSL2 source into generated SCAD.
  • Do not use BOSL2 helpers as hidden parameter stores.
  • Do not mix anchor-heavy BOSL2 placement with unrelated hard-coded transforms in the same feature unless the coordinate frame is obvious.
  • Do not call obscure BOSL2 functions unless the signature is certain.

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.