MFLUX is a native MLX implementation of generative image models that runs locally on Mac computers. It is for generating images with supported models through command-line tools or a Python API. The catalogue skills and instruction support workflows built around these image-generation models.
Borrowing it
Nothing to install: this file belongs to mflux-community/mflux. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/mflux-community/mflux/main/.cursor/skills/mflux-debugging/SKILL.mdgit clone --depth 1 https://github.com/mflux-community/mfluxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mflux-community/mflux/mflux-debugging)<a href="https://agentmods.dev/skills/mflux-community/mflux/mflux-debugging"><img src="https://agentmods.dev/badge/skills/mflux-community/mflux/mflux-debugging.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.02591 |
| Opus 5 | $0.00015 | $0.01295 |
| Sonnet 5 | $0.00006 | $0.00518 |
| Haiku 4.5 | $0.00003 | $0.00259 |
Grade A, and why
mflux-debugging 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mflux debugging (MLX parity vs PyTorch/diffusers)
Use this skill when you are porting a model to MLX and need to prove numerical parity (or isolate where it diverges) versus a PyTorch reference implementation (often from diffusers).
This skill defaults to export-then-compare:
- Run the reference once and export deterministic artifacts (tensors + optional images).
- Load those artifacts in MLX and compare with clear thresholds.
When to Use
- You suspect a port mismatch (wrong shapes/layout, RoPE, scheduler math, dtype casting, etc).
- You want a repeatable workflow to narrow down the first layer/block where outputs diverge.
- You need evidence of correctness before refactoring (see
mflux-model-porting).
Ground Rules (repo norms)
- Use
uvto run Python:uv run python -m ... - If you run pytest, preserve outputs:
MFLUX_PRESERVE_TEST_OUTPUT=1(seemflux-testingand the justfile test recipes). - Do not update or replace reference (“golden”) images unless explicitly asked.
- Debug artifacts (tensor dumps) should live in a local folder and must not be committed unless explicitly asked.
- If you need the broader porting workflow (milestones, ordering, when to refactor), follow
mflux-model-porting. - RNG warning: PyTorch and MLX RNGs are different. Matching the same integer
seedis not enough for parity—export the exact initial noise/latents from the reference and load them in MLX. - Practical setup: the PyTorch reference repo (often
diffusers/) andmflux/are frequently next to each other on disk (e.g. both on your Desktop). Use absolute paths when in doubt.
Default Workflow (export-then-compare)
Preferred workflow: two tiny scripts + inline dumps
For day-to-day debugging, prefer a minimal paired repro:
- One simple script in the reference repo (often
diffusers/), e.g.diffusers/flux2_klein_edit_debug.py - One simple script in
mflux/, e.g.mflux/flux2_klein_edit_debug.py
Keep them “boring”: hardcoded variables, no cli, no framework, and just a few np.savez(...) / mx.save(...) lines at the right spot.
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.
- 7d ago First seen · 180 lines · 30 tokens per session scan A c5419364d57c
mflux-debugging is a skill published in the GitHub repository mflux-community/mflux (2,311 stars, last pushed 4d ago), licensed MIT. It adds 30 tokens to every session and 2,591 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.
Other skills, from other repositories
smiles-validation
Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.
trace
Evidence-driven tracing lane that orchestrates competing tracer hypotheses in Claude built-in team mode.
benchmarking
Use this skill when the user wants to benchmark an MLX-VLM change and present the numbers in a PR — fork-vs-main A/B comparisons, isolated-module micro-benchmarks, median-of-N timing with warmup, peak-memory reporting, correctness checks, parameter sweeps, and self-contained reproducible bench scripts to paste into a…
reproducible-github-issues
Use this skill when the user wants to create, improve, or triage a reproducible GitHub issue for MLX-VLM, including bug reports from CLI inference, server inference, model loading, processors, media inputs, dependency setup, crashes, wrong outputs, or performance regressions.
clinical-reports
Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation (SOAP, H&P, discharge summaries). Full support with templates, regulatory compliance (HIPAA, FDA, ICH-GCP), and validation…
imaging-data-commons
Query and download public cancer imaging data from NCI Imaging Data Commons using idc-index. Use for accessing large-scale radiology (CT, MR, PET) and pathology datasets for AI training or research. No authentication required. Query by metadata, visualize in browser, check licenses.