android-agent-guidelines

A set of discovery rules for Android projects that identifies the existing libraries, project type, and code-organization patterns before implementation.

In plain words
What is it for?
It helps inspect dependencies, distinguish standard Android from Kotlin Multiplatform projects, and find existing view-model, repository, use-case, and dependency-injection patterns.
Why use it?
It reduces guesswork and prevents proposed changes from conflicting with the project's current setup.

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/desquared/agents-rules-skills/android-agent-guidelines
Clone the repo
git clone --depth 1 https://github.com/Desquared/agents-rules-skills
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,535 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.00000 $0.01535
Opus 5 $0.00000 $0.00767
Sonnet 5 $0.00000 $0.00307
Haiku 4.5 $0.00000 $0.00153

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

Security

Grade A, and why

android-agent-guidelines 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/android-agent-guidelines.md · 172 lines

How it starts

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

Android Agent Discovery & Implementation Guidelines

CRITICAL: All Android agents MUST execute a discovery scan before making ANY implementation decisions. No assumptions. No guessing. Align to what already exists.


1. Discovery-First Approach

Before writing code or proposing solutions, run a "Project Fingerprint" scan.

Phase A — Dependency Scan

Scan version catalogs and build files to identify the core tech stack:


# Preferred: check version catalog first

grep -rE "koin|hilt|dagger|room|realm|sqldelight|ktor|retrofit|coil|glide|compose|rxjava|coroutines" gradle/libs.versions.toml

# Fallback: scan build files directly

grep -rE "koin|hilt|dagger|room|realm|sqldelight|ktor|retrofit|coil|glide|compose|rxjava|coroutines" ./build.gradle*

Phase B — Architecture & Pattern Fingerprinting

Identify whether the project is standard Android or KMP, then find existing patterns:


# KMP vs Standard Android

find . -maxdepth 3 -name "shared" -o -name "commonMain"

# Architectural patterns

find . -name "*ViewModel*.kt" -o -name "*Repository*.kt" -o -name "*UseCase*.kt" | head -n 5

# DI modules / components

find . -name "*Module*.kt" -o -name "*Component*.kt" | xargs grep -lE "module|inject|provides"

Phase C — Announce What You Found

After scanning, state your findings to the user before writing any code:

"I've detected this is a KMP project using Compose UI and Koin for DI. I will follow these patterns for the new feature."

Then wait for confirmation before proceeding.


2. Library Detection Matrix

Category Check For Implementation Strategy
DI hilt-android, koin-android, dagger Use @HiltViewModel, by inject(), or @Inject — match what is already in the codebase
UI androidx.compose, material Prioritize Compose. Use XML/ViewBinding only if Compose is absent
Async kotlinx-coroutines, rxjava Use Flow/suspend for Coroutines; Observable/Single for RxJava
Network ktor-client, retrofit2, okhttp Use HttpClient for Ktor; interface + annotations for Retrofit
Persistence room, realm, sqldelight, datastore Use @Database/@Entity for Room; Realm.write for Realm; Database for SQLDelight
Image Loading coil, glide Use AsyncImage for Coil; GlideImage / Glide.with for Glide
Testing mockk, mockito Use mockk<> / every for MockK; mock() / verify for Mockito
KMP commonMain, expect/actual Place core business logic and network layers in commonMain

Read the full file on GitHub · 172 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 · 172 lines · 0 tokens per session scan A 686bf0dda1ae

Subscribe to this mod's changes

android-agent-guidelines is an agent published in the GitHub repository Desquared/agents-rules-skills (4 stars, last pushed 19d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,535 tokens. 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

Other agents, from other repositories

ux-flow-auditor

Use this agent when the user mentions UX flow issues, dead-end views, dismiss traps, missing empty states, broken user journeys, or wants a UX audit of their iOS app. Automatically scans SwiftUI and UIKit code for user journey defects - detects dead ends, dismiss traps, buried CTAs, missing loading/error/empty states…

CharlesWiltgen/Axiom · 190 tokens

gem-mobile-tester

Mobile E2E testing: Detox, Maestro, iOS/Android simulators.

mubaidr/gem-team · 22 tokens

flutter-integration-analyzer

Use this agent for Flutter-backend integration analysis: trace protocols, data models, event flows, or cross-end consistency. Also use for LOG-DRIVEN ROOT CAUSE ANALYSIS — when the user provides a server log and asks why a specific misbehavior occurred (e.g. "why did it stop responding"), this agent parses the log…

JayCRL/MobileVC · 429 tokens

rn-builder

Expo + React Native (TypeScript) implementation specialist. Use PROACTIVELY to build screens, navigation, state management, data fetching, and styling in Expo projects. Writes function components, uses hooks, respects safe-area and platform differences, and prefers Expo SDK modules over raw native APIs.

toffyui/ccteams · 61 tokens

mobile-specialist

モバイルUI・プラットフォームガイドラインの専門家。 iOS HIG / Material Design準拠、レスポンシブ対応、プラットフォーム固有パターンを評価する。 ui-review チームの一員として起動される。.

sean-sunagaku/claude-code-plugin · 64 tokens

copilot

cd your-android-project git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .github/skills/compose-kotlin-agent-skills.

haidrrrry/compose-kotlin-agent-skills · 0 tokens