| 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 |