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

scad-library-policy

Skill26 starsChanged 5 months agoMITView on GitHub

This skill should be used when deciding whether generated OpenSCAD may include external libraries, validating SCAD include or use statements, checking installed OpenSCAD libraries, or managing approved library policy for BOSL2, NopSCADlib, Round-Anything, MCAD, threads.scad, and threadlib.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 14 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when deciding whether generated OpenSCAD may include external libraries.

    line 13
  2. Distinctive:

    Prefer approved OpenSCAD libraries when the runtime prompt says they are available.

    line 21
  3. Distinctive:

    Use libraries to improve general CAD quality: rounded boxes, fillets, chamfers, anchors, transforms, arrays, threads, gears, fasteners, …

    line 22
  4. Distinctive:

    Keep all user-editable dimensions as top-level numeric OpenSCAD assignments.

    line 23
  5. Distinctive:

    Keep output exportable by the configured OpenSCAD renderer.

    line 24
  6. Distinctive:

    Use portable built-in OpenSCAD primitives when no library is available.

    line 25
  7. Very specific:

    Prefer the narrowest library import needed for the job.

    line 46
  8. Very specific:

    Use one thread library per artifact.

    line 47
  9. Distinctive:

    Do not copy BOSL, BOSL2, MCAD, CADAM, or any third-party source code into generated SCAD or the repository.

    line 51
  10. Distinctive:

    Do not encode product-family geometry in TypeScript to fake quality.

    line 52
  11. Distinctive:

    Do not move deterministic validation, rendering, file IO, or database writes into prompts.

    line 53
  12. Distinctive:

    Do not use unavailable libraries.

    line 54
  13. Distinctive:

    When libraries are available, generated SCAD may start with lines like:

    line 58
  14. Distinctive:

    Only use include statements listed by the runtime prompt.

    line 64
  15. Distinctive:

    Use deterministic scripts when checking a workstation or generated artifact:

    line 68
  16. Distinctive:

    Keep GPL libraries out of default app bundles unless a human explicitly approves the distribution model.

    line 79

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

Use this skill when deciding whether generated OpenSCAD may include external libraries.

Purpose

AgentSCAD should use reusable CAD libraries as infrastructure, not hardcode product-family geometry in TypeScript.

Approved Behavior

  • Prefer approved OpenSCAD libraries when the runtime prompt says they are available.
  • Use libraries to improve general CAD quality: rounded boxes, fillets, chamfers, anchors, transforms, arrays, threads, gears, fasteners, text, and mechanical primitives.
  • Keep all user-editable dimensions as top-level numeric OpenSCAD assignments.
  • Keep output exportable by the configured OpenSCAD renderer.
  • Use portable built-in OpenSCAD primitives when no library is available.

Runtime Contract

  • The harness reports available libraries before generation.
  • The model must not invent include paths.
  • The renderer controls the library search path with OPENSCADPATH.
  • The repository must not copy third-party library source code unless a human explicitly reviews licensing and approves vendoring.

Preferred Libraries

  • BOSL2 for modern rounded solids, transforms, attachments, anchors, arrays, and mechanical utilities.
  • NopSCADlib for electronics enclosures, real-world vitamins, assemblies, boards, fans, fasteners, and printer/electronics hardware.
  • Round-Anything for rounded sketch profiles, controlled fillets, rounded plates, brackets, tabs, and consumer-product-style softened extrusions.
  • MCAD for established OpenSCAD mechanical primitives, especially involute gears.
  • threads.scad or threadlib for printable threaded connectors, taps, bolts, nuts, and threaded holes.

Library Skill Prompting

  • Load the matching detailed library skill only when the runtime resolver confirms the library is available.
  • Include the exact include or use statement discovered by the runtime resolver; do not substitute a guessed path.
  • Prefer the narrowest library import needed for the job. For example, prefer use <MCAD/involute_gears.scad> over broad MCAD includes when generating a gear.
  • Use one thread library per artifact. Do not mix threads.scad and threadlib in the same generated model.

Hard Rules

  • Do not copy BOSL, BOSL2, MCAD, CADAM, or any third-party source code into generated SCAD or the repository.
  • Do not encode product-family geometry in TypeScript to fake quality.
  • Do not move deterministic validation, rendering, file IO, or database writes into prompts.
  • Do not use unavailable libraries.

Output Guidance

When libraries are available, generated SCAD may start with lines like:

include <BOSL2/std.scad>

Only use include statements listed by the runtime prompt.

Scripts

Use deterministic scripts when checking a workstation or generated artifact:

  • scripts/check_scad_libraries.py: inspect OpenSCAD library search paths and report which approved libraries are installed.
  • scripts/install_scad_libraries.py: install approved app-managed OpenSCAD libraries into ~/.agentscad/openscad-libraries; defaults exclude GPL libraries.
  • scripts/validate_scad_includes.py <file.scad>: fail if a generated SCAD file uses unavailable or unapproved library include/use statements.

License Gate

  • Install permissive or weak-copyleft libraries by default only when the manifest marks default_install: true.
  • Require explicit --include-gpl for GPL libraries such as NopSCADlib.
  • Preserve each upstream repository's license files in the managed library directory.
  • Keep GPL libraries out of default app bundles unless a human explicitly approves the distribution model.

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.