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.
npx agentmods add rules/hyperb1iss/droidmind/001_workspacegit clone --depth 1 https://github.com/hyperb1iss/droidmindWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00679 | $0.00679 |
| Opus 5 | $0.00340 | $0.00340 |
| Sonnet 5 | $0.00136 | $0.00136 |
| Haiku 4.5 | $0.00068 | $0.00068 |
Grade A, and why
001_workspace scanned grade A with 0 findings 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
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.
- yesterday First seen · 80 lines · 679 tokens per session scan A 6dda94750817
001_workspace is a cursor rule published in the GitHub repository hyperb1iss/droidmind (430 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 679 tokens to every session, about $0.0034 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
android-viewmodel
Android ViewModel conventions — StateFlow, repository abstraction, coroutines, no LiveData.
swiftui-accessibility
SwiftUI accessibility rules for VoiceOver — labels, hints, traits, values, and attribute preservation.
commit-sponsors
Every git commit message must acknowledge BetterDesk supporters.
security-threat-and-stability
Maximum security scrutiny on issues/PRs and stability-first code changes.
android-gradle-build-logic
Shape Android build logic with Gradle, version catalogs, plugins, convention patterns, and toolchain compatibility.
android-kotlin-core
Use Kotlin idioms safely in Android apps, including nullability, data classes, sealed types, extension functions, and collection pipelines.