Agent skill

Android Compose Reference

by Kototoro-app in Kototoro-app/Kototoro

Jetpack Compose 官方示例与最佳实践参考。涵盖 Compose UI 实现、动画、手势、导航、Material3 主题、 性能优化、测试等所有方面。安卓开发第一要义:参考官方文档和案例!

Apache-2.0Auto-check passedMobile

Install Android Compose Reference

skills CLI
$ npx skills add Kototoro-app/Kototoro --skill android-compose-reference -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Kototoro-app/Kototoro android-compose-reference --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Kototoro-app/Kototoro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.pi/skills/android-compose-reference .claude/skills/android-compose-reference && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
android-compose-reference
GitHub stars
602
Token cost
~1.3k tokens
SKILL.md length
242 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Jetpack Compose 官方示例与最佳实践参考。涵盖 Compose UI 实现、动画、手势、导航、Material3 主题、 性能优化、测试等所有方面。安卓开发第一要义:参考官方文档和案例!

  • Works in 5 steps: compose-samples ⭐23.2k → nowinandroid ⭐21.4k → architecture-samples ⭐45.7k → …
  • Tasks that involve Android development
  • SKILL.md covers 📦 核心官方仓库, 🧭 导航 (Navigation), 🎨 Material3 主题 and 🎬 动画, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Android Compose Reference is an agent skill from Kototoro-app/Kototoro. Jetpack Compose 官方示例与最佳实践参考。涵盖 Compose UI 实现、动画、手势、导航、Material3 主题、 性能优化、测试等所有方面。安卓开发第一要义:参考官方文档和案例! Triggers: "Compose 怎么写", "Compose 动画", "Compose 导航", "Compose 性能", "Compose 主题", "Jetpack Compose sample", "Material3 Compose", "Compose testing", "Compose best practice"

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Android development. It works with Jetpack Compose and Android. The repository describes itself as: Manga, Novel, and Video reader for Android. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Android development

Example prompts

  • “Compose 怎么写”
  • “Compose 动画”
  • “Compose 导航”
  • “/android-compose-reference”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. compose-samples ⭐23.2k
  2. nowinandroid ⭐21.4k
  3. architecture-samples ⭐45.7k
  4. sunflower ⭐17.8k
  5. user-interface-samples ⭐4.6k

What it can do on your machine

Read from SKILL.md and the folder at commit 3df24c7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • developer.android.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Android Compose Reference loads about 1.3k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 242 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Kototoro-app/Kototoro at commit 3df24c7, republished under its Apache-2.0 licence (© Kototoro-app). 242 words, ~1,294 tokens.

Download SKILL.mdSave it as .claude/skills/android-compose-reference/SKILL.md (or your agent's skills folder).
name
android-compose-reference
description
Jetpack Compose 官方示例与最佳实践参考。涵盖 Compose UI 实现、动画、手势、导航、Material3 主题、 性能优化、测试等所有方面。安卓开发第一要义:参考官方文档和案例! Triggers: "Compose 怎么写", "Compose 动画", "Compose 导航", "Compose 性能", "Compose 主题", "Jetpack Compose sample", "Material3 Compose", "Compose testing", "Compose best practice"

Jetpack Compose 官方参考索引

安卓开发第一要义:参考官方文档和案例!

Compose 是现代 Android UI 开发的推荐方式。以下仓库由 Android 团队维护, 是学习 Compose 最佳实践的第一手资料。


📦 核心官方仓库

1. compose-samples ⭐23.2k

官方的 Jetpack Compose 示例集合 — Compose 学习首选仓库。

内含多个完整应用示例:

示例应用展示内容
JetNews新闻阅读应用 — Compose 基础:列表、导航、主题
Jetchat聊天应用 — 高级 Compose:动画、状态提升、自定义布局
JetSnack电商应用 — 复杂布局、图片处理、BottomSheet
Crane旅行应用 — Material3、自定义绘制、MapView 集成
Owl教育应用 — 自定义主题、深色模式、复杂排版
Reply邮件应用 — 自适应布局(手机/平板/折叠屏)、WindowSizeClass

关键学习路径:

compose-samples/
├── JetNews/       # 💡 新手入门:基础 Compose
├── Crane/         # 🎨 Material3 + 自定义主题
├── Jetchat/       # 🚀 进阶:动画 + 状态管理
├── Reply/         # 📱 自适应布局
└── Owl/           # 🎭 高级主题定制

2. nowinandroid ⭐21.4k

生产级 Compose 应用 — 架构参考首选。

展示内容:

  • 完整的 Compose + Material3 应用
  • 模块化架构(:core:ui, :feature:*, :core:data 等)
  • UDF (Unidirectional Data Flow) 模式
  • Gradle 版本目录(Version Catalog)
  • 完整的 CI/CD 流程
  • Compose 测试(UI 测试 + 截图测试)

3. architecture-samples ⭐45.7k

架构模式演进 — 理解 Compose 时代的架构。

关键分支:

  • main:UDF + StateFlow,当前推荐
  • views:经典 View 架构
  • compose:Compose 架构演进

4. sunflower ⭐17.8k

View → Compose 迁移 — 适合从 View 迁移到 Compose 的项目。

展示 View 代码如何逐步迁移到 Compose。


5. user-interface-samples ⭐4.6k

UI 专项示例 — 深入 UI 细节。

关键示例:

  • WindowInsetsAnimation — 键盘动画、系统栏适配
  • MotionLayout — 复杂交互动画
  • CustomLayout — 自定义 Compose Layout
  • Accessibility — 无障碍
  • Insets — WindowInsets 处理

🧭 导航 (Navigation)

仓库说明
nav3-recipes ⭐1.3kNavigation3 常见用例:类型安全导航、深层链接、BottomNavigation 集成、返回栈管理等
codelab-android-navigation ⭐633Navigation Codelab

Navigation3 类型安全导航(推荐):

kotlin
// 定义路由(类型安全,无需字符串)
@Serializable data class Profile(val id: String)

// 导航
navController.navigate(Profile(id = "123"))

🎨 Material3 主题

参考仓库:

官方文档:Material Design 3 for Compose


🎬 动画

参考仓库:

Compose 动画 API 层级:

animate*AsState       → 简单属性动画(推荐起手)
AnimatedVisibility    → 显示/隐藏动画
AnimatedContent       → 内容切换动画
Crossfade            → 淡入淡出
updateTransition      → 多属性协同动画
rememberInfiniteTransition → 无限循环动画
AnimationSpec        → 自定义动画曲线(tween, spring, keyframes)

🧪 Compose 测试

参考仓库:testing-samples ⭐9.3k

Compose 测试三件套:

kotlin
// 1. 元素查找
composeTestRule.onNodeWithText("Submit")

// 2. 交互
composeTestRule.onNodeWithText("Submit").performClick()

// 3. 断言
composeTestRule.onNodeWithText("Success").assertIsDisplayed()

含截图测试(Screenshot Testing)、语义测试等高级主题。


⚡ Compose 性能

参考仓库:performance-samples ⭐1.4k

关键主题:

  • Baseline Profile — 提升 Compose 首帧速度
  • Stability 标记 — 使用 @Stable / @Immutable
  • 重组优化 — 减少不必要的重组
  • 延迟布局 — LazyColumn / LazyRow 优化
  • remember/derivedStateOf — 状态缓存
  • Compose Compiler Metrics — 编译期分析

📱 自适应布局

仓库说明
adaptive-apps-samples自适应布局示例
large-screen-codelabs大屏/折叠屏适配

关键 API:

  • WindowSizeClass — 根据窗口尺寸调整布局
  • BoxWithConstraints — 约束感知布局
  • LocalConfiguration.current — 配置变化响应

🚀 本项目 (Kototoro) Compose 开发工作流

当需要实现 Compose 相关功能时:

1. compose-samples 中搜索相似 UI → 找到参考实现
2. nowinandroid 中搜索架构模式 → 理解状态管理
3. user-interface-samples 中搜索细节 → 手势/Insets/动画
4. 在官方实现基础上适配 → 而非从零开始

禁止:从非官方博客/教程中复制代码而不验证。任何第三方方案都要和官方示例对比。


📚 补充链接

© Kototoro-app, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .pi/skills/android-compose-reference of Kototoro-app/Kototoro.

Open the folder on GitHubat commit 3df24c7

Compare with similar skills

Android Compose Reference next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Android Compose Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Android Compose Reference this skillKototoro-app/Kototoro602—~1.3kAutomated safety check: PassApache-2.0
Compose Multiplatform Patternsmonta-app/ocpp-emulator1795 repos~2kAutomated safety check: PassApache-2.0
Android Developmentdpconde/claude-android-skill336—~1.7kAutomated safety check: PassMIT
Stylesarindamxd/camerax-android1324 repos~2.3kAutomated safety check: PassApache-2.0
Benchmarkandroidx/androidx6.1k—~1.1kAutomated safety check: PassApache-2.0
Mobile Android Designopenvetta/open-vetta2903 repos~950Automated safety check: PassApache-2.0

Similar skills

  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    179 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Android Development

    dpconde/claude-android-skill

    Create production-quality Android applications following Google's official architecture guidance and NowInAndroid best practices.

    336 GitHub stars~1.7k tokensUpdated 10 mo ago
    MobileAuto-check passed
  • Styles

    arindamxd/camerax-android

    A skill your agent uses to integrate the Jetpack Compose Styles API into an Android project.

    132 GitHub starsUsed in 4 repos~2.3k tokens
    MobileAuto-check passed
  • Benchmark

    androidx/androidx

    Benchmarking and improving the performance of Jetpack Compose.

    6.1k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • Mobile Android Design

    openvetta/open-vetta

    Master Material Design 3 and Jetpack Compose patterns for building native Android apps.

    290 GitHub starsUsed in 3 repos~950 tokens
    MobileAuto-check passed
  • Generating Baseline Profiles

    rosuH/EasyWatermark

    A skill your agent uses to generate and measure Jetpack Compose Baseline Profiles end-to-end with the AGP 8.2+ Baseline Profile Generator module and the Macrobenchmark harness.

    1.9k GitHub starsUsed in 1 repo~5k tokens
    MobileAuto-check passed

More from Kototoro-app/Kototoro

All 10 skills in this repo
  • Android Architecture Reference

    Kototoro-app/Kototoro

    Android 架构、依赖注入、数据层、测试规范官方参考。涵盖 UDF/MVI 模式、Hilt/Dagger、Room、Paging、 DataStore、WorkManager、ViewModel、测试策略等。安卓开发第一要义:参考官方文档和案例!

    602 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Android Official Samples

    Kototoro-app/Kototoro

    Android 官方示例代码库完整索引。涵盖架构、Compose UI、性能、测试、存储、网络、相机、媒体、安全等所有领域。

    602 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Compose Idle Redraw

    Kototoro-app/Kototoro

    诊断 Kototoro 主壳"空闲永不定居"式 Compose 自持重绘循环(idle 帧数不为 0). An agent skill from Kototoro-app/Kototoro.

    602 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Kototoro Browse Source Scroll

    Kototoro-app/Kototoro

    Diagnose and fix Kototoro Browse/Explore page content source scrolling jank when many sources exist.

    602 GitHub stars~793 tokensUpdated today
    Auto-check passed
  • Diagnose and fix Kototoro Android issues where returning from reader or video player to details causes flicker, cover reload, panorama reload, progress reset, status bar jump, Compose subtree…

    602 GitHub stars~946 tokensUpdated today
    Auto-check passed
  • Kototoro Main Loading Stability

    Kototoro-app/Kototoro

    Diagnose and fix Kototoro main screen loading flicker, blank flashes, chrome jumps, transient empty states, and route switching flashes.

    602 GitHub stars~904 tokensUpdated today
    Auto-check passed

Categories

Questions about Android Compose Reference

What does Android Compose Reference do?

Jetpack Compose 官方示例与最佳实践参考。涵盖 Compose UI 实现、动画、手势、导航、Material3 主题、 性能优化、测试等所有方面。安卓开发第一要义:参考官方文档和案例!. Android Compose Reference is an agent skill from Kototoro-app/Kototoro.

When should I use Android Compose Reference?

Android Compose Reference fits situations like: tasks that involve Android development.

How do I install Android Compose Reference in Claude Code?

Run `npx skills add Kototoro-app/Kototoro --skill android-compose-reference -a claude-code`. Or copy the skill folder (.pi/skills/android-compose-reference in Kototoro-app/Kototoro) into .claude/skills/android-compose-reference in your project. Claude Code loads it when a task matches its description.

How do I install Android Compose Reference in Codex?

Run `npx skills add Kototoro-app/Kototoro --skill android-compose-reference -a codex`. Or copy the skill folder (.pi/skills/android-compose-reference in Kototoro-app/Kototoro) into .agents/skills/android-compose-reference in your project. Codex loads it when a task matches its description.

Can I use Android Compose Reference in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Kototoro-app/Kototoro --skill android-compose-reference -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/android-compose-reference, .gemini/skills/android-compose-reference, .github/skills/android-compose-reference and .opencode/skills/android-compose-reference in your project.

What does Android Compose Reference need to run?

SKILL.md names no scripts, command-line tools or credentials: Android Compose Reference is instructions for the agent only.

Does Android Compose Reference access the network?

SKILL.md names 2 domains. As links in the text: github.com and developer.android.com. This is read from the text; nothing was executed.

Is Android Compose Reference safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Android Compose Reference use?

Android Compose Reference is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Android Compose Reference use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Android Compose Reference?

Skills that share tags, products or a category with Android Compose Reference: Compose Multiplatform Patterns (monta-app/ocpp-emulator, 179 stars), Android Development (dpconde/claude-android-skill, 336 stars), Styles (arindamxd/camerax-android, 132 stars) and Benchmark (androidx/androidx, 6.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Android Compose Reference?

Kototoro-app (a GitHub organization) maintains it in Kototoro-app/Kototoro, which has 602 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

Source: Kototoro-app/Kototoro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.