| name | android-scaffold |
| description | Create a new Android project from an official Android CLI template using `android create`. Use when the user wants to start a new Android app from scratch, scaffold a sample project, or compare templates with `--dry-run`. Triggers include "새 안드로이드 프로젝트", "안드로이드 프로젝트 만들어줘", "compose 템플릿", "android create", "프로젝트 생성", "scaffold". Do NOT use this skill to add modules to an existing project — use Gradle / Studio for module creation. |
android-scaffold
Wraps android create with a reproducible flow: list available templates, dry-run to preview, generate, and optionally chain into emulator + first deploy via the other skills in this repo.
Configuration
{
"androidCli": {
"defaultTemplate": "empty-activity-agp-9",
"defaultProjectsDir": "/Users/me/AndroidStudioProjects"
}
}
| Field | Purpose |
|---|
androidCli.defaultTemplate | Template to use when the user doesn't specify one. |
androidCli.defaultProjectsDir | Parent directory for new projects. The skill creates <defaultProjectsDir>/<name> unless the user passes an explicit --output. |
Workflow
android create list # see real template names (they evolve)
↓
android create --dry-run --verbose <template> # optional: preview what will be created
↓
android create --name=<Name> --output=<dir> <template> # actually create
↓ (optional chain)
android-emulator → android-deploy # boot an emulator and run the new app
Step-by-step
-
List templates first. Names change; never hardcode without checking.
android create list
Default landing template at the time of writing is empty-activity-agp-9. Confirm this still appears in the output before relying on it.
-
Pick a template.
- If user specified one → use it.
- Else → use
androidCli.defaultTemplate from config.
- Else → ask the user; show 3–5 most relevant options from
create list.
-
(Optional) Dry-run for unfamiliar templates so the user can preview file layout before committing:
android create --dry-run --verbose --output=/tmp/preview <template>
Useful when comparing two templates side by side.
-
Create.
android create \
--name="<ProjectName>" \
--output="<defaultProjectsDir>/<ProjectName>" \
<template>
--output is mandatory. Don't omit it.
--name controls the project directory name displayed in Studio. If omitted, the output directory's basename is used.
-
Verify. After create:
cd <output>
./gradlew help
Skip this if the user said "just scaffold, don't run anything".
-
(Optional) First deploy. If the user's intent is "make a new project and run it", chain to:
android-emulator to ensure a device is up
android-deploy to build and run
Operating rules
- Always list templates first. Templates are versioned (e.g.
empty-activity-agp-9 → future agp-10). Listing avoids stale assumptions.
- Don't create silently. Show the resolved command and the target output path to the user before executing — scaffolding is irreversible-ish (deleting the output is fine, but the user wants to know where it landed).
- Don't pre-create the output directory.
android create errors if the directory already has files. Let it own creation.
- Use
--dry-run when uncertain. It's free and clarifies what the template emits.
- Don't wedge in third-party templates. This skill only knows the official
android create templates. For custom templates, use a different mechanism.
- Don't chain to deploy by default. Many users just want the project on disk to open in Studio. Ask before booting an emulator.
Anti-patterns
- ❌ Hardcoding
empty-activity-agp-9 without running android create list first — eventually the template name changes and the command fails.
- ❌ Omitting
--output — android create requires it.
- ❌ Pre-creating the output directory with
mkdir. android create writes into a directory it owns.
- ❌ Running
android create inside an existing project root. Always go up one level (or use --output=../NewProject).
- ❌ Boot-and-deploying without asking — scaffold + deploy is two distinct user intents.
- ❌ Recommending a non-Compose template in 2026 unless the user explicitly asks for Views.
Error recovery
| Error | Cause | Fix |
|---|
template '<name>' not found | Stale or wrong template name | android create list, pick a real one |
output directory exists and is not empty | Reusing a path | Pick a new output, or delete the existing dir if the user confirms |
create succeeded but Gradle sync fails | AGP version newer than installed Gradle | cd <output> && ./gradlew wrapper --gradle-version=<latest> |
| Studio can't open the project | Missing local.properties with sdk.dir | Run android info and write the resolved path to <project>/local.properties |