mobile-compactor

mobile-compactor is an agent for coding agents from ahmed3elshaer/everything-claude-code-mobile. It costs 0 tokens per session (1,823 once invoked), scanned A, original, MIT.

A session-management agent for mobile development work. It reviews the conversation and keeps the project details, open issues, and current task while reducing unnecessary context.

In plain words
What is it for?
Use it before a large refactor, after a major task, when changing modules, or when context-limit warnings appear.
Why use it?
Long coding sessions can fill the available context with outdated or repeated information, making it harder to continue the task accurately.

Agent

Part of the everything-claude-code-mobile plugin — 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers 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/ahmed3elshaer/everything-claude-code-mobile/mobile-compactor
Clone the repo
git clone --depth 1 https://github.com/ahmed3elshaer/everything-claude-code-mobile

Or install everything-claude-code-mobile, the plugin that ships this one along with the rest of its 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mobile-compactor

README.md
[![agentmods](https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/mobile-compactor.svg)](https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/mobile-compactor)
Your own site
<a href="https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/mobile-compactor"><img src="https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/mobile-compactor.svg" alt="Measured on agentmods" height="20"></a>
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,823 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.01823
Opus 5 $0.00000 $0.00911
Sonnet 5 $0.00000 $0.00365
Haiku 4.5 $0.00000 $0.00182

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

Security

Grade A, and why

mobile-compactor 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 5d 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.

.opencode/agents/mobile-compactor.md · 298 lines

How it starts

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

Mobile Compactor Agent

Analyzes mobile development sessions and performs strategic context compaction to optimize token usage while preserving critical information.

Purpose

This agent evaluates the current session context and determines the optimal compaction strategy based on:

  • Current task and focus area
  • Token usage level
  • Project structure and architecture
  • Unresolved issues and pending work
  • Memory and instinct state

When to Use

Invoke this agent when:

  • Token usage exceeds 80,000
  • Switching to a new feature or module
  • After completing a major task
  • Context feels bloated or unfocused
  • Before starting a large refactor
  • When prompted by context limit warnings

Compaction Analysis

Step 1: Assess Session State

Analyze the current session:

Current State:
- Token usage: 95,432 / 200,000 (47.7%)
- Active task: Implementing biometric authentication
- Related modules: feature:auth, core:biometric
- Recent files: AuthViewModel.kt, BiometricManager.kt, BiometricScreen.kt
- Unresolved: None
- Instincts: 47 loaded (23 high confidence)

Step 2: Identify Retention Candidates

Determine what to keep:

  • Active task files: AuthViewModel, BiometricManager, BiometricScreen
  • Related files: UserRepository, AuthRepository, AuthNavigation
  • Test files: AuthViewModelTest, BiometricManagerTest
  • Configuration: auth-related build configs

Step 3: Identify Summarization Targets

Determine what to summarize:

  • Completed features: Previous login flow work
  • Resolved bugs: Fixed crash in profile screen
  • Background info: Project setup discussions

Step 4: Generate Compaction Plan

Compaction Strategy: Module-Focused (feature:auth)

Retain (Full):
- feature:auth module (12 files)
- core:biometric module (3 files)
- Current task context

Summarize:
- Previous login implementation (→ "Login flow complete, using MVI")
- Profile screen crash fix (→ "Fixed NPE in ProfileScreen, involved null-safe parcelable")

Drop:
- Resolved build configuration discussions
- Successful test run outputs
- Off-topic conversations

Expected Token Savings: ~45,000 tokens (47%)

Read the full file on GitHub · 298 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. 5d ago First seen · 298 lines · 0 tokens per session scan A aff98dc48c4e

Subscribe to this mod's changes

mobile-compactor is an agent published in the GitHub repository ahmed3elshaer/everything-claude-code-mobile (65 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,823 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-30.

Related

Other agents, from other repositories