cnc-programming

Expert skill for CNC programming and toolpath optimization using CAM software

509 stars

Best use case

cnc-programming is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Expert skill for CNC programming and toolpath optimization using CAM software

Teams using cnc-programming should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cnc-programming/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/domains/science/mechanical-engineering/skills/cnc-programming/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cnc-programming/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cnc-programming Compares

Feature / Agentcnc-programmingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Expert skill for CNC programming and toolpath optimization using CAM software

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# CNC Programming Skill

## Purpose

The CNC Programming skill provides expert capabilities for CNC programming and toolpath optimization using CAM software, enabling efficient and accurate machining of mechanical components.

## Capabilities

- Mastercam, NX CAM, Fusion 360 workflow automation
- Toolpath strategy selection (roughing, finishing)
- Cutting parameter optimization (feeds, speeds)
- Tool selection and library management
- Work holding and fixture consideration
- Toolpath simulation and verification
- G-code generation and post-processing
- Cycle time estimation and optimization

## Usage Guidelines

### Machining Strategy

#### Roughing Operations

1. **Material Removal Strategies**
   | Strategy | Application | Advantages |
   |----------|-------------|------------|
   | Adaptive/Dynamic | General roughing | Constant chip load |
   | Pocket | Enclosed areas | Efficient material removal |
   | Facing | Flat surfaces | Surface prep |
   | Plunge rough | Deep pockets | Axial chip evacuation |

2. **Stock Allowance**
   ```
   Finishing allowance = 0.25-0.5 mm (typical)
   Semi-finish allowance = 0.5-1.0 mm
   Rough allowance = Stock - finish - semi-finish
   ```

3. **Step-Over Guidelines**
   ```
   Adaptive roughing: 10-25% tool diameter
   Pocket roughing: 50-75% tool diameter
   Depth of cut: 1-2x tool diameter (end mills)
   ```

#### Finishing Operations

1. **Surface Finish Strategies**
   | Strategy | Application | Surface Finish |
   |----------|-------------|----------------|
   | Parallel | Flat surfaces | Ra 0.8-1.6 um |
   | Contour | Walls, profiles | Ra 0.8-1.6 um |
   | Scallop | 3D surfaces | Ra 1.6-3.2 um |
   | Pencil | Corners, fillets | Clean-up |

2. **Step-Over for Finish**
   ```
   Cusp height = r - sqrt(r^2 - (s/2)^2)

   For cusp height = 0.01 mm, r = 5 mm:
   Step-over s = 0.89 mm
   ```

### Cutting Parameters

#### Speed and Feed Calculation

```
Cutting Speed (SFM): V = pi * D * N / 12 (imperial)
                     V = pi * D * N / 1000 (metric)

Feed Rate: F = f * z * N

Where:
V = cutting speed (SFM or m/min)
D = tool diameter
N = spindle speed (RPM)
f = feed per tooth
z = number of teeth
F = feed rate (IPM or mm/min)
```

#### Material-Specific Parameters

| Material | Speed (SFM) | Feed/Tooth (in) | Notes |
|----------|-------------|-----------------|-------|
| Aluminum | 500-1000 | 0.004-0.008 | High spindle, coolant |
| Steel (mild) | 80-120 | 0.003-0.006 | Flood coolant |
| Steel (hard) | 50-80 | 0.002-0.004 | Reduce speed |
| Stainless | 60-100 | 0.002-0.005 | Rigid setup |
| Titanium | 40-60 | 0.002-0.004 | High pressure coolant |

### Tool Selection

#### End Mill Selection

| Application | Tool Type | Coating |
|-------------|-----------|---------|
| Aluminum roughing | 2-3 flute, polished | Uncoated/ZrN |
| Aluminum finishing | 2-3 flute, high helix | Uncoated |
| Steel roughing | 4+ flute, variable helix | AlTiN/TiAlN |
| Steel finishing | 4+ flute | AlTiN |
| Hardened steel | Ball nose, solid carbide | AlCrN |

#### Tool Life Management

```
Tool life tracking:
- Material removed (cm3)
- Cutting time (minutes)
- Parts produced

Replace at:
- Wear land > 0.3 mm
- Surface finish degradation
- Dimension out of tolerance
```

### Work Holding

#### Fixture Considerations

1. **Clamping Force**
   - Calculate cutting forces
   - Apply safety factor (2-3x)
   - Distribute clamp forces
   - Avoid part distortion

2. **Accessibility**
   - Clear all tool paths
   - Consider tool length
   - Allow chip evacuation
   - Enable coolant flow

### Program Verification

1. **Simulation Checks**
   - Tool collision detection
   - Fixture interference
   - Rapid traverse clearance
   - Stock remaining verification

2. **First Article**
   - Reduced feed rate (50%)
   - Single block mode
   - Verify dimensions
   - Adjust offsets as needed

## Process Integration

- ME-018: CNC Programming and Verification

## Input Schema

```json
{
  "part_model": "CAD file reference",
  "material": {
    "name": "string",
    "hardness": "string (e.g., HRC 30)"
  },
  "machine": {
    "type": "3-axis|4-axis|5-axis|lathe",
    "controller": "Fanuc|Siemens|Haas|other",
    "spindle_max": "number (RPM)",
    "rapids": "number (mm/min)"
  },
  "tolerances": {
    "dimensional": "number (mm)",
    "surface_finish": "number (Ra um)"
  },
  "production_volume": "prototype|low|medium|high"
}
```

## Output Schema

```json
{
  "program_info": {
    "program_number": "string",
    "operations": "number",
    "total_tools": "number"
  },
  "cycle_time": {
    "machining": "number (min)",
    "non-cutting": "number (min)",
    "total": "number (min)"
  },
  "tool_list": [
    {
      "tool_number": "number",
      "description": "string",
      "diameter": "number (mm)",
      "length": "number (mm)"
    }
  ],
  "setup_sheet": {
    "work_offset": "string",
    "fixture": "string",
    "stock_size": "array [L, W, H]"
  },
  "nc_file": "file reference"
}
```

## Best Practices

1. Verify model accuracy before programming
2. Use consistent tool numbering conventions
3. Include adequate clearance planes
4. Optimize tool paths for minimum air cutting
5. Simulate complete program before machining
6. Document setup requirements clearly

## Integration Points

- Connects with CAD Modeling for geometry
- Feeds into Process Planning for operations
- Supports FAI Inspection for first article
- Integrates with DFM Review for manufacturability

Related Skills

socket-programming

509
from a5c-ai/babysitter

Deep integration with socket APIs for TCP/UDP programming across platforms. Execute socket operations, analyze socket options and buffer configurations, debug connection states, and generate optimized socket code for different I/O models.

pymc-probabilistic-programming

509
from a5c-ai/babysitter

PyMC for flexible Bayesian modeling

linear-programming-solver

509
from a5c-ai/babysitter

Linear programming skill for resource allocation, scheduling, and optimization problems

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity

babysitter

509
from a5c-ai/babysitter

Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)

yolo

509
from a5c-ai/babysitter

Run Babysitter autonomously with minimal manual interruption.

user-install

509
from a5c-ai/babysitter

Install the user-level Babysitter Codex setup.

team-install

509
from a5c-ai/babysitter

Install the team-pinned Babysitter Codex workspace setup.

retrospect

509
from a5c-ai/babysitter

Summarize or retrospect on a completed Babysitter run.

resume

509
from a5c-ai/babysitter

Resume an existing Babysitter run from Codex.

project-install

509
from a5c-ai/babysitter

Install the Babysitter Codex workspace integration into the current project.

plan

509
from a5c-ai/babysitter

Plan a Babysitter workflow without executing the run.