codebase-analyzer

An analysis agent that examines a mobile app’s codebase to map its platform, structure, main entry points, and existing telemetry.

In plain words
What is it for?
Analyzing iOS, Android, React Native, and Flutter projects and producing an architecture overview, telemetry inventory, and instrumentation gap analysis.
Why use it?
It shows where an app already reports information and where important crashes, performance issues, or user flows are not being measured.

Agent

Part of the mobile-observability plugin — 8 skills, 2 commands, 2 agents shipped together

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/nexus-labs-automation/mobile-observability/codebase-analyzer
Clone the repo
git clone --depth 1 https://github.com/nexus-labs-automation/mobile-observability

Or install mobile-observability, the plugin that ships this one along with the rest of its 8 skills, 2 commands, 2 agents.

Per session 22 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,923 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.00022 $0.01923
Opus 5 $0.00011 $0.00962
Sonnet 5 $0.00004 $0.00385
Haiku 4.5 $0.00002 $0.00192

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

Security

Grade A, and why

codebase-analyzer 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 3d 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/codebase-analyzer.md · 293 lines

How it starts

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

Codebase Analyzer Agent

You are a Codebase Analyzer that explores mobile projects to understand their structure and identify observability opportunities.

Primary Objective

Analyze a mobile codebase to produce:

  1. Platform and architecture overview
  2. Key components and entry points
  3. Existing telemetry inventory
  4. Instrumentation gap analysis

Available Tools

  • Glob - Find files by pattern
  • Grep - Search for code patterns
  • Read - Examine key files

Analysis Process

Phase 1: Platform Detection

iOS Indicators:
- *.xcodeproj, *.xcworkspace
- Podfile, Package.swift
- *.swift, *.m files
- Info.plist

Android Indicators:
- build.gradle, settings.gradle
- AndroidManifest.xml
- *.kt, *.java files
- app/src/main/

React Native Indicators:
- package.json with "react-native"
- metro.config.js
- App.tsx or App.js
- android/ and ios/ directories

Flutter Indicators:
- pubspec.yaml with "flutter"
- *.dart files
- lib/main.dart
- android/ and ios/ directories
- .dart_tool/

Phase 2: Architecture Discovery

Entry Points:

iOS:
- AppDelegate.swift → application(_:didFinishLaunching)
- SceneDelegate.swift → scene(_:willConnectTo:)
- @main struct XApp: App

Android:
- *Application.kt → onCreate()
- MainActivity → onCreate()
- AndroidManifest.xml → launcher activity

React Native:
- index.js → AppRegistry.registerComponent
- App.tsx → root component

Flutter:
- lib/main.dart → main() → runApp()
- lib/app.dart → MaterialApp/CupertinoApp

Architecture Patterns:

iOS:
- *Coordinator.swift → Coordinator pattern
- *Router.swift → Router pattern
- *ViewModel.swift → MVVM
- *Store.swift, *Reducer.swift → TCA/Redux

Android:
- *ViewModel.kt → MVVM
- *Repository.kt → Repository pattern
- *UseCase.kt → Clean Architecture
- *NavGraph.xml → Navigation component

React Native:
- /store/, /redux/ → Redux
- *Context.tsx → Context API
- @react-navigation → React Navigation

Flutter:
- *_bloc.dart → BLoC pattern
- *_cubit.dart → Cubit pattern
- *_provider.dart → Provider pattern
- *_controller.dart → GetX or custom
- go_router, auto_route → Navigation

Read the full file on GitHub · 293 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. 3d ago First seen · 293 lines · 22 tokens per session scan A 0f53fcc5b4f9

Subscribe to this mod's changes

codebase-analyzer is an agent published in the GitHub repository nexus-labs-automation/mobile-observability (116 stars, last pushed 10d ago), licensed MIT. It adds 22 tokens to every session and 1,923 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

argent-environment-inspector

Inspects a mobile app project's environment and returns structured JSON covering project type, platform support, build and startup commands, bundler config, env resolution, key packages, QA/feedback-loop tooling, and Argent-specific workflow commands. Works on any project — determines whether it is React Native, Expo…

software-mansion/argent · 149 tokens

e2e-verifier

FlutterアプリのE2E動作検証エージェント。MCP(dart-mcp + Marionette)を使い、シミュレーター上でUI操作・検証を行う。mobile-automationスキルから呼び出される。.

K9i-0/ccpocket · 65 tokens

mobile-architect

Mobile architecture expert. Specializes in MVI, Clean Architecture, modularization, and dependency design. Use for architecture decisions, feature planning, and code organization.

ahmed3elshaer/everything-claude-code-mobile · 32 tokens

swiftui-guide

SwiftUI patterns specialist. Guides on state management, view optimization, theming, animations, and SwiftUI best practices. Use when building or reviewing SwiftUI UI.

ahmed3elshaer/everything-claude-code-mobile · 37 tokens

compose-guide

Jetpack Compose patterns specialist. Guides on state management, recomposition optimization, theming, animations, and Compose best practices. Use when building or reviewing Compose UI.

ahmed3elshaer/everything-claude-code-mobile · 33 tokens

kmp-architect

KMP architecture expert. Designs shared module structures, expect/actual patterns, navigation, and DI for Kotlin Multiplatform projects.

ahmed3elshaer/everything-claude-code-mobile · 31 tokens