rouse-context: Agent for Claude Code

.claude/agents/android.md

android is an agent for Claude Code from Monkopedia/rouse-context. It costs 17 tokens per session (560 once invoked), scanned A, original, Apache-2.0.

An Android and Kotlin codebase for an MCP server, health-data access, and its mobile app shell. Health Connect is Android’s system for sharing health information between apps.

In plain words
What is it for?
Use it to build MCP sessions and tool registration, expose steps, heart rate, sleep, HRV, and workout data, record tool calls, and run the Android service and interface.
Why use it?
It separates the protocol, health queries, and user interface into modules, making each part’s responsibilities clear and limiting unwanted Android dependencies.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is Monkopedia/rouse-context's own configuration. It tells Claude Code how to work on rouse-context 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 rouse-context configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Monkopedia/rouse-context. 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/Monkopedia/rouse-context/main/.claude/agents/android.md
Clone the repo
git clone --depth 1 https://github.com/Monkopedia/rouse-context

Made for: Claude Code.

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 android

README.md
[![agentmods](https://agentmods.dev/badge/agents/monkopedia/rouse-context/android/github.svg)](https://agentmods.dev/agents/monkopedia/rouse-context/android)
Your own site
<a href="https://agentmods.dev/agents/monkopedia/rouse-context/android"><img src="https://agentmods.dev/badge/agents/monkopedia/rouse-context/android/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 android

Your own site · 80×15
<a href="https://agentmods.dev/agents/monkopedia/rouse-context/android"><img src="https://agentmods.dev/badge/agents/monkopedia/rouse-context/android.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00017 $0.00560
Opus 5.5 $0.00007 $0.00224
Sonnet 5.5 $0.00003 $0.00112
Haiku 4.5 $0.00002 $0.00056

Measured 2mo ago against content hash 9bcbf4b2cc5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

android 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 2mo 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.

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.

.claude/agents/android.md · 56 lines

How it starts

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

Android App Agent

You work on the pure Android/Kotlin modules: :mcp-core, :mcp-health, and :app. These handle MCP server logic, health data exposure, and the user-facing app.

Modules

:mcp-core

The MCP contract layer. Defines McpServerProvider (interface for registering tools/resources on the SDK Server), McpSession (session orchestrator over raw I/O streams), and AuditListener (callback for tool-call logging).

  • Built on the official MCP Kotlin SDK (io.modelcontextprotocol:kotlin-sdk)
  • Providers use SDK types directly (server.addTool(), server.addResource())
  • McpSession.run(input, output) suspends until session ends
  • MUST NOT depend on Android framework APIs beyond androidx.core

:mcp-health

Health Connect MCP server. Implements McpServerProvider to expose live health data (steps, heart rate, sleep, HRV, workouts) as MCP tools and resources.

  • Depends only on :mcp-core and androidx.health.connect
  • Registers tools/resources in register(server: Server)
  • Health Connect queries run on the calling coroutine context

:app

The shell that wires everything together:

  • Foreground service during active MCP sessions
  • Per-tool-call audit log (implements AuditListener)
  • Session history UI
  • Trust/permission management
  • Settings
  • Creates McpSession(providers, auditListener) and connects it to tunnel streams

Key Patterns

  • MCP SDK types used directly — no wrapper types unless there's a clear value add
  • McpSession uses CompletableDeferred + server.onClose to suspend until session ends
  • Tests use loopback sockets with SDK Client ↔ StdioServerTransport for end-to-end verification

What You Should NOT Touch

  • relay/ — server-side code, different language/domain
  • tunnel/ — networking layer, different concerns (FCM, TLS, wakelocks)
  • You CAN read tunnel code to understand the stream interface, but don't modify it

Build & Test

JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew :mcp-core:assembleDebug :mcp-health:assembleDebug
JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew :mcp-core:testDebugUnitTest
JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew ktlintCheck detekt

Read the full file on GitHub · 56 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. 2mo ago First seen · 56 lines · 17 tokens per session scan A 9bcbf4b2cc5a

Subscribe to this mod's changes

android is an agent published in the GitHub repository Monkopedia/rouse-context (13 stars, last pushed 3d ago), licensed Apache-2.0. It adds 17 tokens to every session and 560 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

android compared with agents from other repositories

android next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
androidMonkopedia/rouse-contextAgent133d agoApache-2.0A17Claude Code
kotlin-experttravisjneuman/.claudeAgent1072d agoMITA80Claude Code
android-developertravisjneuman/.claudeAgent1072d agoMITA19Claude Code
ios-developertravisjneuman/.claudeAgent1072d agoMITA25Claude Code
kotlin-expertandisab/swe-marketplaceAgent21yesterdayMITA28Claude Code
macos-developertravisjneuman/.claudeAgent1072d agoMITA21Claude Code
ios-developerHermeticOrmus/LibreUIUX-Claude-CodeAgent1151mo agoMITA58Claude Code