cursorrules

A Cursor IDE rule set for the devices-mcp project. It defines when the rules are read and restricts Unicode emojis and Linux-style commands in certain coding contexts.

In plain words
What is it for?
Use it when working on devices-mcp in Cursor, especially in Python files, PowerShell scripts, logger messages, API parameters, and MCP responses.
Why use it?
It helps prevent crashes, encoding problems, and command mistakes caused by unsupported characters or shell syntax.

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/sandraschi/devices-mcp/cursorrules
Clone the repo
git clone --depth 1 https://github.com/sandraschi/devices-mcp

Made for: Cursor.

Per session 720 This file is loaded in full into every session.
When invoked 720 The same file โ€” it is already loaded in full.
Security scan C 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.00720 $0.00720
Opus 5 $0.00360 $0.00360
Sonnet 5 $0.00144 $0.00144
Haiku 4.5 $0.00072 $0.00072

Measured yesterday against content hash 40d61066a71b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

cursorrules scanned grade C 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `rm -rf` (use `Remove-Item -Recurse -Force`)
.cursorrules ยท 84 lines

How it starts

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

Cursor Rules: devices-mcp

Read at: Cursor IDE workspace open + each new chat session

Proof of read: hi! (acknowledged)

๐Ÿšจ CRITICAL: No Unicode Emojis (Crash Prevention)

DEADLY EMOJIS (NEVER USE):

  • ๐ŸŽ‰ (partypopper) - causes immediate crashes
  • ๐Ÿ† (trophy) - system instability
  • ๐Ÿš€ (rocket) - serialization failures
  • Any Unicode emoji in Python/PS1/logger contexts

STRICT BAN in these file types:

  • Python files (.py) - All Unicode emojis forbidden
  • PowerShell scripts (.ps1) - All Unicode emojis forbidden
  • Logger messages - logger.info("๐Ÿš€ Started") โ†’ logger.info("STARTED")

FORBIDDEN contexts:

  • Logger messages (logger.info("๐Ÿš€ Started")) - causes crashes and restart loops
  • API parameters - serialization failures
  • MCP responses - client crashes
  • Error messages - encoding failures
  • Variable names, function names, comments

โœ… ALLOWED in HTML for pretty UI:

  • Emojis can be used in HTML templates and UI strings
  • Web dashboard displays and user-facing content
  • README.md and documentation files

โœ… SAFE alternatives:

  • ASCII text only: "Process started" instead of "๐Ÿš€ Started"
  • NO Unicode emojis in Python/PS1/logger contexts EVER

๐Ÿง CRITICAL: No Linux Syntax in PowerShell Chats

๐Ÿšซ FORBIDDEN in PowerShell environments:

  • && (command chaining)
  • || (logical OR)
  • | (pipes)
  • ; (command separators)
  • & (background)
  • mkdir -p (use New-Item -ItemType Directory -Force)
  • ls -la (use Get-ChildItem)
  • rm -rf (use Remove-Item -Recurse -Force)

โœ… REQUIRED PowerShell syntax:

# Directory operations
New-Item -ItemType Directory -Force -Path "folder"
Get-ChildItem -Recurse
Remove-Item -Recurse -Force "folder"

# Command separation (one per line)
command1
if ($?) { command2 }

# Virtual environment
build_venv\Scripts\activate

Rule enforcement: Any output with Linux syntax or Unicode emojis will be rejected.

๐ŸชŸ CRITICAL: Windows-Only Repository Rules

๐Ÿšซ ABSOLUTE BAN on Unix/Linux assumptions:

  • This is a Windows-only MCP server - no Linux support
  • .exe files are Windows executables - they don't run on Linux
  • No Unix shell scripts (.sh) - pointless and confusing for Windows-only project
  • No cross-platform wrappers - repository integrates with Windows hardware only

Read the full file on GitHub ยท 84 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. yesterday First seen ยท 84 lines ยท 720 tokens per session scan C 40d61066a71b

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository sandraschi/devices-mcp (2 stars, last pushed 15d ago), licensed MIT. It adds 720 tokens to every session, about $0.0036 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.