mflux: Skill for Cursor

.cursor/skills/mflux-model-tiny-test/SKILL.md

mflux-model-tiny-test is a skill for Cursor from mflux-community/mflux. It costs 73 tokens per session (1,992 once invoked), scanned A, original, MIT.

A testing skill for creating a small, fast model-saving test for mflux. The test uses real model components at toy sizes to check that saving and loading a quantized model preserves its data, without downloads or image generation.

In plain words
What is it for?
Adding tiny round-trip tests when porting models or creating a fast companion to a slower model-saving test.
Why use it?
It provides quick checkpoint coverage for a slow process, making it easier to catch save/load errors during development.

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,315 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-model-tiny-test/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-model-tiny-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/mflux-community/mflux/mflux-model-tiny-test/github.svg)](https://agentmods.dev/skills/mflux-community/mflux/mflux-model-tiny-test)
Your own site
<a href="https://agentmods.dev/skills/mflux-community/mflux/mflux-model-tiny-test"><img src="https://agentmods.dev/badge/skills/mflux-community/mflux/mflux-model-tiny-test/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mflux-model-tiny-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/mflux-community/mflux/mflux-model-tiny-test"><img src="https://agentmods.dev/badge/skills/mflux-community/mflux/mflux-model-tiny-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,992 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00073 $0.01992
Opus 5 $0.00036 $0.00996
Sonnet 5 $0.00015 $0.00398
Haiku 4.5 $0.00007 $0.00199

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

Security

Grade A, and why

mflux-model-tiny-test 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 9d 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-model-tiny-test/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

mflux tiny model-saving test

A tiny test proves a model's quantized checkpoint survives a save/load roundtrip byte-for-byte, in about a second, without downloading anything. It builds the model's real component classes at toy dimensions and pushes them through the real save/load code path.

When to Use

  • You're asked to "make tiny test for <model>" or add a fast twin of a slow save/load test.
  • You ported a new model (see mflux-model-porting) and want cheap checkpoint coverage.

Related: mflux-testing for running the suite and golden-image rules.

Reference implementations

Read these before writing a new one — they are the source of truth:

  • tests/model_saving/tiny_checkpoint_helper.py — the shared harness
  • tests/model_saving/test_tiny_model_saving_ernie_image.py — components take explicit kwargs
  • tests/model_saving/test_tiny_model_saving_ideogram4.py — components take a Config dataclass

Do not trust code quoted in this skill over those files. The pattern landed as an RFC (PR #599, "proposal + demo on 2 models") and is expected to evolve.

Models that already have tiny tests: ernie_image, ideogram4.

What you write

One file, no src/ changes:

tests/model_saving/test_tiny_model_saving_<model>.py

The whole test is a single call into TinyCheckpointRoundtrip. The real work is figuring out how to build that model's components small. Match the two examples exactly:

  • class TestTiny<Model>ModelSaving
  • method test_tiny_quantized_checkpoint_roundtrips_exactly, decorated @pytest.mark.fast
  • a @staticmethod _tiny_components() returning the component dict
  • a comment naming the slow twin it mirrors

Instructions

1. Read the weight definition — it is the contract

src/mflux/models/<model>/weights/<model>_weight_definition.py

get_components() is authoritative: it gives the exact set of component names you must produce, and how many. While there, note two things:

  • quantization_group_size — a class attribute on the weight definition. Defaults to 64 but is not always 64 (boogu uses 32). Every tiny dimension must be a multiple of this model's value. Check with grep -n "quantization_group_size" src/mflux/models/<model>/weights/*.py.
  • skip_quantization=True on any component (krea2 and qwen each have one). In production, WeightApplier._quantize honors this flag and leaves the component unquantized. TinyCheckpointRoundtrip._quantize does not — it calls nn.quantize on every saved component regardless of the flag, so a skip_quantization component comes out of the "saved" side quantized (with scales/biases) while the reloaded "fresh" side stays unquantized (no scales/biases). The helper's exact key-set comparison (saved_weights.keys() == fresh_weights.keys()) will then fail for that component. This is a real gap in tiny_checkpoint_helper.py, not a quirk to work around in the test file — if you're writing a tiny test for krea2, qwen, or any other model with a skip_quantization component, stop and fix TinyCheckpointRoundtrip._quantize to skip those components (mirroring WeightApplier._quantize) rather than special-casing it in the test.

Read the full file on GitHub · 123 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. 9d ago First seen · 123 lines · 73 tokens per session scan A de0b9d53e7ed

Subscribe to this mod's changes

mflux-model-tiny-test is a skill published in the GitHub repository mflux-community/mflux (2,315 stars, last pushed 5d ago), licensed MIT. It adds 73 tokens to every session and 1,992 once invoked, about $0.0004 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.