add-android-module

A generator for adding Android or Kotlin modules to a Gradle project. A module is a separately configured part of an application or library, such as a feature or shared code package.

In plain words
What is it for?
Use it when creating Android, Kotlin/JVM, feature, core, or other library modules and registering their Gradle paths and packages.
Why use it?
It avoids inconsistent hand-written module setup and connects the new module to the repository’s existing build conventions.

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/ashtanko/compose-android-template/add-android-module
Any agent
npx skills add ashtanko/compose-android-template --skill add-android-module
Clone the repo
git clone --depth 1 https://github.com/ashtanko/compose-android-template

Made for: Claude Code, Codex.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 583 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.00069 $0.00583
Opus 5 $0.00034 $0.00292
Sonnet 5 $0.00014 $0.00117
Haiku 4.5 $0.00007 $0.00058

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

Security

Grade A, and why

add-android-module 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 2d 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/skills/add-android-module/SKILL.md · 45 lines

How it starts

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

Add Android Module

Create a module with explicit, repeatable inputs, then replace or remove generator placeholders and validate the new Gradle path.

Workflow

  1. Read ../../reference/architecture.md and inspect settings.gradle.kts, gradle/libs.versions.toml, build-logic/convention, and the nearest working module of the same type.

  2. Choose:

    • type: android for Android APIs, resources, or Compose; kotlin for platform-independent logic.
    • name: lowercase letters, digits, and hyphens.
    • parent: usually feature, core, or an empty string for a root module.
    • package: a valid dotted identifier under the project's current base package.
  3. Inspect the working tree and confirm the target directory and Gradle path do not already exist. Preserve unrelated edits in settings.gradle.kts.

  4. Run the generator non-interactively:

    bash scripts/add-module.sh \
      --type android \
      --name profile \
      --parent feature \
      --package app.template.feature.profile
    
  5. Review every generated file. Replace the placeholder greeting class and test with the requested implementation, or remove them if the task only calls for an empty module.

  6. Generated Android modules intentionally start without explicit library dependencies. Add only the direct dependencies required by the implementation, default to implementation, and use api only when a dependency type intentionally appears in the module's public contract. Use catalog aliases and existing convention plugins; do not hardcode versions.

  7. Confirm that the module appears exactly once in settings.gradle.kts and that its namespace and package path agree.

  8. Run ./gradlew spotlessApply, inspect the formatting diff, then run the module's unit-test task and ./gradlew spotlessCheck.

Guardrails

  • Do not run the generator interactively from an unattended agent session.
  • Do not overwrite an existing module or discard concurrent changes to settings.gradle.kts.
  • Do not assume every feature needs Compose, Hilt, Room, or navigation. Add only what its implementation requires.
  • Do not add convenience api dependencies to make libraries available transitively to consumers.
  • Do not retain sample code merely to make an empty module compile; use a minimal real contract or no source file.
  • Report all created files and the exact validation tasks run.

Read the full file on GitHub · 45 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 45 lines · 69 tokens per session scan A 8c36ed7f8862

Subscribe to this mod's changes

add-android-module is a skill published in the GitHub repository ashtanko/compose-android-template (10 stars, last pushed 4d ago), licensed MIT. It adds 69 tokens to every session and 583 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

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

compose-ui-testing-patterns

Use when writing or reviewing Jetpack Compose UI tests, screenshot tests, previews, semantics assertions, fake image loading, keyboard input, focus assertions, interaction state (hover/pressed/focused), or tests for plain state-driven UI composables.

chrisbanes/skills · 54 tokens

compose-animations

Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one state, switching composable content, or choosing between AnimatedVisibility, animateAsState, rememberTransition, AnimatedContent, and Crossfade.

chrisbanes/skills · 64 tokens

compose-focus-navigation

Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events, or initial focus behavior.

chrisbanes/skills · 41 tokens

compose-state-and-effects

Use when writing or reviewing Jetpack Compose state ownership, remember state, state hoisting, screen state holders, LaunchedEffect, DisposableEffect, SideEffect, Flow collection, navigation, snackbar, analytics, or focus requests.

chrisbanes/skills · 50 tokens