Agent skill

Lattice

by ghbalf in ghbalf/freecad-ai

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

LGPL-2.1Auto-check passed

Install Lattice

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

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

GitHub CLI
$ gh skill install ghbalf/freecad-ai lattice --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/lattice .claude/skills/lattice && 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
lattice
GitHub stars
552
Token cost
~483 tokens
SKILL.md length
221 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
LGPL-2.1

At a glance

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

  • Works in 3 steps: Create a sketch with a rectangular array… → Use spacing = cell_size, hole diameter =… → Pad to height, then boolean-intersect…
  • SKILL.md covers Pattern types, Parameters to ask (if not…, Construction approach and Important
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Lattice is an agent skill from ghbalf/freecad-ai. Generate a 3D lattice or infill pattern inside a bounding region. Useful for lightweight structural parts.

Its SKILL.md is about 480 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

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

Example prompts

  • “/lattice”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Create a sketch with a rectangular array of circles or squares
  2. Use spacing = cell_size, hole diameter = cell_size - wall_thickness
  3. Pad to height, then boolean-intersect with the bounding shape

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

Lattice loads about 483 tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 221 words of instructions outside code blocks.

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

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). 221 words, ~483 tokens.

Download SKILL.mdSave it as .claude/skills/lattice/SKILL.md (or your agent's skills folder).
name
lattice
description
Generate a 3D lattice or infill pattern inside a bounding region. Useful for lightweight structural parts.

Lattice / Infill Pattern

Generate a 3D lattice or infill pattern inside a bounding region. Useful for lightweight structural parts.

Pattern types

  • Grid: rectangular grid of holes or beams
  • Honeycomb: hexagonal pattern (strongest weight-to-strength ratio)
  • Diagonal: 45-degree crosshatch
  • Gyroid (advanced): triply periodic minimal surface

Parameters to ask (if not provided)

  • Pattern type: grid / honeycomb / diagonal
  • Region: existing object to fill, or bounding box dimensions
  • Cell size: distance between pattern centers (default 10mm)
  • Wall thickness: thickness of lattice walls/beams (default 1.5mm)
  • Height/depth: extrusion height of the pattern

Construction approach

Grid pattern
  1. Create a sketch with a rectangular array of circles or squares
  2. Use spacing = cell_size, hole diameter = cell_size - wall_thickness
  3. Pad to height, then boolean-intersect with the bounding shape
Honeycomb
  1. Create hexagonal cells: 6 line segments per cell
  2. Hex radius = cell_size / 2
  3. Offset rows by cell_size * 0.75 horizontally and cell_size * sqrt(3)/2 vertically
  4. Pad and intersect with bounding shape
Diagonal crosshatch
  1. Create parallel lines at 45 degrees, spaced by cell_size
  2. Create second set at -45 degrees
  3. Lines have width = wall_thickness
  4. Pad and intersect

Important

  • Always create the lattice larger than the target region, then use boolean intersection to trim
  • Label clearly: "Lattice Grid 10mm" etc.
  • For 3D printing, ensure wall_thickness >= 2x nozzle diameter (typically >= 0.8mm)
  • After construction, hide all sketches for a clean viewport:
python
for obj in App.ActiveDocument.Objects:
    if obj.TypeId == "Sketcher::SketchObject":
        obj.Visibility = False

© 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

Just SKILL.md in skills/lattice of ghbalf/freecad-ai.

Open the folder on GitHubat commit 5ef1e2d

Compare with similar skills

Lattice 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.

Lattice compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lattice this skillghbalf/freecad-ai552—~483Automated safety check: PassLGPL-2.1
Golang Patternsaffaan-m/ECC276k—~1.1kAutomated safety check: PassMIT
Kotlin Exposed Patternsaffaan-m/ECC276k4 repos~5.5kAutomated safety check: PassMIT
Dotnet Patternsaffaan-m/ECC276k1 repos~2.3kAutomated safety check: PassMIT
Fastapi Patternsaffaan-m/ECC276k—~2.3kAutomated safety check: PassMIT
Python Patternsaffaan-m/ECC276k—~2.3kAutomated safety check: PassMIT

Similar skills

  • Golang Patterns

    affaan-m/ECC

    Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.

    276k GitHub stars~1.1k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

    276k GitHub starsUsed in 4 repos~5.5k tokens
    DatabasesAuto-check passed
  • Dotnet Patterns

    affaan-m/ECC

    Idiomatic C and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.

    276k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed
  • Fastapi Patterns

    affaan-m/ECC

    FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

    276k GitHub stars~2.3k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Python Patterns

    affaan-m/ECC

    Python-specific design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, type hints, and package organization.

    276k GitHub stars~2.3k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Patterns

    sickn33/agentic-awesome-skills

    Reference document for monopoly patterns. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~2.6k tokens
    Backend & APIsAuto-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 5 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 5 days ago
    Auto-check passed
  • Enclosure

    ghbalf/freecad-ai

    Generate a parametric electronics enclosure with a base and lid.

    552 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Fastener Hole

    ghbalf/freecad-ai

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

    552 GitHub stars~487 tokensUpdated 5 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 5 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 5 days ago
    Auto-check passed

Questions about Lattice

What does Lattice do?

Generate a 3D lattice or infill pattern inside a bounding region. Lattice is an agent skill from ghbalf/freecad-ai. Generate a 3D lattice or infill pattern inside a bounding region.

How do I install Lattice in Claude Code?

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

How do I install Lattice in Codex?

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

Can I use Lattice 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 lattice -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lattice, .gemini/skills/lattice, .github/skills/lattice and .opencode/skills/lattice in your project.

What does Lattice need to run?

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

Does Lattice 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 Lattice 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 Lattice use?

Lattice 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 Lattice use?

About 483 tokens (SKILL.md is roughly 1.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 Lattice?

Skills that share tags, products or a category with Lattice: Golang Patterns (affaan-m/ECC, 276k stars), Kotlin Exposed Patterns (affaan-m/ECC, 276k stars), Dotnet Patterns (affaan-m/ECC, 276k stars) and Fastapi Patterns (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lattice?

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.