Agent skill

Enclosure

by ghbalf in ghbalf/freecad-ai

Generate a parametric electronics enclosure with a base and lid.

LGPL-2.1Auto-check passed

Install Enclosure

skills CLI
$ npx skills add ghbalf/freecad-ai --skill enclosure -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ghbalf/freecad-ai enclosure --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ghbalf/freecad-ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/enclosure .claude/skills/enclosure && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
enclosure
GitHub stars
552
Token cost
~1.5k tokens
SKILL.md length
712 words
Files
2
Skills in repo
9
Repo updated
First seen
Licence
LGPL-2.1

At a glance

Generate a parametric electronics enclosure with a base and lid.

  • Works in 8 steps: Base body → Outer shell → Interior pocket (from the TOP face) → …
  • SKILL.md covers Parameters to extract from…, Construction steps (use these… and Critical rules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Enclosure is an agent skill from ghbalf/freecad-ai. Generate a parametric electronics enclosure with a base and lid.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `VALIDATION.md`).

The repository describes itself as: AI-powered assistant workbench for FreeCAD — generate 3D models from natural language.

Example prompts

  • “/enclosure”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Base body
  2. Outer shell
  3. Interior pocket (from the TOP face)
  4. Lid body
  5. Lid holes (SCREW LID ONLY — skip for press-fit and snap-fit)
  6. Position lid (BEFORE snap tabs so the shape is in the right place)
  7. Snap-fit ridge and tabs (SNAP-FIT ONLY — skip for screw and press-fit)
  8. Hide sketches

What it can do on your machine

Read from SKILL.md and the folder at commit 5ef1e2d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Enclosure loads about 1.5k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 712 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ghbalf/freecad-ai at commit 5ef1e2d, republished under its LGPL-2.1 licence (© ghbalf). 712 words, ~1,474 tokens.

Download SKILL.mdSave it as .claude/skills/enclosure/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
enclosure
description
Generate a parametric electronics enclosure with a base and lid.

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
Show full SKILL.md (272 more words)Show less
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"}.

© ghbalf, LGPL-2.1. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/enclosure of ghbalf/freecad-ai.

  • SKILL.md
  • VALIDATION.md

Open the folder on GitHubat commit 5ef1e2d

Compare with similar skills

Enclosure next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Enclosure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Enclosure this skillghbalf/freecad-ai552—~1.5kAutomated safety check: PassLGPL-2.1
Desktop ElectronOpenHands/OpenHands90k—~302Automated safety check: PassMIT
Electron App Automationvercel-labs/agent-browser44k5 repos~1.7kAutomated safety check: PassApache-2.0
Electron Developmentdavila7/claude-code-templates32k3 repos~7kAutomated safety check: PassMIT
Use Vishot With Electronmoeru-ai/airi50k—~1.7kAutomated safety check: PassMIT
Agent Browser Electronmoeru-ai/airi50k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Desktop Electron

    OpenHands/OpenHands

    This skill should be used when the user asks to "change the desktop app", "package Electron", "build a universal macOS app", "bundle Node or uv", "fix Electron startup", or changes electron/…

    90k GitHub stars~302 tokensUpdated today
    Auto-check passed
  • Electron App Automation

    vercel-labs/agent-browser

    Official

    Automates Electron desktop apps such as VS Code, Slack or Discord by connecting agent-browser to their Chrome DevTools Protocol port.

    44k GitHub starsUsed in 5 repos~1.7k tokens
    Productivity & AutomationAuto-check passed
  • Electron Development

    davila7/claude-code-templates

    Master Electron desktop app development with secure IPC, contextIsolation, preload scripts, multi-process architecture, electron-builder packaging, code signing, and auto-update.

    32k GitHub starsUsed in 3 repos~7k tokens
    MobileAuto-check passed
  • Capture deterministic Electron windows with Vishot. An agent skill from moeru-ai/airi.

    50k GitHub stars~1.7k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • A skill your agent uses when Codex needs to inspect, debug, or automate an Electron app through agent-browser and Chrome DevTools Protocol, especially when the app has multiple BrowserWindow…

    50k GitHub stars~3.1k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Electron Drive Skill

    sickn33/agentic-awesome-skills

    Launch the project's Electron app on a scratch profile and drive it: click, type, screenshot, run renderer or main-process code, read logs.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Testing & QAAuto-check passed

More from ghbalf/freecad-ai

All 9 skills in this repo
  • Skill Creator

    ghbalf/freecad-ai

    Create new FreeCAD AI skills, modify existing skills, and iteratively improve them.

    552 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check passed
  • Create Validation

    ghbalf/freecad-ai

    Generate a draft VALIDATION.md for a skill by analyzing its SKILL.md construction steps

    552 GitHub stars~1.2k tokensUpdated 6 days ago
    Auto-check passed
  • Fastener Hole

    ghbalf/freecad-ai

    Create standard fastener holes: clearance, counterbore, or countersink.

    552 GitHub stars~487 tokensUpdated 6 days ago
    Auto-check passed
  • Gear

    ghbalf/freecad-ai

    Create an involute spur gear using FreeCAD's Part module. An agent skill from ghbalf/freecad-ai.

    552 GitHub stars~1.2k tokensUpdated 6 days ago
    Auto-check passed
  • Lattice

    ghbalf/freecad-ai

    Generate a 3D lattice or infill pattern inside a bounding region.

    552 GitHub stars~483 tokensUpdated 6 days ago
    Auto-check passed
  • Sketch From Image

    ghbalf/freecad-ai

    Extract 2D geometry from an attached image and create a FreeCAD sketch from it.

    552 GitHub stars~1.2k tokensUpdated 6 days ago
    Auto-check passed

Questions about Enclosure

What does Enclosure do?

Generate a parametric electronics enclosure with a base and lid. Enclosure is an agent skill from ghbalf/freecad-ai. Generate a parametric electronics enclosure with a base and lid.

How do I install Enclosure in Claude Code?

Run `npx skills add ghbalf/freecad-ai --skill enclosure -a claude-code`. Or copy the skill folder (skills/enclosure in ghbalf/freecad-ai) into .claude/skills/enclosure in your project. Claude Code loads it when a task matches its description.

How do I install Enclosure in Codex?

Run `npx skills add ghbalf/freecad-ai --skill enclosure -a codex`. Or copy the skill folder (skills/enclosure in ghbalf/freecad-ai) into .agents/skills/enclosure in your project. Codex loads it when a task matches its description.

Can I use Enclosure in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ghbalf/freecad-ai --skill enclosure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/enclosure, .gemini/skills/enclosure, .github/skills/enclosure and .opencode/skills/enclosure in your project.

What does Enclosure need to run?

SKILL.md names no scripts, command-line tools or credentials: Enclosure is instructions for the agent only. Our summary lists: Python 3.

Does Enclosure access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Enclosure safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Enclosure use?

Enclosure is published under the LGPL-2.1 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Enclosure use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Enclosure?

Skills that share tags, products or a category with Enclosure: Desktop Electron (OpenHands/OpenHands, 90k stars), Electron App Automation (vercel-labs/agent-browser, 44k stars), Electron Development (davila7/claude-code-templates, 32k stars) and Use Vishot With Electron (moeru-ai/airi, 50k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Enclosure?

ghbalf (a GitHub user) maintains it in ghbalf/freecad-ai, which has 552 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 3, 2026.

Source: ghbalf/freecad-ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.