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.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- developer-workflowSkill
- scad-chatSkill
- scad-codingSkill
- scad-generationSkill
- scad-improvementSkill
- scad-intakeSkill
- scad-library-bosl2Skill
- scad-library-mcadSkill
- scad-library-nopscadlibSkill
- scad-library-round-anythingSkill
- scad-library-threadsSkill
- scad-planningSkill
- scad-repairSkill
- scad-validation-reviewSkill
- scad-visual-validateSkill
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
- Distinctive: line 13
Use this skill when deciding whether generated OpenSCAD may include external libraries.
- Distinctive: line 21
Prefer approved OpenSCAD libraries when the runtime prompt says they are available.
- Distinctive: line 22
Use libraries to improve general CAD quality: rounded boxes, fillets, chamfers, anchors, transforms, arrays, threads, gears, fasteners, …
- Distinctive: line 23
Keep all user-editable dimensions as top-level numeric OpenSCAD assignments.
- Distinctive: line 24
Keep output exportable by the configured OpenSCAD renderer.
- Distinctive: line 25
Use portable built-in OpenSCAD primitives when no library is available.
- Very specific: line 46
Prefer the narrowest library import needed for the job.
- Very specific: line 47
Use one thread library per artifact.
- Distinctive: line 51
Do not copy BOSL, BOSL2, MCAD, CADAM, or any third-party source code into generated SCAD or the repository.
- Distinctive: line 52
Do not encode product-family geometry in TypeScript to fake quality.
- Distinctive: line 53
Do not move deterministic validation, rendering, file IO, or database writes into prompts.
- Distinctive: line 54
Do not use unavailable libraries.
- Distinctive: line 58
When libraries are available, generated SCAD may start with lines like:
- Distinctive: line 64
Only use include statements listed by the runtime prompt.
- Distinctive: line 68
Use deterministic scripts when checking a workstation or generated artifact:
- Distinctive: line 79
Keep GPL libraries out of default app bundles unless a human explicitly approves the distribution model.
≈ “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.
Files
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
includeorusestatement 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.scadandthreadlibin 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-gplfor 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.
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
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.

