# Kernelcad repair

> Kernelcad repair is an open-source agent skill for developer tools. Guides an agent to trace and apply bounded fixes to failing kernelCAD scripts. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/w1ne/kernelCAD-web/tree/develop/src/agent/skills/kernelcad-repair
- **Repository:** https://github.com/w1ne/kernelcad-web
- **GitHub stars:** 37
- **License:** MIT
- **Skill name:** kernelcad-repair
- **Collection:** https://github.com/w1ne/kernelCAD-web
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through repairing a kernelCAD model after evaluation reports an error, a failed gate, or a degraded feature. It sequences the MCP tools: evaluate the script, explain the failure to find the upstream chain and an editable line range, preview candidate patches as diffs, then apply the first candidate that clears the diagnostic without introducing new errors.

The repair stays inside a region the tool defines, covering the failing statement, the statements authoring its direct inputs, and the parameter declarations it reads. Each pass targets one diagnostic, and the agent is told to report exactly which change cleared it. Where no automatic candidate exists, the skill directs the agent to treat the fix as a design decision within that region rather than guessing.

The workflow expects a kernelCAD project with its MCP tools available, along with a TypeScript model file to edit. The skill refers to companion skills for the full MCP surface, feature semantics, parameters and authoring API.

## When your agent uses it

> Turn a failed evaluation into a bounded, applied fix — why_did_this_fail for the repair region and candidates, then repair_script to apply and verify. Load when evaluate_script reports an error, a gate fails, or a feature shows up degraded in featureHealth.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/w1ne/kernelCAD-web/tree/HEAD/src/agent/skills/kernelcad-repair)
- [License: MIT](https://github.com/w1ne/kernelCAD-web/tree/HEAD/src/agent/skills/kernelcad-repair)

## Features

- **Evaluate and explain failures:** Runs the script evaluation and traces a failing feature to its upstream chain and authoring location.
- **Bounded repair region:** Limits edits to the failing statement, its direct inputs and the parameters they read.
- **Dry-run candidate preview:** Shows every candidate patch as a diff before anything is applied.
- **Verified application:** Applies candidates in order and keeps the first that clears the diagnostic without new errors.
- **Automatic fix ladders:** Provides derived candidates for common diagnostics such as fillet radius, hole placement and draft angle.
- **Explicit quality gates:** Defines checks that refuse out-of-region patches, source drift and unverified repairs.

## Good for

- Fix a fillet that fails because its radius is too large for the edges
- Move a hole back onto the entry face of its plate
- Repair a boolean cutter that sits away from its base body
- Resolve a tangent circle that is too small to sit outside two circles
- Recover a feature that silently degraded in featureHealth

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/kernelcad-repair` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/w1ne/kernelCAD-web.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/kernelcad-repair &&
cp -R "$tmp/src/agent/skills/kernelcad-repair" ~/.claude/skills/kernelcad-repair &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/kernelcad-repair` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/kernelcad-repair` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/w1ne/kernelCAD-web.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/kernelcad-repair &&
cp -R "$tmp/src/agent/skills/kernelcad-repair" ~/.agents/skills/kernelcad-repair &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/kernelcad-repair` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/kernelcad-repair` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/w1ne/kernelCAD-web.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/kernelcad-repair &&
cp -R "$tmp/src/agent/skills/kernelcad-repair" ~/.cursor/skills/kernelcad-repair &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/kernelcad-repair` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/w1ne/kernelCAD-web.git --path src/agent/skills/kernelcad-repair
```

Or copy the folder to `~/.gemini/skills/kernelcad-repair` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/kernelcad-repair`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/w1ne/kernelCAD-web.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/kernelcad-repair &&
cp -R "$tmp/src/agent/skills/kernelcad-repair" ~/.copilot/skills/kernelcad-repair &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/kernelcad-repair` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/w1ne/kernelCAD-web.git
```

Then copy `kernelCAD-web/src/agent/skills/kernelcad-repair` into your agent's skills folder as `kernelcad-repair`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Kernelcad repair be loaded?

When evaluate_script reports an error, a gate fails, or a feature appears degraded in featureHealth.

### Does repair_script write changes to disk?

No. It returns the new code, and the agent decides whether to persist it to the file.

### What happens when no automatic candidate exists?

The tool returns no-automatic-candidate with a reason and the editable region, meaning the fix is a design decision the agent must make within that region.

### Can the repair edit lines anywhere in the file?

No. Patches outside the repair region are refused with tool.repair.out-of-region, and the root cause should be traced upstream instead.

### How do I install Kernelcad repair in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/kernelcad-repair to use it in all your projects, or to .claude/skills/kernelcad-repair in one project.

### Does Kernelcad repair run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Kernelcad repair?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Kernelcad repair?

The closest alternatives to Kernelcad repair are Kernelcad MCP, Kernelcad design loop, Render inspect, Kernelcad from reference and Kernelcad authoring.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Kernelcad MCP](https://ai-powered.com/skills/kernelcad-mcp): Kernelcad MCP is an open-source agent skill for developer tools.
- [Kernelcad design loop](https://ai-powered.com/skills/kernelcad-design-loop): Kernelcad design loop is an open-source agent skill for developer tools.
- [Render inspect](https://ai-powered.com/skills/render-inspect): Render inspect is an open-source agent skill for developer tools.
- [Kernelcad from reference](https://ai-powered.com/skills/kernelcad-from-reference): Kernelcad from reference is an open-source agent skill for developer tools.
- [Kernelcad authoring](https://ai-powered.com/skills/kernelcad-authoring): Kernelcad authoring is an open-source agent skill for developer tools.
- [Kernelcad kinematic](https://ai-powered.com/skills/kernelcad-kinematic): Kernelcad kinematic is an open-source agent skill for developer tools.
- [Kernelcad features](https://ai-powered.com/skills/kernelcad-features): Kernelcad features is an open-source agent skill for developer tools.
- [Kernelcad cookbooks](https://ai-powered.com/skills/kernelcad-cookbooks): Kernelcad cookbooks is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/kernelcad-repair
