Apk Size Audit
Testing & Qualityapk-size-auditApk Size Audit is an Agent Skill for testing & quality published in the oxyroid/M3UAndroid repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Audit M3UAndroid APK/AAB size and packaging changes for dependency growth, native libraries, resources, R8/minification, generated assets, baseline profiles, and artifact comparison evidence.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/oxyroid/M3UAndroid/blob/HEAD/.claude/skills/apk-size-audit/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/apk-size-audit, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
APK Size Audit
Audit packaging and size-sensitive changes with measurable artifact and configuration evidence.
When To Use
Use when a task changes or reviews:
- Dependencies, native libraries, packaging options, or R8/minification
- Resources, generated assets, baseline profiles, or release artifacts
- Native-load packaging and runtime loading behavior
Required Context
Read first:
AGENTS.md- Relevant module
AGENTS.mdfiles for touched build logic docs/ai/playbooks/apk-size.mddocs/native-load-yaml.mdwhen native packs are affected- Relevant Gradle, version catalog, packaging, and benchmark files
Audit Checks
Verify with file evidence:
- Dependencies are added through the version catalog with justification.
- Native library packaging and runtime loading remain aligned.
- R8/minification/resource shrinking changes are intentional and variant-scoped.
- Generated assets are not committed or modified manually unless required.
- Artifact size comparisons use the same variant/build type.
- Baseline profile or benchmark changes do not hide runtime regressions.
Process
- Map changed Gradle, version catalog, packaging, native-load, and generated-asset files.
- Identify artifact variants affected by the change.
- Compare dependency/resource/native-library deltas when data is available.
- Cite file paths and line numbers for each finding.
- Avoid claiming size wins without measured artifact evidence.
Validation
Recommend:
./gradlew :app:smartphone:assembleRelease
Use the affected TV or extension variant when applicable. If artifact comparison cannot be run, state the remaining size risk.
Output
Return a concise Markdown report with:
- Scope and artifacts reviewed
- Pass/fail table for each audit check
- Evidence-backed findings with file paths
- Measured size deltas or reason measurements are unavailable
- Validation run or not run, with reason