mflux: Skill for Cursor

.cursor/skills/mflux-debugging/SKILL.md

mflux-debugging is a skill for Cursor from mflux-community/mflux. It costs 30 tokens per session (2,591 once invoked), scanned A, original, MIT.

A debugging workflow for checking whether an MLX model port matches a PyTorch or Diffusers reference. MLX is Apple's machine-learning framework, while a model port is a version adapted to another framework.

In plain words
What is it for?
Use it to investigate mismatched shapes, layouts, positional embeddings, scheduler calculations, or data types, and to verify numerical agreement before refactoring.
Why use it?
It creates repeatable tensor and image comparisons that show where the two implementations first produce different results.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is mflux-community/mflux's own configuration. It tells Cursor how to work on mflux itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mflux configures →

About the project

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.

mflux-community/mflux · 2,311 stars · on GitHub

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/mflux-community/mflux/main/.cursor/skills/mflux-debugging/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mflux-community/mflux

Made for: Cursor.

Wrote 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.

agentmods badge for mflux-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/mflux-community/mflux/mflux-debugging.svg)](https://agentmods.dev/skills/mflux-community/mflux/mflux-debugging)
Your own site
<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>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,591 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 7d ago against content hash c5419364d57c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

.cursor/skills/mflux-debugging/SKILL.md · 180 lines

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 uv to run Python: uv run python -m ...
  • If you run pytest, preserve outputs: MFLUX_PRESERVE_TEST_OUTPUT=1 (see mflux-testing and 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 seed is 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/) and mflux/ 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.

Read the full file on GitHub · 180 lines

Changes

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.

  1. 7d ago First seen · 180 lines · 30 tokens per session scan A c5419364d57c

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

smiles-validation

Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.

synthetic-sciences/openscience · 24 tokens

trace

Evidence-driven tracing lane that orchestrates competing tracer hypotheses in Claude built-in team mode.

Yeachan-Heo/oh-my-claudecode · 18 tokens

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…

Blaizzy/mlx-vlm · 74 tokens

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.

Blaizzy/mlx-vlm · 67 tokens

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…

synthetic-sciences/openscience · 71 tokens

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.

synthetic-sciences/openscience · 62 tokens