kernelcad-params

A system for defining named values that can be changed while a CAD model is being edited. Derived values are linked to their source parameters, so they update when those parameters change.

In plain words
What is it for?
Use it for adjustable sizes, limits, descriptions, and on/off choices in kernelCAD models, such as changing a width or enabling a cable port.
Why use it?
It avoids frozen calculations and makes related dimensions or options respond to live edits.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/w1ne/kernelcad-web/kernelcad-params
Any agent
npx skills add w1ne/kernelCAD-web --skill kernelcad-params
Clone the repo
git clone --depth 1 https://github.com/w1ne/kernelCAD-web

Made for: Claude Code, Codex.

Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,802 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00035 $0.01802
Opus 5 $0.00017 $0.00901
Sonnet 5 $0.00007 $0.00360
Haiku 4.5 $0.00003 $0.00180

Measured 2d ago against content hash ed5461c01e6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kernelcad-params scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/agent/skills/kernelcad-params/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

kernelCAD — editable parameters

Use param() for values the user may want to tweak after the first build; use literals for incidental dimensions. A param returns a symbolic ParamRef, not a number, so do not do JS arithmetic with it (paramRef / 2 throws feature.invalid-args at the coercion site — the result would be a frozen number that stops re-evaluating on param updates). For derived dimensions, chain the arithmetic methods on the ParamRef itself: .add, .subtract, .multiply, .divide, .negate each return a new ParamRef built on a structured expression that re-evaluates whenever the underlying param changes — e.g. param('r', 5).divide(2) for a half-radius, or param('w', 80).subtract(param('margin', 5).multiply(2)) for a derived inset width.

param() / params() API

// Single named param — returns a symbolic ParamRef<T>.
param<T extends number | boolean>(name: string, defaultValue: T, opts?: {
  min?: number;
  max?: number;
  description?: string;
}): ParamRef<T>;

// Batched shorthand — every key becomes a ParamRef of the same type as
// its default value. Accepts only number and boolean defaults.
params({ width: 60, addCablePort: true }): {
  width: ParamRef<number>;
  addCablePort: ParamRef<boolean>;
};

ParamRef arithmetic

ParamRef is a branded symbolic node. Do not use JS operators; use the chain methods:

Method Returns Notes
.add(n) ParamRef<number> paramRef.add(5)
.subtract(n) ParamRef<number> paramRef.subtract(margin)
.multiply(n) ParamRef<number> paramRef.multiply(2)
.divide(n) ParamRef<number> paramRef.divide(2)
.negate() ParamRef<number> -paramRef symbolic

Each method accepts either a plain number or another ParamRef. Chains stay fully symbolic: radius.multiply(2).add(1) is a ParamRef, not a number, and re-evaluates on each param change.

Usage example

const boltDia = param('boltDia', 5, { min: 3, max: 10, description: 'bolt hole diameter' });
const addCablePort = param('addCablePort', true, { description: 'include cable pass-through' });

return box(80, 50, 6)
  .holes('top', {
    positions: [{ u: -30, v: -20 }, { u: 30, v: -20 }],
    diameter: boltDia,
    depth: 'through',
    name: 'mountBolts',
  })
  .cutout(
    path().moveTo(-8, -5).lineTo(8, -5).lineTo(8, 5).lineTo(-8, 5).close(),
    { face: 'top', depth: 'through', name: 'cablePort', enabled: addCablePort },
  );

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 130 lines · 35 tokens per session scan A ed5461c01e6a

Subscribe to this mod's changes

kernelcad-params is a skill published in the GitHub repository w1ne/kernelCAD-web (17 stars, last pushed 4d ago), licensed MIT. It adds 35 tokens to every session and 1,802 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cad

Use when doing parametric 3D modeling, 2D drafting, geometric kernel development, BIM/IFC processing, PCB design, or AutoCAD .NET development. Index of 19 skills: FreeCAD, OpenSCAD, OCCT, CadQuery, KiCad, SolveSpace, QCAD, xBIM, Clipper2, TongWen and more.

znlgis/opengis-skills · 79 tokens

aieng-cad-authoring

Active MCP-first CAD authoring skill for AIENG Workbench. Use when the user asks to create, design, draft, model, or iteratively build CAD geometry through the active cad. MCP tools. Do not use for solver/result review, schema/library implementation, or editing legacy IR plans.

armpro24-blip/cad-cae-copilot · 67 tokens

bambu-labs

Dry-run, upload, and cautiously initiate local Bambu Lab print jobs from validated plain .gcode, using Bambu LAN FTPS/MQTT handoffs.

earthtojake/text-to-cad · 38 tokens

sdf

SDFormat/SDF model and world authoring, validation, and simulator handoff. Use for .sdf files, SDFormat XML, models, worlds, links, joints, poses, frames, inertials, visual/collision geometry, mesh URIs, sensors, lights, physics, plugins, includes, Gazebo, static SDF review, or simulator-specific metadata. Do not use…

earthtojake/text-to-cad · 88 tokens

srdf

MoveIt2 SRDF authoring, validation, and planning-semantics workflow. Use when creating, editing, inspecting, or validating .srdf files, MoveIt planning groups, virtual joints, passive joints, end effectors, group states, disabled collisions, URDF-paired planning semantics, or SRDF handoff for live review. Use the URDF…

earthtojake/text-to-cad · 110 tokens

urdf

URDF robot description authoring and validation. Use when creating, editing, inspecting, validating, or debugging .urdf files, robot links, joints, limits, inertials, visual/collision geometry, mesh references, frame conventions, or robot-description artifacts. Use the SRDF skill for MoveIt2 semantic groups and…

earthtojake/text-to-cad · 106 tokens