mobile-ai-agents
AGENTS.md39 starsChanged 6 months agoMITView on GitHub
This file is read automatically by Codex when the repo is opened. It tells Codex how to navigate, use, and contribute to this toolkit. An end-to-end AI engineering system for mobile products. It helps teams move from idea, design, or issue through specification, implementation, review, device QA, release, and iteration across Android, iOS, Flutter, React Native, Kotlin Multiplatform, Unity, and Unreal Engine. Mobile Harness coordinates the complete product loop. Self-contained agents, skills, and workflows can also be used independently for…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 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 repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
25 rules. About 0 are common, 12 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
Follow the Input Format to send your code
- Distinctive: line 52
If you have this repo cloned locally, add to your Codex config:
- Very specific: line 121
Use skills/cross-platform/mobile-mcp-qa.md and workflows/mobile-mcp-qa.md when a user wants device, emulator, or simulator QA through …
- Very specific: line 125
Use HARNESS_POLICY.json when a team needs governed Mobile Harness runs.
- Very specific: line 129
Use skills/android/anr-investigation.md when a user provides an Android ANR trace, Play Console cluster, Crashlytics ANR, …
- Very specific: line 131
Use agents/android/anr-investigation/agent.md when a full Android ANR investigation is needed, including deterministic report output, …
- Very specific: line 135
Use skills/android/memory-leak-investigation.md when a user provides a LeakCanary trace, heap-retention report, memory-growth reproduction, …
- Very specific: line 137
Use agents/android/memory-leak-analyzer/agent.md when a full Android memory leak investigation is needed, including deterministic report …
- Very specific: line 141
Use skills/cross-platform/clean-code-audit.md when a user asks for app structure, clean code, model separation, architecture boundary, or …
- Very specific: line 143
Use skills/cross-platform/security-audit.md for complete app security audits before release, especially when auth, payments, storage, deep …
- Very specific: line 145
Use skills/cross-platform/prd-verification.md when a user asks whether an implementation matches the approved PRD, design plan, task …
- Very specific: line 147
Use skills/cross-platform/mobile-memory-search.md when a user needs to resume from local Mobile AI Agents memory, search project history, …
- Distinctive: line 177
Keep skills focused on one concern (e.g., "detect coroutine scope leaks", not "review entire file")
- Distinctive: line 184
When Codex is helping with this repo, follow these rules:
- Distinctive: line 195
Never exceed 600 tokens for the system prompt section alone
- Distinctive: line 204
Always note which model(s) the agent was validated on (e.g., Codex Sonnet 4.6)
- Distinctive: line 205
If an agent degrades on smaller models, note it
- Very specific: line 213
Prefer StateFlow + collectAsStateWithLifecycle over LiveData in new agents
- Very specific: line 235
Before pushing README image/badge changes, follow redirects and verify the final response is HTTP 200, has an image/* content type, and …
- Distinctive: line 236
Check repository-relative image paths, descriptive alt text, and image destination links.
- Distinctive: line 237
If an external image fails, use a verified working endpoint or an appropriate repository-owned fallback.
- Distinctive: line 243
Every agent needs a working example — no placeholders
- Distinctive: line 244
Run your agent against at least 2 real files before submitting
- Distinctive: line 245
If you are updating an existing agent, note which model you tested on
- Very specific: line 255
Use skills/cross-platform/figma-mcp-setup.md for connection setup, skills/cross-platform/figma-spec-harvest.md for source-traced specs, and …
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md 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
AGENTS.md — Mobile AI Agents
This file is read automatically by Codex when the repo is opened. It tells Codex how to navigate, use, and contribute to this toolkit.
What This Repo Is
An end-to-end AI engineering system for mobile products. It helps teams move from idea, design, or issue through specification, implementation, review, device QA, release, and iteration across Android, iOS, Flutter, React Native, Kotlin Multiplatform, Unity, and Unreal Engine.
Mobile Harness coordinates the complete product loop. Self-contained agents, skills, and workflows can also be used independently for focused engineering work.
Repo Map
mobile-ai-agents/
├── agents/ ← Self-contained AI agents (start here)
│ ├── android/
│ ├── ios/
│ ├── flutter/
│ ├── react-native/
│ ├── unity/
│ ├── unreal/
│ └── cross-platform/
├── skills/ ← Reusable skill modules (compose into agents)
├── prompts/ ← Standalone one-shot prompts
├── templates/ ← Scaffold for new agents / skills / prompts
├── examples/ ← Real code samples for agents to operate on
└── docs/ ← Extended guidesHow to Use an Agent
Option A — Paste into Codex chat
- Open any
agents/<platform>/<name>/agent.md - Copy the System Prompt section
- Paste it at the start of your Codex session
- Follow the Input Format to send your code
Option B — Load via slash command (recommended)
If you have this repo cloned locally, add to your Codex config:
{
"mcpServers": {},
"customSlashCommands": [
{
"name": "android-review",
"description": "Android Kotlin code reviewer",
"prompt": "$(cat agents/android/code-reviewer/agent.md)"
},
{
"name": "crash-analyze",
"description": "Parse crash logs and suggest fixes",
"prompt": "$(cat agents/android/crash-analyzer/agent.md)"
}
]
}Then type /android-review in any session to activate the agent.
Option C — Reference directly in Codex
With this repo open as your working directory, Codex can read agents on demand. Just say:
Use the agent at agents/android/code-reviewer/agent.md to review this file:
[paste your code]Agent Index
| Agent | Path | Platform | What It Does |
| Android ANR Investigation Agent | agents/android/anr-investigation/ | Android | ANR traces, Play Console clusters, and thread dumps → root cause, fix, and verification |
| Android Code Reviewer | agents/android/code-reviewer/ | Android | Reviews Kotlin/Compose for Clean Architecture, leaks, anti-patterns |
| Compose Navigation Architect | agents/android/compose-navigation/ | Android | Generates and reviews type-safe routes, nested graphs, deep links, and back-stack behavior |
| Android Memory Leak Analyzer | agents/android/memory-leak-analyzer/ | Android | LeakCanary traces and heap-retention reports → root cause, fix, and verification |
| Crash Log Analyzer | agents/android/crash-analyzer/ | Android / iOS | Parses crash logs → root cause + fix |
| Swift Code Reviewer | agents/ios/swift-reviewer/ | iOS | Reviews Swift/SwiftUI for memory safety and idiomatic patterns |
| Flutter Widget Generator | agents/flutter/widget-generator/ | Flutter | Generates Dart widget code from plain English |
| RN Performance Optimizer | agents/react-native/performance-optimizer/ | React Native | Finds re-render bottlenecks and bridge overhead |
| Unity Shader Generator | agents/unity/shader-generator/ | Unity | Produces HLSL/ShaderLab shaders from a visual description |
| Unreal Blueprint Advisor | agents/unreal/blueprint-advisor/ | Unreal | Blueprint → C++ migration and logic advice |
| AppForge | agents/cross-platform/appforge/ | All | Rough app idea → PRD → tasks → QA → Play Store launch prep |
| Mobile Memory | agents/cross-platform/mobile-memory/ | All | Mobile knowledge graph + context preservation across AI tools |
| Release Notes Generator | agents/cross-platform/release-notes-generator/ | All | Git commits → user-facing release notes |
| CI/CD Pipeline Generator | agents/cross-platform/ci-cd-generator/ | All | Generates GitHub Actions / Bitrise / Fastlane configs |
| Store Listing Writer | agents/cross-platform/store-listing-writer/ | All | Play Store / App Store descriptions optimised for ASO |
| Mobile Harness | agents/cross-platform/mobile-harness/ | All | Guide projects from idea through verified delivery; enterprise mode adds policy, risk gates, scoped changes, rollback, and auditable evidence |
Natural-Language Device Control
Use skills/cross-platform/mobile-use-control.md for explicit requests to operate an owned test app through the optional Minitap mobile-use runtime. Follow docs/mobile-use.md for the offline plan, SDK prerequisites, bounded opt-in execution and independent device verification. Do not treat execution or stub tests as verified app behavior. Keep this distinct from developer QA via Mobile MCP and from embedding AI models inside an app.
Website API to Mobile Parity
Use skills/cross-platform/web-network-to-mobile.md when a deployed website is the reference for mobile API integration. Trace requests and responses per interaction, implement using the existing mobile stack (including Android, iOS, Flutter, React Native, and KMP), and verify actual mobile network and UI behavior. Browser observations alone do not prove mobile parity. This requires suitable browser capture and mobile verification tools; the skill does not bundle them.
For evidence-backed runtime comparison, use npx mobile-ai-agents network verify with a versioned browser contract and app-owned mobile-evidence.json. Follow docs/mobile-parity-verification.md. Keep web capture, mobile network and mobile UI results separate per touchpoint. A verified result is scoped to one named target/runtime/build; unavailable targets stay unverified.
Mobile MCP QA
Use skills/cross-platform/mobile-mcp-qa.md and workflows/mobile-mcp-qa.md when a user wants device, emulator, or simulator QA through Mobile MCP. This belongs after implementation, during APPFORGE UI match review, full QA, launch readiness, or screenshot validation.
Enterprise Mobile Harness
Use HARNESS_POLICY.json when a team needs governed Mobile Harness runs. Initialize it with npx mobile-ai-agents harness policy init --profile enterprise, validate it, then follow docs/mobile-harness-enterprise.md. Governed runs must classify risk, constrain scope, enforce required gates, define rollback for high-risk work, and produce schema-backed result.json plus SHA-256 evidence.json.
Android ANR Investigation
Use skills/android/anr-investigation.md when a user provides an Android ANR trace, Play Console cluster, Crashlytics ANR, ApplicationExitInfo, or related source code. The skill requires evidence-based thread, lock, binder, and timeout analysis before recommending a fix.
Use agents/android/anr-investigation/agent.md when a full Android ANR investigation is needed, including deterministic report output, corrected code, and verification steps.
Android Memory Leak Investigation
Use skills/android/memory-leak-investigation.md when a user provides a LeakCanary trace, heap-retention report, memory-growth reproduction, or lifecycle-related code. Follow the strong-reference path from the GC root and identify the first app-controlled reference with incorrect lifetime.
Use agents/android/memory-leak-analyzer/agent.md when a full Android memory leak investigation is needed, including deterministic report output, corrected code, and verification steps.
Clean Code and Security Gates
Use skills/cross-platform/clean-code-audit.md when a user asks for app structure, clean code, model separation, architecture boundary, or maintainability review across a feature or full app.
Use skills/cross-platform/security-audit.md for complete app security audits before release, especially when auth, payments, storage, deep links, WebViews, permissions, or sensitive data are involved. Use skills/shared/security-scan.md only for quick inline scans.
Use skills/cross-platform/prd-verification.md when a user asks whether an implementation matches the approved PRD, design plan, task acceptance criteria, tests, screenshots, or Mobile MCP evidence. Use it inside Mobile Harness and APPFORGE before marking a task complete.
Use skills/cross-platform/mobile-memory-search.md when a user needs to resume from local Mobile AI Agents memory, search project history, or inject relevant context from .mobile-ai-agents/memory/. When using Mobile Harness for multi-session work, capture durable decisions and next actions with npx mobile-ai-agents memory capture when terminal access is available.
Release Process
For npm releases, follow docs/release-process.md. Do not run npm publish manually. Update package.json, commit, create a local vX.Y.Z tag, push main, then push the tag so GitHub Actions publishes npm.
How to Create a New Agent
- Copy
templates/agent-template.mdintoagents/<platform>/<your-agent-name>/agent.md - Fill in every section — do not leave placeholders
- The Example section is mandatory: one real input → one real output
- Open a GitHub issue using the
New Agenttemplate before large work - Submit a PR — see
CONTRIBUTING.md
Minimum bar for a merged agent:
- System prompt is under 600 tokens (keeps it usable in constrained sessions)
- Output format is deterministic and parseable
- Example is real code, not toy pseudocode
How to Create a New Skill
Skills are smaller than agents — they are reusable prompt modules that can be composed together or embedded inside agents.
- Copy
templates/skill-template.mdintoskills/<platform>/<skill-name>.md - A skill has: purpose, inputs, the prompt module itself, and usage notes
- Keep skills focused on one concern (e.g., "detect coroutine scope leaks", not "review entire file")
Conventions Codex Should Follow in This Repo
When Codex is helping with this repo, follow these rules:
Naming
- Agent folders:
kebab-case(e.g.,code-reviewer,crash-analyzer) - Agent file: always named
agent.md - Skill files:
kebab-case.md - Prompt files:
kebab-case.md
System prompts
- Written in second person ("You are a senior Android engineer…")
- State the exact output format the agent must produce
- Never exceed 600 tokens for the system prompt section alone
- End with: "Output MUST follow the exact format specified. Do not add extra sections or omit any section."
Severity levels (for review agents)
CRITICAL— causes crashes, memory leaks, data loss, security issuesWARNING— technical debt, bad practice, will cause pain at scaleINFO— minor improvement, style, optional enhancement
Tested with
- Always note which model(s) the agent was validated on (e.g., Codex Sonnet 4.6)
- If an agent degrades on smaller models, note it
Platform-Specific Notes
Android
- Assume MVVM + Clean Architecture unless the agent specifies otherwise
- Prefer
StateFlow+collectAsStateWithLifecycleoverLiveDatain new agents - Flag
GlobalScope, direct!!assertions, and repository-in-ViewModel as CRITICAL - Compose agents: check
remember,LaunchedEffect,derivedStateOfusage
iOS
- Assume Swift 5.9+ and SwiftUI unless specified
- Flag retain cycles, force unwraps, and MainActor misuse
Flutter
- Assume Dart 3.x, null safety enabled
- Flag
setStatein large widgets, missingconstconstructors
React Native
- Flag bridge calls in hot paths, missing
useMemo/useCallback
Contributing
README Images and Badge Reliability
- Preserve working image and badge URLs during unrelated README edits. Use an explicit
.svgendpoint for Shields.io badges when supported; the extension alone does not guarantee availability. - Before pushing README image/badge changes, follow redirects and verify the final response is HTTP 200, has an
image/*content type, and contains a valid image rather than an HTML/text error page. Check the GitHub-rendered image proxy after pushing. - Check repository-relative image paths, descriptive alt text, and image destination links. Do not treat a valid Markdown link as proof that its image loads.
- If an external image fails, use a verified working endpoint or an appropriate repository-owned fallback. Do not replace a dynamic version badge with an unmaintained hardcoded version, repeatedly add cache-busting parameters, or claim an upstream outage is fixed by Markdown formatting.
- Record any external-service failures and the actual verification results. Remote badges can fail after a successful check; prefer repository-owned assets for essential branding and keep useful text/links available when images cannot load.
See CONTRIBUTING.md for the full guide.
Short version:
- Every agent needs a working example — no placeholders
- Run your agent against at least 2 real files before submitting
- If you are updating an existing agent, note which model you tested on
Questions / Discussion
Open a GitHub Discussion or Issue. PRs are always welcome.
Figma Design Handoff
Use skills/cross-platform/figma-mcp-setup.md for connection setup, skills/cross-platform/figma-spec-harvest.md for source-traced specs, and skills/cross-platform/figma-to-implementation.md for native integration. Follow workflows/figma-to-code.md for the full pipeline. Setup examples are in docs/figma-mcp.md. Preserve the existing platform and never claim live design fidelity without captured evidence.
Portable Figma helpers: npx mobile-ai-agents figma tools init. Read tools/figma-spec/README.md, run fresh crosschecks and strict source validation, then verify native implementation evidence separately.
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.

