Enclosure logo

Enclosure

Community
ghbalf
enclosure

Generate a parametric electronics enclosure with a base and lid.

Overview

Publisherghbalf
Repositoryfreecad-ai
Skill nameenclosure
Stars
557
Forks
89
Bundled files
1
LicenseLGPL-2.1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ghbalf on GitHub. Read the source before you install it.

Installation

Install the Enclosure AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ghbalf/freecad-ai/tree/master/skills/enclosure
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ghbalf/freecad-ai.git /tmp/freecad-ai
mkdir -p .claude/skills
cp -r /tmp/freecad-ai/skills/enclosure .claude/skills/enclosure
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Enclosure in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Enclosure on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Enclosure is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Enclosure Generator

Generate a parametric electronics enclosure with a base and lid.

Parameters to extract from user request

  • L, W, H: outer length, width, height in mm
  • T: wall thickness (default 2mm)
  • Lid type: "screw" (default), "press-fit" (lip only), or "snap-fit" (lip + ridge + snap tabs)
  • Post radius: screw post outer radius (default 3mm) — only for screw lid
  • Screw size: M3 by default (hole r=1.5mm, clearance r=1.75mm) — only for screw lid

Construction steps (use these exact dimensions)

Variables: L=length, W=width, H=height, T=wall_thickness, PR=post_radius (3mm)

1. Base body

  • create_body label="EnclosureBase"

2. Outer shell

  • create_sketch on XY, body_name="EnclosureBase": rectangle x=0, y=0, width=L, height=W
  • pad_sketch length=H, body_name="EnclosureBase"

3. Interior pocket (from the TOP face)

  • create_sketch on XY, offset=H, body_name="EnclosureBase": rectangle x=T, y=T, width=L-2T, height=W-2T
  • pocket_sketch length=H-T, body_name="EnclosureBase"
  • This creates the hollow from z=T to z=H (floor thickness=T at bottom, open at top)

4–5. Screw posts and holes (SCREW LID ONLY — skip for snap-fit)

Post centers must be far enough from walls so they don't protrude:

  • Center X positions: T+PR (left), L-T-PR (right)
  • Center Y positions: T+PR (front), W-T-PR (back)

Step 4: Screw posts (start from top of floor, not bottom)

  • create_sketch on XY, offset=T, body_name="EnclosureBase": 4 circles at those positions, radius=PR
  • pad_sketch length=H-T, body_name="EnclosureBase"

Step 5: Screw holes in posts — MUST complete BEFORE moving to step 6!

  • create_sketch on XY, offset=H, body_name="EnclosureBase": 4 circles at same centers, radius=1.5 (M3)
  • pocket_sketch length=H-T, body_name="EnclosureBase"
  • The holes go H-T deep (through the posts only, NOT through the floor)

6. Lid body

For SCREW lid:

  • create_body label="EnclosureLid"
  • create_sketch on XY, body_name="EnclosureLid": rectangle x=0, y=0, width=L, height=W
  • pad_sketch length=T, body_name="EnclosureLid"

For PRESS-FIT lid (build lip first, then slab on top so lip points downward):

  • create_body label="EnclosureLid"
  • create_sketch on XY, body_name="EnclosureLid": rectangle x=T+0.2, y=T+0.2, width=L-2T-0.4, height=W-2T-0.4
  • pad_sketch length=3 (3mm lip), body_name="EnclosureLid"
  • create_sketch on XY, offset=3, body_name="EnclosureLid": rectangle x=0, y=0, width=L, height=W
  • pad_sketch length=T, body_name="EnclosureLid"
  • The 0.2mm gap on each side provides clearance for a friction fit.

For SNAP-FIT lid (same structure, but 1mm clearance so snap tabs have room):

  • create_body label="EnclosureLid"
  • create_sketch on XY, body_name="EnclosureLid": rectangle x=T+1, y=T+1, width=L-2T-2, height=W-2T-2
  • pad_sketch length=3 (3mm lip), body_name="EnclosureLid"
  • create_sketch on XY, offset=3, body_name="EnclosureLid": rectangle x=0, y=0, width=L, height=W
  • pad_sketch length=T, body_name="EnclosureLid"
  • The 1mm gap on each side provides room for the snap tabs (0.5mm protrusion).

For both: Lip: z=0→3, Slab: z=3→3+T. After positioning, the lip hangs into the base.

7. Lid holes (SCREW LID ONLY — skip for press-fit and snap-fit)

  • create_sketch on XY, body_name="EnclosureLid": 4 circles at same post centers, radius=1.75
  • pocket_sketch through_all=true, body_name="EnclosureLid"

8. Position lid (BEFORE snap tabs so the shape is in the right place)

  • Screw lid: transform_object EnclosureLid, translate_z=H
  • Press-fit lid: transform_object EnclosureLid, translate_z=H-3
  • Snap-fit lid: transform_object EnclosureLid, translate_z=H-3

9. Snap-fit ridge and tabs (SNAP-FIT ONLY — skip for screw and press-fit)

Add a ridge on the base interior and snap tabs on the lid lip. The snap tabs tool copies the lid's shape (including its position), so the lid MUST be positioned first in step 8.

  • create_inner_ridge body_name="EnclosureBase", length=L, width=W, wall_thickness=T, ridge_width=0.8, ridge_height=0.5, z_position=H-2
  • create_snap_tabs body_name="EnclosureLid", length=L, width=W, wall_thickness=T, clearance=1.0, lip_height=3

10. Hide sketches

Use execute_code to hide all sketches at once:

python
for obj in App.ActiveDocument.Objects:
    if obj.TypeId == "Sketcher::SketchObject":
        obj.Visibility = False

Critical rules

  • ALWAYS pass explicit length to pad_sketch — never rely on the 10mm default
  • ALWAYS pass body_name to pad_sketch and pocket_sketch — this ensures features go into the correct body
  • Screw posts go INSIDE the enclosure at positions (T+PR, T+PR) from each corner — never at the wall edge
  • All sketches on XY plane, attached to the correct body_name
  • The base height is H, pocket depth is H-T, post height is H-T
  • Use offset=H for the pocket sketch so it is placed at the top face (creates correct floor-at-bottom orientation)
  • Complete ALL steps for the base (1–5) before starting the lid (step 6). Each create_sketch MUST be followed by its pad_sketch or pocket_sketch before creating the next sketch.
  • Screw lid (default): do steps 4, 5, 7. Skip step 9. Use screw lid variant in step 6.
  • Press-fit lid: skip steps 4, 5, 7, 9. Use press-fit/snap-fit lid variant in step 6 (lip only, no tabs).
  • Snap-fit lid: skip steps 4, 5, 7. Use press-fit/snap-fit lid variant in step 6, then do step 9 (ridge + tabs).
  • After completing ALL construction steps (including positioning), call the report_skill_params tool (NOT execute_code) with params={"L": value, "W": value, "H": value, "T": value, "PR": value, "lid_type": "screw/press-fit/snap-fit"}.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Enclosure AI skill do?

Generate a parametric electronics enclosure with a base and lid.

Why use Enclosure on TypingMind?

Because you install it once and use it with any model. Enclosure is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Enclosure in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ghbalf/freecad-ai/tree/master/skills/enclosure. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Enclosure?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Enclosure?

As many as you like. As long as a model supports skills, you can use Enclosure with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Enclosure AI skill free?

Yes. It is published on GitHub by ghbalf under the LGPL-2.1 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇