build-android-game-apk

build-android-game-apk is a skill for Claude Code, Codex from Promastergame/tinyapk-lab. It costs 47 tokens per session (4,258 once invoked), scanned A, original, MIT.

A method for building a small Android game using only Java, Android’s built-in drawing tools, and the Android platform files.

In plain words
What is it for?
Use it to create simple games such as Tetris, draw game screens, handle touch or swipe input, and produce an installable APK by running the build tools directly.
Why use it?
It avoids Gradle, Kotlin, game engines, and third-party libraries, making the build smaller and reducing setup requirements.

Skill for Claude CodeCodex

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 skills/promastergame/tinyapk-lab/tetris
Any agent
npx skills add Promastergame/tinyapk-lab --skill tetris
Clone the repo
git clone --depth 1 https://github.com/Promastergame/tinyapk-lab

Made for: Claude Code, Codex.

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 build-android-game-apk

README.md
[![agentmods](https://agentmods.dev/badge/skills/promastergame/tinyapk-lab/tetris.svg)](https://agentmods.dev/skills/promastergame/tinyapk-lab/tetris)
Your own site
<a href="https://agentmods.dev/skills/promastergame/tinyapk-lab/tetris"><img src="https://agentmods.dev/badge/skills/promastergame/tinyapk-lab/tetris.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,258 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.00047 $0.04258
Opus 5 $0.00023 $0.02129
Sonnet 5 $0.00009 $0.00852
Haiku 4.5 $0.00005 $0.00426

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

Security

Grade A, and why

build-android-game-apk 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.

manual-build/tetris/SKILL.md · 510 lines

How it starts

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

SKILL: Build Android Game APK From Scratch

Philosophy

The smallest possible Android APK uses ZERO third-party libraries. Everything needed is already on the device inside android.jar. This skill produces a working game in ~16KB — compared to 5-15MB with Gradle + Kotlin + AndroidX.

Stack:

  • Pure Java (no Kotlin — saves ~1MB Kotlin runtime)
  • android.Canvas + SurfaceView for rendering (no game engine needed)
  • MotionEvent for touch/swipe input
  • android.jar only — no androidx, no dependencies
  • Built manually: aapt2 → ecj → d8 → zip → zipalign → apksigner

Project structure (minimal)

MyGame/
├── app/src/main/
│   ├── AndroidManifest.xml
│   ├── java/com/mygame/
│   │   ├── game/
│   │   │   └── GameLogic.java     ← pure game state, no Android imports
│   │   └── ui/
│   │       ├── GameView.java      ← SurfaceView + Canvas + touch
│   │       └── MainActivity.java  ← fullscreen setup, setContentView
│   └── res/values/
│       └── strings.xml            ← just app_name
└── AndroidManifest.xml            ← package, minSdk, activity

Key principle: separate game logic from rendering. GameLogic.java has zero Android imports — just plain Java. GameView.java handles all rendering and input.


Step 1: Write the game logic (pure Java)

GameLogic.java — no Android imports at all:

package com.mygame.game;

import java.util.Random;

public class GameLogic {
    public static final int COLS = 10;
    public static final int ROWS = 20;

    // Game state fields
    public int[][] board;
    public int score = 0;
    public boolean gameOver = false;

    public GameLogic() {
        board = new int[ROWS][COLS];
        // initialize game...
    }

    // All game methods: move, rotate, collision, scoring
    public boolean moveLeft()  { /* ... */ return true; }
    public boolean moveRight() { /* ... */ return true; }
    public boolean moveDown()  { /* ... */ return true; }
    public void hardDrop()     { /* ... */ }
    public void rotate()       { /* ... */ }
}

Read the full file on GitHub · 510 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 · 510 lines · 0 tokens per session scan A 7b0059ae7690

Subscribe to this mod's changes

build-android-game-apk is a skill published in the GitHub repository Promastergame/tinyapk-lab (24 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 4,258 once invoked, about $0.0002 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 skills, from other repositories

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically…

mukul975/Anthropic-Cybersecurity-Skills · 84 tokens

sceneview

Build 3D and AR apps with the SceneView SDK in Jetpack Compose, SwiftUI (iOS/macOS/visionOS via SceneViewSwift), Web (Filament.js), Flutter and React Native. Use whenever the user asks for "3D in Compose", "AR with ARCore in Compose", a model viewer, or any cross-platform 3D/AR app where the dependency is…

sceneview/sceneview · 156 tokens

sceneview-ios

Build 3D and AR apps on Apple platforms (iOS, macOS, visionOS) with SceneViewSwift — the SwiftUI wrapper around RealityKit. Use whenever the user asks for "3D in SwiftUI", "AR with ARKit in SwiftUI", a model viewer for iOS, or any Apple-platform 3D/AR app where the dependency is the SceneViewSwift Swift Package from…

sceneview/sceneview · 148 tokens

Mobile Application Security

Android and iOS application security testing — static and dynamic analysis, APK/IPA inspection, OWASP MASVS/MASTG verification, secure-storage and transport review, and mobile malware triage for authorized assessments.

Masriyan/Claude-Code-CyberSecurity-Skill · 46 tokens

analyzing-android-malware-with-apktool

Use when perform static analysis of Android APK malware samples using apktool for decompilation, jadx for Java source recovery, and androguard for permission analysis, manifest inspection, and suspicious API call detection. Use when performing static analysis of android apk malware samples using apktool.

oyi77/1ai-skills · 66 tokens

capture-app-flow-media

Use to record or convert ApkAnalyzer app flows into screenshots or GIFs for the README or product docs. Triggered by phrases like "add screenshots", "convert videos to gifs", "record a gif of this flow", "capture app screenshots", "update the README screenshots", "make a demo gif".

MartinStyk/apk-analyzer · 66 tokens