← Browse

@zackees/fastled-wasm

A

Cursor Rules for FastLED WASM Project

rulescursor

Install

agr install @zackees/fastled-wasm --target cursor

Writes 1 file into .cursor/rules/, pinned to git-ae794180.

  • .cursorrules

Document

Cursor Rules for FastLED WASM Project

CRITICAL: Python Command Usage

ALWAYS use uv to run Python code, NOT python or python3!

Command Guidelines:

  • ✅ Use: uv run <script.py>
  • ✅ Use: uv run -m <module>
  • ✅ Use: uv run python <script.py> (if explicitly needed)
  • ❌ NEVER use: python <script.py>
  • ❌ NEVER use: python3 <script.py>

Examples:

  • Instead of python src/fastled/cli.py, use uv run src/fastled/cli.py
  • Instead of python -m pytest, use uv run -m pytest
  • Instead of python3 build_exe.py, use uv run build_exe.py

Rationale:

  • This project uses uv for Python package and environment management
  • Using python or python3 directly may use the wrong Python version or miss dependencies
  • uv ensures consistent execution with the project's specified Python version and dependencies

Testing:

  • Follow the user rule: run unit tests with bash test
  • For manual testing, use uv run prefix for any Python commands

Development Workflow:

  1. Use uv for all Python execution
  2. Ensure virtual environment is managed by uv
  3. Install dependencies with uv add <package>
  4. Run scripts with uv run <script>

Emoji/Emoticon Usage

ALWAYS use the EMO() function for emojis, NEVER hardcode emojis directly!

Guidelines:

  • ✅ Use: from fastled.emoji_util import EMO then EMO('⚠️', 'WARNING:')
  • ✅ Use: from fastled.emoji_util import safe_print for Unicode-safe printing
  • ❌ NEVER use: hardcoded emojis like print("⚠️ Warning")
  • ❌ NEVER use: raw Unicode without fallback handling

Common Patterns:

  • Warning messages: EMO('⚠️', 'WARNING:')
  • Success messages: EMO('✅', 'SUCCESS:')
  • Error messages: EMO('❌', 'ERROR:')
  • Info messages: EMO('ℹ️', 'INFO:')
  • Playwright/browser: EMO('🎭', '*')
  • Package/install: EMO('📦', '*')

Rationale:

  • Windows cmd.exe has poor Unicode support and will crash on raw emojis
  • The EMO() function provides fallback text for systems that don't support emojis
  • Ensures consistent behavior across all platforms (Windows, macOS, Linux)
  • Prevents application crashes due to encoding issues

Examples:

# Good - with EMO function
from fastled.emoji_util import EMO
print(f"{EMO('⚠️', 'WARNING:')} Debug mode detected with Playwright installed")

# Bad - hardcoded emoji
print("⚠️ Debug mode detected with Playwright installed")

Additional Rules:

  • When suggesting Python commands, always prefix with uv run
  • When creating scripts that execute Python, use uv run in the script
  • When documenting Python usage, emphasize uv run syntax
  • Update any existing scripts that use python or python3 to use uv run
  • When adding user-facing messages with emojis, always use the EMO() function

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-ae794180cfd22026-08-06