devices-mcp: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from sandraschi/devices-mcp. It costs 884 tokens per session, scanned C, original, MIT.

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

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

This is sandraschi/devices-mcp's own configuration. It tells Cursor how to work on devices-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything devices-mcp configures โ†’

Reuse

Borrowing it

Nothing to install: this file belongs to sandraschi/devices-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sandraschi/devices-mcp/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/sandraschi/devices-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/sandraschi/devices-mcp/cursorrules/github.svg)](https://agentmods.dev/rules/sandraschi/devices-mcp/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/sandraschi/devices-mcp/cursorrules"><img src="https://agentmods.dev/badge/rules/sandraschi/devices-mcp/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80ร—15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80ร—15 button for cursorrules

Your own site ยท 80ร—15
<a href="https://agentmods.dev/rules/sandraschi/devices-mcp/cursorrules"><img src="https://agentmods.dev/badge/rules/sandraschi/devices-mcp/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 884 This file is loaded in full into every session.
When invoked 884 The same file โ€” it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file โ€” not that it is safe.
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.1 $0.00884 $0.00884
Opus 5.5 $0.00354 $0.00354
Sonnet 5.5 $0.00177 $0.00177
Haiku 4.5 $0.00088 $0.00088

Measured 23d ago against content hash 703c49200365, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 23d 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.

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 ยท 97 lines

How it starts

The opening of the file, as written. The whole thing โ€” 97 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 ยท 97 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. 23d ago Changed ยท +13 lines ยท +164 tokens per session 703c49200365
  2. 1mo ago 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 (4 stars, last pushed yesterday), licensed MIT. It adds 884 tokens to every session, about $0.0035 per session on Opus 5.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.