Skip to content
Back to skills

Model Export

ASecurity

Export a fitted Python ML model to native code with m2cgen via API or CLI.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
toolspythonshellapi

Works with

  • cli
  • api

Security analysis

A100/100

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

Scanned September 8, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Model Export?

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

Security grade badge for Model Export
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-model-export-07105f15/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-model-export-07105f15)

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: model-export
description: "Export a fitted Python ML model to native code with m2cgen via API or CLI."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# model-export

Use this skill when a user already has a fitted Python model and wants m2cgen-generated native code.

## Route by intent

- **In-memory Python object**: use `references/api-reference.md`.
- **Serialized model or shell workflow**: use `references/cli-reference.md`.
- **Supported languages, model families, and output shapes**: use `references/model-overview.md`.
- **End-to-end export flows**: use `references/workflows.md`.
- **Failure handling**: use `references/troubleshooting.md`.

## In scope

- Export through the public `m2cgen.export_to_*` functions.
- Export through `python -m m2cgen` or the installed `m2cgen` console script.
- Pickle/joblib input, stdin piping, recursion-limit tuning, and language-specific naming flags.

## Out of scope

- Model training or fitting.
- Executing generated code in foreign runtimes.
- Maintainer release/publishing workflows.
- Bulk generated-example regeneration tooling; treat it as maintainer-side reference material only.
- Any workflow that depends on the original source checkout at runtime.

## Quick check

Run `python scripts/smoke_export.py` for a narrow, deterministic check of public export calls using a model the script creates locally. It executes only the generated Python export; it does not compile or run the other target-language outputs and is not a replacement for end-to-end fixture coverage.

Add `--cli` to exercise the `python -m m2cgen` file and stdin paths. `--joblib` and `--console-script` are optional paths that require `--cli`; passing either without `--cli` is rejected rather than silently reporting a partial check. Neither optional path is exercised by the default command. Read `references/workflows.md` before running it where executing generated Python, invoking a PATH-resolved console script, or the temporary-file lifecycle matters.

Files in this skill

  • SKILL.md2 KB
  • references/api-reference.md3.1 KB
  • references/cli-reference.md4 KB
  • references/model-overview.md6.4 KB
  • references/troubleshooting.md4.4 KB
  • references/workflows.md3.8 KB
  • scripts/smoke_export.py9 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.