cursorrules

Cursor rules documenting a plan for making a Windows-focused application work across Windows, macOS, and Linux.

In plain words
What is it for?
Use them when updating path handling, window management, process launching, or keyboard and mouse automation for multiple operating systems.
Why use it?
They record platform-specific problems and the planned fixes, so future work can follow the migration consistently.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/johnneerdael/multiplatform-cursor-mcp/cursorrules
Clone the repo
git clone --depth 1 https://github.com/johnneerdael/multiplatform-cursor-mcp

Made for: Cursor.

Per session 1,045 This file is loaded in full into every session.
When invoked 1,045 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
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 $0.01045 $0.01045
Opus 5 $0.00522 $0.00522
Sonnet 5 $0.00209 $0.00209
Haiku 4.5 $0.00104 $0.00104

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

Security

Grade B, and why

cursorrules scanned grade B with 1 finding 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 2d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Bash script with sudo - Creates launch agent for auto-start
.cursorrules · 143 lines

How it starts

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

Cross-Platform Migration Task

Issues Found

  1. Windows-specific Path Handling

    • Using process.env.LOCALAPPDATA for Cursor.exe path
    • Windows-style path separators in path.join operations
    • Hard-coded Windows paths in documentation
  2. Windows-specific Dependencies

    • node-windows dependency for window management
    • Heavy reliance on node-window-manager for Windows-specific window operations
    • robotjs for Windows-specific keyboard/mouse automation
  3. Windows-specific APIs

    • Windows-specific window handling in WindowsApiService
    • Windows-specific process management
    • Windows-specific keyboard event handling

Migration Plan

[X] 1. Path Handling - Replace Windows-specific path handling with path.join and process.platform checks - Update documentation with cross-platform examples - Create platform-specific path resolvers

[X] 2. Window Management - Create platform-agnostic window management interface - Implement platform-specific adapters (Windows/MacOS/Linux) - Replace direct Windows API calls with adapter interface

[X] 3. Process Management - Create cross-platform process spawning logic - Handle platform-specific executable paths - Implement platform-specific process detection

[X] 4. Keyboard/Mouse Automation - Create platform-agnostic input automation interface - Replace robotjs with @nut-tree/nut-js - Implement platform-specific input handling

[X] 5. Configuration - Add platform-specific configuration options - Create default configs for each supported platform - Update environment variable handling

Completed Tasks

  1. Created PathResolver utility for cross-platform path handling
  2. Created platform-agnostic window management interface
  3. Implemented Windows and macOS window managers
  4. Implemented Linux window manager using xdotool
  5. Created cross-platform input automation service using @nut-tree/nut-js
  6. Updated CursorInstanceManager to use new abstractions
  7. Updated documentation with cross-platform instructions
  8. Added comprehensive test suite for window managers
  9. Added structured error handling system
  10. Added logging system with context tracking
  11. Added tests for input automation service
  12. Added tests for path resolver
  13. Created platform-specific installation scripts
  14. Added integration tests for window management
  15. Added integration tests for input automation
  16. Added GitHub Actions workflows for testing and releases

Read the full file on GitHub · 143 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. 2d ago First seen · 143 lines · 1,045 tokens per session scan B c59a78beff48

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository johnneerdael/multiplatform-cursor-mcp (67 stars, last pushed 1y ago), licensed MIT. It adds 1,045 tokens to every session, about $0.0052 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.