MF

Runs mflux test suites and manages image comparisons, ensuring golden image references are only updated when requested.

Install

mkdir -p .claude/skills/mflux-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3494" && unzip -o skill.zip -d .claude/skills/mflux-testing && rm skill.zip

Installs to .claude/skills/mflux-testing

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run tests in mflux (fast/slow/full), preserve image outputs, and handle golden image diffs safely.
98 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Execute full, fast, or slow mflux test suites
  • Validate golden image consistency
  • Manage test image artifact preservation
  • Identify regressions in CLI behavior
  • Generate test failure summaries

How it works

It wraps standard pytest execution with environment variables (like `MFLUX_PRESERVE_TEST_OUTPUT`) to ensure images are persisted for manual inspection.

Inputs & outputs

You give it
Test suite command or specific target
You get back
Test execution results and artifact paths

When to use mflux-testing

  • Run the full mflux test suite
  • Execute fast tests without image generation
  • Review failing image generation tests
  • Validate golden image mismatches

About this skill

mflux testing

This repo uses pytest with image-producing tests. Always preserve outputs for inspection and never update reference images unless explicitly asked.

When to Use

  • You need to run tests (fast/slow/full) or debug failing tests.
  • There are image/golden mismatches and you need to report paths/output for review.

Instructions

  • Prefer the Makefile test targets:
    • make test-fast (fast tests, no image generation)
    • make test-slow (slow tests, image generation)
    • make test (default selection, skips slow model tests)
    • make test-all (full suite, slow tests download model weights)
  • Always keep MFLUX_PRESERVE_TEST_OUTPUT=1 on test runs (already built into the Makefile test targets).
  • If a change affects defaults, config resolution, metadata fields, or CLI behavior, add or update tests that cover the changed behavior directly instead of relying only on manual verification.
  • If tests fail:
    • Summarize the failing test names and the key assertion output.
    • Point to any generated images/artifacts on disk for manual review.
  • Do not regenerate/replace reference (“golden”) images unless the user explicitly requests it.

Updating golden images (new model or hardware refresh)

Golden tests compare generated PNGs to tests/resources/reference_*.png (typically 15% mismatch threshold).

When to update (only with explicit user approval):

  • After validating the port on target hardware (CI Mac) via slow tests with MFLUX_PRESERVE_TEST_OUTPUT=1
  • After choosing a stable prompt/seed/settings via diffusers comparison and/or latent-injection confidence (mflux-debugging)
  • When old references used a bad prompt (e.g. ambiguous subject) or wrong seed for mflux’s RNG

Workflow:

  1. Run slow test → inspect tests/resources/output_*.png vs reference_*.png
  2. If output is correct but reference is stale, re-run generation with same test parameters and replace reference PNGs
  3. Commit test + reference images together with a clear message (e.g. test(<model>): update golden images for local hardware)

Important: Golden tests lock mflux-native sampling (mx.random + mflux schedulers), not diffusers pixel parity. A good diffusers side-by-side or injected-latent run builds confidence in the model code; the golden still reflects mflux’s full recipe on CI hardware.

Manual validation (config resolution + local model paths)

Use when a change touches model config resolution, mflux-save, or the model’s generate CLI, or when a PR fixes local model-path handling for the model under investigation. Refer to the mflux-cli skill to find the correct generate command for the model you are testing.

  • Run a local-path quantize/save:
    • Use the mflux-cli skill to look up the correct command and flags.
    • Verify CLI usage with the command’s --help before running it.
    • Save to a known location (e.g., Desktop) to make follow-up steps explicit.
  • Run generation from the saved model using the correct model-specific generate CLI:
    • Use the mflux-cli skill to find the generate command and required flags.
    • Verify CLI usage with the command’s --help before running it.
  • If the model has multiple size variants, repeat the above for each variant to confirm the correct overrides are applied.
  • Do not commit output artifacts; delete or leave them untracked.

When not to use it

  • Generic project testing
  • Environment without mflux infrastructure

Prerequisites

pytestMflux test infrastructure

Limitations

  • Relies on manual golden image updates
  • High disk usage due to image artifacts
  • Requires strict threshold validation

How it compares

Standardizes testing for generative image outputs with specific golden-file comparison logic.

Compared to similar skills

mflux-testing side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
mflux-testing (this skill)12moNo flagsIntermediate
vitest416moNo flagsIntermediate
svelte-expert119moNo flagsIntermediate
implementing-cards72moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

vitest

antfu

Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.

41183

svelte-expert

Raudbjorn

Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.

11107

implementing-cards

bcollazo

Fill out the implementation of effects of different attacks, abilities, and trainer cards in this Pokemon TCG Pocket engine codebase.

790

zod-4

prowler-cloud

Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.

1260

csharp-pro

sickn33

Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.

953

write-unit-tests

tldraw

Writing unit and integration tests for the tldraw SDK. Use when creating new tests, adding test coverage, or fixing failing tests in packages/editor or packages/tldraw. Covers Vitest patterns, TestEditor usage, and test file organization.

545

Search skills

Search the agent skills registry