agentleFS
salmanashrafsalmanashraf/mobile-ai-agents/AGENTS.md

mobile-ai-agents

AGENTS.md29 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. A curated toolkit of AI agents, skill prompts, and reusable workflows for Android, iOS, Flutter, React Native, Unity, and Unreal Engine developers. Each agent is self-contained: it has a purpose, an input format, an output format, and a real worked example. Drop any agent into Codex as a system prompt and it works immediately. If you…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

21 rules. About 0 are common, 10 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the Input Format to send your code

    line 47
  2. Distinctive:

    If you have this repo cloned locally, add to your Codex config:

    line 51
  3. Very specific:

    Use skills/cross-platform/mobile-mcp-qa.md and workflows/mobile-mcp-qa.md when a user wants device, emulator, or simulator QA through …

    line 110
  4. Very specific:

    Use HARNESS_POLICY.json when a team needs governed Mobile Harness runs.

    line 114
  5. Very specific:

    Use skills/android/anr-investigation.md when a user provides an Android ANR trace, Play Console cluster, Crashlytics ANR, …

    line 118
  6. Very specific:

    Use agents/android/anr-investigation/agent.md when a full Android ANR investigation is needed, including deterministic report output, …

    line 120
  7. Very specific:

    Use skills/android/memory-leak-investigation.md when a user provides a LeakCanary trace, heap-retention report, memory-growth reproduction, …

    line 124
  8. Very specific:

    Use agents/android/memory-leak-analyzer/agent.md when a full Android memory leak investigation is needed, including deterministic report …

    line 126
  9. Very specific:

    Use skills/cross-platform/clean-code-audit.md when a user asks for app structure, clean code, model separation, architecture boundary, or …

    line 130
  10. Very specific:

    Use skills/cross-platform/security-audit.md for complete app security audits before release, especially when auth, payments, storage, deep …

    line 132
  11. Very specific:

    Use skills/cross-platform/prd-verification.md when a user asks whether an implementation matches the approved PRD, design plan, task …

    line 134
  12. Very specific:

    Use skills/cross-platform/mobile-memory-search.md when a user needs to resume from local Mobile AI Agents memory, search project history, …

    line 136
  13. Distinctive:

    Keep skills focused on one concern (e.g., "detect coroutine scope leaks", not "review entire file")

    line 166
  14. Distinctive:

    When Codex is helping with this repo, follow these rules:

    line 173
  15. Distinctive:

    Never exceed 600 tokens for the system prompt section alone

    line 184
  16. Distinctive:

    Always note which model(s) the agent was validated on (e.g., Codex Sonnet 4.6)

    line 193
  17. Distinctive:

    If an agent degrades on smaller models, note it

    line 194
  18. Very specific:

    Prefer StateFlow + collectAsStateWithLifecycle over LiveData in new agents

    line 202
  19. Distinctive:

    Every agent needs a working example — no placeholders

    line 224
  20. Distinctive:

    Run your agent against at least 2 real files before submitting

    line 225
  21. Distinctive:

    If you are updating an existing agent, note which model you tested on

    line 226

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

A curated toolkit of AI agents, skill prompts, and reusable workflows for Android, iOS, Flutter, React Native, Unity, and Unreal Engine developers.

Each agent is self-contained: it has a purpose, an input format, an output format, and a real worked example. Drop any agent into Codex as a system prompt and it works immediately.


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 guides

How to Use an Agent

Option A — Paste into Codex chat

  1. Open any agents/<platform>/<name>/agent.md
  2. Copy the System Prompt section
  3. Paste it at the start of your Codex session
  4. 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

AgentPathPlatformWhat It Does
Android ANR Investigation Agentagents/android/anr-investigation/AndroidANR traces, Play Console clusters, and thread dumps → root cause, fix, and verification
Android Code Revieweragents/android/code-reviewer/AndroidReviews Kotlin/Compose for Clean Architecture, leaks, anti-patterns
Compose Navigation Architectagents/android/compose-navigation/AndroidGenerates and reviews type-safe routes, nested graphs, deep links, and back-stack behavior
Android Memory Leak Analyzeragents/android/memory-leak-analyzer/AndroidLeakCanary traces and heap-retention reports → root cause, fix, and verification
Crash Log Analyzeragents/android/crash-analyzer/Android / iOSParses crash logs → root cause + fix
Swift Code Revieweragents/ios/swift-reviewer/iOSReviews Swift/SwiftUI for memory safety and idiomatic patterns
Flutter Widget Generatoragents/flutter/widget-generator/FlutterGenerates Dart widget code from plain English
RN Performance Optimizeragents/react-native/performance-optimizer/React NativeFinds re-render bottlenecks and bridge overhead
Unity Shader Generatoragents/unity/shader-generator/UnityProduces HLSL/ShaderLab shaders from a visual description
Unreal Blueprint Advisoragents/unreal/blueprint-advisor/UnrealBlueprint → C++ migration and logic advice
AppForgeagents/cross-platform/appforge/AllRough app idea → PRD → tasks → QA → Play Store launch prep
Mobile Memoryagents/cross-platform/mobile-memory/AllMobile knowledge graph + context preservation across AI tools
Release Notes Generatoragents/cross-platform/release-notes-generator/AllGit commits → user-facing release notes
CI/CD Pipeline Generatoragents/cross-platform/ci-cd-generator/AllGenerates GitHub Actions / Bitrise / Fastlane configs
Store Listing Writeragents/cross-platform/store-listing-writer/AllPlay Store / App Store descriptions optimised for ASO
Mobile Harnessagents/cross-platform/mobile-harness/AllGuide projects from idea through verified delivery; enterprise mode adds policy, risk gates, scoped changes, rollback, and auditable evidence

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

  1. Copy templates/agent-template.md into agents/<platform>/<your-agent-name>/agent.md
  2. Fill in every section — do not leave placeholders
  3. The Example section is mandatory: one real input → one real output
  4. Open a GitHub issue using the New Agent template before large work
  5. 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.

  1. Copy templates/skill-template.md into skills/<platform>/<skill-name>.md
  2. A skill has: purpose, inputs, the prompt module itself, and usage notes
  3. 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 issues
  • WARNING — technical debt, bad practice, will cause pain at scale
  • INFO — 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 + collectAsStateWithLifecycle over LiveData in new agents
  • Flag GlobalScope, direct !! assertions, and repository-in-ViewModel as CRITICAL
  • Compose agents: check remember, LaunchedEffect, derivedStateOf usage

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 setState in large widgets, missing const constructors

React Native

  • Flag bridge calls in hot paths, missing useMemo/useCallback

Contributing

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.