Skip to content
Back to skills

Coremltools

ASecurity

"Operate Core ML Tools workflows for model conversion, Core ML

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
toolspythonbashdebuggingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill coremltools --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coremltools?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Coremltools
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-coremltools/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-coremltools)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: coremltools
description: "Operate Core ML Tools workflows for model conversion, Core ML
  artifact I/O, optimization, MIL debugging, and platform-aware
  troubleshooting."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# Core ML Tools

Use this repo skill when a task involves the `coremltools` Python package, Core ML model conversion, `.mlmodel`/`.mlpackage` artifacts, Core ML optimization/compression, MIL graph debugging, or macOS-vs-Linux Core ML runtime constraints.

## Start here

1. Confirm the package imports in the active environment:

   ```bash
   python scripts/check_coremltools_env.py
   ```

   Add `--smoke` only when you want a tiny MIL-to-MLProgram conversion/save check without prediction.
2. Identify the task family from the route map below.
3. Check [capability map](references/capability-map.md) for dependency/platform gates before promising that a workflow is verified.
4. Use [troubleshooting](references/troubleshooting.md) for install/import/native-library/platform failures that affect multiple workflows.
5. Use [repo provenance](references/repo-provenance.md) before deciding whether this skill is stale for a newer checkout.

## Route map

| User task | Read |
| --- | --- |
| Convert PyTorch, TensorFlow, MIL, scikit-learn, XGBoost, LightGBM, or LibSVM models to Core ML | [`sub-skills/convert-models/`](sub-skills/convert-models/) |
| Choose `ct.convert` inputs/outputs, deployment targets, `mlprogram` vs `neuralnetwork`, precision, pass pipelines, or optional framework dependencies | [`sub-skills/convert-models/`](sub-skills/convert-models/) |
| Load, save, inspect, edit, or package existing `.mlmodel`/`.mlpackage` artifacts | [`sub-skills/model-io-and-prediction/`](sub-skills/model-io-and-prediction/) |
| Use `MLModel.predict`, compiled models, compute units/devices/plans, stateful prediction, image/multiarray prediction inputs, or macOS runtime checks | [`sub-skills/model-io-and-prediction/`](sub-skills/model-io-and-prediction/) |
| Quantize, palettize, prune, decompress, or inspect compression metadata for Core ML packages | [`sub-skills/optimize-models/`](sub-skills/optimize-models/) |
| Use optional `coremltools.optimize.torch` workflows with calibration data, fine-tuning, QAT, or Torch-side compression before export | [`sub-skills/optimize-models/`](sub-skills/optimize-models/) |
| Build/inspect MIL programs, control pass pipelines, register custom/composite ops, diagnose typed execution, or use experimental debug/perf utilities | [`sub-skills/mil-and-debugging/`](sub-skills/mil-and-debugging/) |
| Understand package installation, optional dependencies, source-build scripts, or test-script boundaries | [`references/install-and-build.md`](references/install-and-build.md) |

## Dependency and platform rules

- Base `coremltools` import is not enough to verify every converter. PyTorch, TensorFlow, scikit-learn, XGBoost, LightGBM, and LibSVM routes are optional dependency-gated.
- Linux can convert and inspect many artifacts, but `MLModel.predict`, `CompiledMLModel`, compute-device/compute-plan APIs, and ModelRunner workflows generally require macOS Core ML runtime support.
- `mlprogram` artifacts usually save as `.mlpackage`; many older/classic neural-network specs can save as `.mlmodel`.
- Use `skip_model_load=True` when conversion should avoid runtime loading on the current host.
- Source checkouts can lack native runtime libraries included in wheels. If ML Program save fails with `BlobWriter`/`libmilstoragepython`, read [install-and-build](references/install-and-build.md).

## Bundled helpers

- [`scripts/check_coremltools_env.py`](scripts/check_coremltools_env.py): package import, optional dependency gates, and optional tiny conversion smoke.
- [`sub-skills/convert-models/scripts/convert_torch_toy.py`](sub-skills/convert-models/scripts/convert_torch_toy.py): tiny PyTorch-to-Core ML conversion smoke when PyTorch is installed.
- [`sub-skills/model-io-and-prediction/scripts/inspect_mlmodel.py`](sub-skills/model-io-and-prediction/scripts/inspect_mlmodel.py): spec-only inspection of `.mlmodel` or `.mlpackage` artifacts.
- [`sub-skills/optimize-models/scripts/optimize_coreml_smoke.py`](sub-skills/optimize-models/scripts/optimize_coreml_smoke.py): tiny Core ML optimization smoke.
- [`sub-skills/mil-and-debugging/scripts/mil_smoke.py`](sub-skills/mil-and-debugging/scripts/mil_smoke.py): MIL Builder conversion/save smoke for `mlprogram` or `neuralnetwork`.

## Safe operating stance

- Do not run long training, downloads, full test suites, or prediction checks unless the user explicitly requests them and the required framework/platform is present.
- Prefer tiny conversion/spec/optimization smokes before applying guidance to large models.
- Preserve original source-model semantics when debugging conversion; shrink to a reproducer before introducing custom ops or pass-pipeline changes.
- Keep package-operation tasks separate from repository-maintenance tasks. Use maintainer scripts only when the user is working in the repository checkout and wants source build/test behavior.

Files in this skill

  • SKILL.md5 KB
  • references/capability-map.md4.3 KB
  • references/install-and-build.md4.3 KB
  • references/repo-provenance.md2 KB
  • references/repo-routing-metadata.json537 B
  • references/troubleshooting.md4.5 KB
  • scripts/check_coremltools_env.py6.3 KB
  • sub-skills/convert-models/SKILL.md2.9 KB
  • sub-skills/convert-models/references/api-reference.md10.7 KB
  • sub-skills/convert-models/references/troubleshooting.md9.3 KB
  • sub-skills/convert-models/references/workflows.md9.8 KB
  • sub-skills/convert-models/scripts/convert_torch_toy.py6 KB
  • sub-skills/mil-and-debugging/SKILL.md2.5 KB
  • sub-skills/mil-and-debugging/references/api-reference.md8.1 KB
  • sub-skills/mil-and-debugging/references/troubleshooting.md9.4 KB
  • sub-skills/mil-and-debugging/references/workflows.md10.5 KB
  • sub-skills/mil-and-debugging/scripts/mil_smoke.py10.9 KB
  • sub-skills/model-io-and-prediction/SKILL.md1.8 KB
  • sub-skills/model-io-and-prediction/references/api-reference.md6.8 KB
  • sub-skills/model-io-and-prediction/references/troubleshooting.md6.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.