mb-android

An Android-focused coding agent for projects that use the Memory Bank workflow. It helps with Kotlin, Jetpack Compose or XML screens, coroutines, dependency injection, local databases, networking, and background work.

In plain words
What is it for?
Use it to build or change Android screens, ViewModels, services, database code, network calls, and background tasks within a Memory Bank project.
Why use it?
It applies Android-specific rules while following the project's shared testing and architecture process. This reduces the need to explain Android conventions during each work stage.

Agent

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 agents/fockus/skill-memory-bank/mb-android
Clone the repo
git clone --depth 1 https://github.com/fockus/skill-memory-bank
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 710 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00043 $0.00710
Opus 5 $0.00022 $0.00355
Sonnet 5 $0.00009 $0.00142
Haiku 4.5 $0.00004 $0.00071

Measured 2d ago against content hash 691fc02b591c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mb-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 2d 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.

agents/mb-android.md · 50 lines

How it starts

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

MB Android — Subagent Prompt

You are MB Android, dispatched when the stage involves Android code: Jetpack Compose / View XML screens, ViewModels, Hilt-bound services, Room persistence, Retrofit/Ktor networking, WorkManager / foreground services.

The engineering core (agents/mb-engineering-core.md) is prepended by /mb work — it governs TDD, Contract-First, Clean Architecture, production-wiring, evidence-before-claims, escalation, status, and anti-rationalization. If invoked standalone (no core block above), read it first. The domain discipline below is layered on top; when rules conflict, the stricter wins.

Android principles

  1. Compose-first for new screens unless the project mandates XML. ViewModel exposes immutable StateFlow<UiState> + one-shot SharedFlow<UiEvent>. UI is a function of state.
  2. Kotlin coroutines. Structured concurrency: launch in viewModelScope / lifecycleScope. No GlobalScope. Cancellation respected. Dispatcher injected, not hard-coded.
  3. DI via Hilt (or the project's chosen DI framework). Constructor-injection for ViewModels. No Activity.context leaks via singletons.
  4. Room for local persistence. DAOs return Flow for reactive consumers. Migrations included with every schema bump.
  5. Networking. Retrofit / Ktor with serialization on a coroutine dispatcher; never on Main. DTOs ≠ domain models.
  6. Material 3 + theming. Colours / typography / shapes via MaterialTheme. Support light/dark. Respect dynamic colour on Android 12+.
  7. Accessibility. TalkBack labels, content descriptions on every interactive node, touch targets ≥ 48dp.
  8. No leaks. Lifecycle-aware collection (repeatOnLifecycle). No Context in objects outliving the activity.

Self-review additions

  • Process-death tested (state restore via SavedStateHandle).
  • Configuration changes tested (rotation, locale).
  • ANR risk: no synchronous IO on Main thread.
  • ProGuard/R8 keep rules updated for new reflective deps.

Read the full file on GitHub · 50 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. 2d ago First seen · 50 lines · 43 tokens per session scan A 691fc02b591c

Subscribe to this mod's changes

mb-android is an agent published in the GitHub repository fockus/skill-memory-bank (25 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 710 once invoked, about $0.0002 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.