agentleFS
gordon1210gordon1210/agent-goodies/skills/add-tauri-native-window-effects/SKILL.md

add-tauri-native-window-effects

Skill0 starsChanged 4 months agoMITView on GitHub

Add and debug native window materials in Tauri 2 desktop apps on macOS and Windows. Use when implementing macOS vibrancy or Liquid Glass, Windows Mica or Acrylic, a translucent sidebar or titlebar, transparent WebView content, platform-specific opaque fallbacks, or diagnosing a native effect hidden behind gray, white, black, Canvas, or other opaque frontend backgrounds.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the shared rendering stack before editing any target.

    line 15
  2. Distinctive:

    Use their snippets as baselines, then adapt crate and framework APIs to the versions already installed in the target repository.

    line 22
  3. Distinctive:

    Check repository rules before launching a GUI.

    line 34
  4. Very specific:

    Keep the normal application background until the native effect reports success.

    line 46
  5. Very specific:

    Use isTauri() only to distinguish a Tauri WebView from a normal browser.

    line 50
  6. Distinctive:

    Keep ordinary content panes explicitly opaque.

    line 75
  7. Distinctive:

    Keep permanent transparency overrides outside Tailwind cascade layers.

    line 76
  8. Very specific:

    Do not substitute CSS backdrop-filter for a native window material.

    line 78
  9. Distinctive:

    Run frontend tests, type checking, linting, and a production build.

    line 84
  10. Distinctive:

    Run Rust formatting, tests, and clippy for the Tauri crate.

    line 85
  11. Distinctive:

    Remove diagnostic styles, commands, timers, and logging before finishing.

    line 90
  12. Distinctive:

    After two failed hypotheses, return to the native activation result and computed backgrounds instead of adding more blur, opacity, or …

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add Tauri Native Window Effects

Implement a native operating-system material behind a transparent Tauri WebView. Treat the result as one rendering stack: the native effect, transparent window, transparent WebView ancestors, and intentionally opaque content panes must all agree.

Read the relevant references

Read the shared rendering stack before editing any target. Then read only the platform reference that applies:

  • macOS effects for AppKit vibrancy or Liquid Glass.
  • Windows effects for Mica or Acrylic.

Use their snippets as baselines, then adapt crate and framework APIs to the versions already installed in the target repository.

Establish the constraints

  1. Inspect the Tauri, WebView, frontend, Tailwind, and native-effect versions, plus the minimum supported operating-system versions.
  2. Identify which surfaces should reveal native material and which must remain opaque. Prefer a transparent shell with explicit opaque content panes.
  3. Choose the platform material deliberately. Do not present macOS vibrancy, Liquid Glass, Windows Mica, and Acrylic as interchangeable visual systems.
  4. Preserve unsupported platforms with an opaque, readable fallback.
  5. Check repository rules before launching a GUI. Ask before opening or activating the app unless the user already authorized it.

Choose one native effect owner

The supported recipe uses runtime window-vibrancy ownership and its activation result. Never stack it with static windowEffects on the same window. Follow the shared reference's migration steps for an existing static owner; static configuration alone cannot satisfy the activation gate.

Gate transparency on real activation

Keep the normal application background until the native effect reports success. Let the native layer return the activated effect name or no effect; set a data-native-window-effect marker only for a real effect.

Use isTauri() only to distinguish a Tauri WebView from a normal browser. It does not identify macOS or Windows and must not authorize transparency by itself. On errors or unsupported platforms, leave the marker absent and keep the interface opaque.

Route each platform

  • On macOS, prefer semantic AppKit vibrancy such as Sidebar for the classic path. Treat macOS 26 Liquid Glass as a separate, version-gated path.
  • On Windows 11, prefer Mica for a persistent application or navigation backdrop. Use Acrylic only when genuine see-through frosted glass is wanted and its power and resizing costs are acceptable. Do not silently fall back from Mica to Acrylic.
  • On Linux, keep an opaque fallback. Native desktop blur is compositor-owned and is outside the portable Tauri baseline. Investigate a compositor-specific implementation only when the user explicitly requests that target.

Implement the complete stack

  1. Configure target-specific dependencies and window settings.
  2. Apply the selected effect to the real Tauri WebView window.
  3. Return an activation result that distinguishes success from unsupported or failed activation.
  4. Make html, body, the root node, and every shell ancestor above the material region transparent only after success.
  5. Keep ordinary content panes explicitly opaque.
  6. Keep permanent transparency overrides outside Tailwind cascade layers.

Do not substitute CSS backdrop-filter for a native window material. It only filters content inside the WebView and cannot reveal the desktop behind the native window.

Validate the result

  • Run frontend tests, type checking, linting, and a production build.
  • Run Rust formatting, tests, and clippy for the Tauri crate.
  • Compile every supported platform path in CI when available.
  • Inspect light, dark, high-contrast, and disabled-transparency fallbacks.
  • Confirm opaque content, scrolling, titlebar drag regions, and controls still work.
  • Remove diagnostic styles, commands, timers, and logging before finishing.

After two failed hypotheses, return to the native activation result and computed backgrounds instead of adding more blur, opacity, or fallback layers.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.