droidmind / rules
Cursor rule435 starsChanged 21 months agoApache-2.0View on GitHub
DroidMind :: Control your Android devices with AI via Model Context Protocol
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- .cursor/rules/002_cursor_rules.mdcCursor rule
- .cursor/rules/003_cursor_docs.mdcCursor rule
- .cursor/rules/004_aesthetic.mdcCursor rule
The file
We split this 001_workspace.mdc into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 55
All user input must be sanitized to prevent command injection
- Distinctive: line 59
Follow Python type hints throughout the codebase (mypy validated)
- Distinctive: line 64
Import sorting: isort with Black profile
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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.
Files
--- description: DroidMind :: Control your Android devices with AI via Model Context Protocol globs: alwaysApply: true --- # DroidMind Core Architecture ## Project Essence DroidMind bridges AI assistants and Android devices through the Model Context Protocol (MCP). It enables control, debugging, and system analysis of Android devices using natural language through AI interfaces like Claude and ChatGPT. The server exposes ADB capabilities as MCP resources and tools for seamless integration. ## Technology Stack - Python 3.13+ core implementation - UV for project and package management - Ruff, MyPy, and Pylint for code style and analysis - MCP Protocol (v1.3.0+) for AI communication - ADB Shell for Android device interaction - Async I/O for non-blocking operations - Starlette/Uvicorn for SSE transport - Rich for beautiful terminal interfaces ## Primary Components - MCP Protocol Layer: Implements Model Context Protocol server - Resource handlers for device information and file access - Tool implementations for device control - Prompt templates for common operations - ADB Wrapper: Secure interface to Android Debug Bridge - Command sanitization and execution - Async operation support - TCP/IP device connection management - Security Layer: Permission and authentication - Command validation and injection prevention - Risk level categorization for operations - Explicit confirmation for dangerous operations - Transport Protocols: - stdio for terminal/CLI usage - SSE (Server-Sent Events) for network/web usage ## Key Directories - /droidmind/: Core server implementation - /server/: MCP server implementation - /adb/: ADB wrapper and command handlers - /resources/: MCP resource implementations - /tools/: MCP tool implementations - /security/: Input validation and permissions - /transport/: Communication protocols (stdio, SSE) - /docs/: Project documentation and examples - /tests/: Testing framework and test cases - /examples/: Example integrations with MCP clients - /.cursor/: Cursor AI assistance configuration ## Core Constraints - All user input must be sanitized to prevent command injection - High-risk operations (system changes, flashing) require explicit confirmation - Respect device permission model for sensitive operations - Maintain clear separation between UI layer and ADB command interface - Follow Python type hints throughout the codebase (mypy validated) - Maintain test coverage for all core functionality ## Development Standards - Code formatting: Black (line length 100) - Import sorting: isort with Black profile - Linting: Ruff with strict settings - Type checking: MyPy with disallow_untyped_defs - Testing: pytest with asyncio support ## Command Line Interface The project exposes a CLI via the 'droidmind' command with transport options: - stdio: Terminal-based interactive mode - SSE: Network server mode with web interface ## Feature Categories - Device Management: Connect, disconnect, reboot - System Analysis: Properties, logs, diagnostics - File System: Browse, transfer, modify device files - App Management: Install, uninstall, start, stop - Debugging: Screenshots, logcat, performance data - UI Automation: Input simulation, UI testing
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
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.

