Agent skill

Gear

by ghbalf in ghbalf/freecad-ai

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

LGPL-2.1Auto-check passed

Install Gear

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

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

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

At a glance

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

  • SKILL.md covers Parameters to extract from…, Derived dimensions, Construction and Important
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

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

Its SKILL.md is about 1.2k 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

  • “/gear”

Requirements

  • Python 3

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

Gear loads about 1.2k tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 150 words of instructions outside code blocks.

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

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). 150 words, ~1,242 tokens.

Download SKILL.mdSave it as .claude/skills/gear/SKILL.md (or your agent's skills folder).
name
gear
description
Create an involute spur gear using FreeCAD's Part module.

Spur Gear Generator

Create an involute spur gear using FreeCAD's Part module.

Parameters to extract from user request

  • Module (m): tooth size parameter, default 2.0mm
  • Number of teeth (z): default 20
  • Pressure angle: default 20 degrees
  • Face width (thickness): default 10mm
  • Bore diameter: center hole, default 5mm (0 = no bore)

Derived dimensions

  • Pitch diameter: d = m * z
  • Tip diameter: da = m * (z + 2)
  • Root diameter: df = m * (z - 2.5)

Construction

Use execute_code with the complete gear generation code below. Replace the parameter values at the top with the user's requested values.

python
import math
import Part
import FreeCAD as App

# === PARAMETERS (replace with user values) ===
module = 2.0
teeth = 20
pressure_angle_deg = 20
face_width = 10.0
bore_dia = 5.0

# === DERIVED ===
pitch_r = module * teeth / 2.0
base_r = pitch_r * math.cos(math.radians(pressure_angle_deg))
tip_r = pitch_r + module
root_r = pitch_r - 1.25 * module

def involute_pts(base_r, tip_r, n=20):
    max_angle = math.sqrt((tip_r / base_r) ** 2 - 1)
    pts = []
    for i in range(n):
        t = i * max_angle / (n - 1)
        x = base_r * (math.cos(t) + t * math.sin(t))
        y = base_r * (math.sin(t) - t * math.cos(t))
        pts.append(App.Vector(x, y, 0))
    return pts

def rotate_pt(pt, angle_rad):
    c, s = math.cos(angle_rad), math.sin(angle_rad)
    return App.Vector(c * pt.x - s * pt.y, s * pt.x + c * pt.y, 0)

def pt_angle(pt):
    return math.atan2(pt.y, pt.x)

# Involute half-tooth thickness angle
inv_alpha = math.tan(math.radians(pressure_angle_deg)) - math.radians(pressure_angle_deg)
half_thick_angle = math.pi / (2 * teeth) + inv_alpha

# Generate involute profile for one tooth, centered on +Y axis
right_involute = involute_pts(base_r, tip_r, 20)
right_side = [rotate_pt(p, -half_thick_angle + math.pi / 2) for p in right_involute]
left_side = [App.Vector(-p.x, p.y, 0) for p in right_side]

# Key points
left_base, left_tip = left_side[0], left_side[-1]
right_base, right_tip = right_side[0], right_side[-1]
lb_a, rb_a = pt_angle(left_base), pt_angle(right_base)

# Points on root circle at flank angles
lb_on_root = App.Vector(root_r * math.cos(lb_a), root_r * math.sin(lb_a), 0)
rb_on_root = App.Vector(root_r * math.cos(rb_a), root_r * math.sin(rb_a), 0)

# Build closed tooth profile: root → left involute → tip arc → right involute → root arc
tooth_edges = []

# Radial: left root → left base
if lb_on_root.distanceToPoint(left_base) > 0.01:
    tooth_edges.append(Part.LineSegment(lb_on_root, left_base).toShape())

# Left involute BSpline (base → tip)
bs_left = Part.BSplineCurve()
bs_left.interpolate(left_side)
tooth_edges.append(bs_left.toShape())

# Tip arc (left tip → right tip)
tip_mid_a = (pt_angle(left_tip) + pt_angle(right_tip)) / 2
tip_mid = App.Vector(tip_r * math.cos(tip_mid_a), tip_r * math.sin(tip_mid_a), 0)
tooth_edges.append(Part.Arc(left_tip, tip_mid, right_tip).toShape())

# Right involute BSpline (tip → base)
bs_right = Part.BSplineCurve()
bs_right.interpolate(list(reversed(right_side)))
tooth_edges.append(bs_right.toShape())

# Radial: right base → right root
if right_base.distanceToPoint(rb_on_root) > 0.01:
    tooth_edges.append(Part.LineSegment(right_base, rb_on_root).toShape())

# Root arc (right root → left root, closing the profile)
root_mid_a = (lb_a + rb_a) / 2
root_mid = App.Vector(root_r * math.cos(root_mid_a), root_r * math.sin(root_mid_a), 0)
tooth_edges.append(Part.Arc(rb_on_root, root_mid, lb_on_root).toShape())

# Create one tooth solid
tooth_wire = Part.Wire(tooth_edges)
tooth_face = Part.Face(tooth_wire)
tooth_solid = tooth_face.extrude(App.Vector(0, 0, face_width))

# Build gear: base cylinder + all teeth fused together
gear = Part.makeCylinder(root_r, face_width)
for t in range(teeth):
    rotated = tooth_solid.copy()
    if t > 0:
        rotated.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), t * 360.0 / teeth)
    gear = gear.fuse(rotated)
gear = gear.removeSplitter()

# Cut bore hole
if bore_dia > 0:
    bore = Part.makeCylinder(bore_dia / 2, face_width + 2, App.Vector(0, 0, -1))
    gear = gear.cut(bore)

# Add to document
gear_obj = App.ActiveDocument.addObject("Part::Feature", "Gear_M{}_Z{}".format(module, teeth))
gear_obj.Label = "Gear M{} Z{}".format(module, teeth)
gear_obj.Shape = gear
App.ActiveDocument.recompute()

print("Gear created: pitch dia={:.1f}mm, tip dia={:.1f}mm, root dia={:.1f}mm".format(
    pitch_r * 2, tip_r * 2, root_r * 2))

Important

  • Copy the COMPLETE code block above into execute_code, only changing the parameter values at the top
  • Do NOT try to use PartDesign Body/Sketch for the gear — use Part::Feature directly
  • Do NOT use App.Gui — it may not be available in the sandbox
  • Label the gear clearly with its parameters: "Gear M2 Z24"
  • The gear is centered at the origin

© 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/gear of ghbalf/freecad-ai.

Open the folder on GitHubat commit 5ef1e2d

Compare with similar skills

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

Gear compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gear this skillghbalf/freecad-ai550—~1.2kAutomated safety check: PassLGPL-2.1
Freecadautonomous-ai/openharness1.1k—~1.4kAutomated safety check: PassMIT
Es Modulesthedaviddias/Front-End-Checklist74k—~482Automated safety check: PassMIT
Freecad Scriptsgithub/awesome-copilot40k1 repos~5.3kAutomated safety check: PassMIT
Step Partsearthtojake/text-to-cad18k1 repos~1.5kAutomated safety check: PassMIT
Splitting Oversized ModulesPostHog/posthog40k—~2.2kAutomated safety check: PassCustom licence

Similar skills

  • Freecad

    autonomous-ai/openharness

    Turn measured design briefs or existing parts into editable FreeCAD projects with checked dimensions, bores, clearances, interference and fastener access; deliver separate STEP/STL parts, reference…

    1.1k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Es Modules

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Use ES modules (import/export).

    74k GitHub stars~482 tokensUpdated 2 days ago
    Auto-check passed
  • Freecad Scripts

    github/awesome-copilot

    Official

    Expert skill for writing FreeCAD Python scripts, macros, and automation.

    40k GitHub starsUsed in 1 repo~5.3k tokens
    Auto-check passed
  • Step Parts

    earthtojake/text-to-cad

    Find, evaluate, and download common purchasable CAD parts from step.parts, including named off-the-shelf actuators, servos, motors, electronics boards, connectors, screws, bolts, nuts, washers…

    18k GitHub starsUsed in 1 repo~1.5k tokens
    Backend & APIsAuto-check passed
  • Official

    Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior.

    40k GitHub stars~2.2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Abp Module

    abpframework/abp

    ABP reusable Module solution template - EF Core + MongoDB dual support, virtual methods for extensibility, DbTablePrefix, module options pattern, entity extension, separate connection string.

    14k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-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.

    550 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

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

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

    ghbalf/freecad-ai

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

    550 GitHub stars~487 tokensUpdated 5 days ago
    Auto-check passed
  • Lattice

    ghbalf/freecad-ai

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

    550 GitHub stars~483 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.

    550 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed

Questions about Gear

What does Gear do?

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

How do I install Gear in Claude Code?

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

How do I install Gear in Codex?

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

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

What does Gear need to run?

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

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

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

About 1.2k tokens (SKILL.md is roughly 5k 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 Gear?

Skills that share tags, products or a category with Gear: Freecad (autonomous-ai/openharness, 1.1k stars), Es Modules (thedaviddias/Front-End-Checklist, 74k stars), Freecad Scripts (github/awesome-copilot, 40k stars) and Step Parts (earthtojake/text-to-cad, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gear?

ghbalf (a GitHub user) maintains it in ghbalf/freecad-ai, which has 550 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.