Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

android-design安卓设计

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

186

周安装

8

GitHub Stars

2

下载量

65
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:android-design(安卓设计)
来源仓库:https://github.com/moonlightbyte/kiln
仓库路径:skills/android-design
安装命令:
npx skills add https://github.com/moonlightbyte/kiln --skill android-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/moonlightbyte/kiln --skill android-design

简介

聚焦 Material Design 3 规范在 Jetpack Compose 中的落地实施,强调视觉一致性与无障碍体验。

  • 适用于 UI 组件层级规划、动态色彩适配、触摸目标尺寸及字体缩放兼容性检查。
  • 提供语义令牌使用指南、形状系统(4dp 增量)和阴影层级标准参考。
  • 修改真实页面时建议结合截图预览,避免文本溢出或布局错位,并遵循品牌设计系统约束。
  • android-design 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Android Design Skill

Expert knowledge of Material Design 3 for Jetpack Compose applications. This skill enforces design excellence, accessibility compliance, and performance best practices.

Core Principles

1. Material Design 3 Foundation

  • Use semantic tokens, not hardcoded values
  • Apply dynamic color for Android 12+
  • Follow M3 shape scale (4dp extraSmall to 28dp extraLarge)
  • Use elevation levels (0dp to 5 levels)

2. Accessibility First

  • Minimum 48x48dp touch targets
  • 4.5:1 contrast ratio for normal text
  • Proper contentDescription on all interactive elements
  • Support fontScale up to 200%

3. Performance Stability

  • Mark data classes @Immutable or @Stable
  • Use remember and derivedStateOf correctly
  • Prefer LazyColumn over Column for lists
  • Provide stable keys for list items

Typography Scale (15 Styles)

TokenSizeLine HeightWeightUse Case
displayLarge57sp64sp400Hero headlines
displayMedium45sp52sp400Page titles
displaySmall36sp44sp400Section headers
headlineLarge32sp40sp400Card titles
headlineMedium28sp36sp400Dialog titles
headlineSmall24sp32sp400List headers
titleLarge22sp28sp400App bar titles
titleMedium16sp24sp500Tab labels
titleSmall14sp20sp500Chip labels
bodyLarge16sp24sp400Body text
bodyMedium14sp20sp400Secondary text
bodySmall12sp16sp400Captions
labelLarge14sp20sp500Buttons
labelMedium12sp16sp500Small buttons
labelSmall11sp16sp500Badges

Usage Pattern

// GOOD - Semantic tokens
Text(
    text = "Welcome",
    style = MaterialTheme.typography.headlineLarge
)

// BAD - Hardcoded values
Text(
    text = "Welcome",
    fontSize = 32.sp,
    fontWeight = FontWeight.Normal
)

Color System

Key Colors (5 Primary)

  1. Primary - Brand color, interactive elements
  2. Secondary - Less prominent UI
  3. Tertiary - Accents, special elements
  4. Error - Error states
  5. Neutral - Surfaces, backgrounds

Tonal Palettes (13 Tones)

Each key color generates: 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 99, 100

Usage Pattern

// GOOD - Semantic tokens
Surface(color = MaterialTheme.colorScheme.surface) {
    Text(
        text = "Hello",
        color = MaterialTheme.colorScheme.onSurface
    )
}

// BAD - Hardcoded colors
Surface(color = Color(0xFFFAFAFA)) {
    Text(
        text = "Hello",
        color = Color.Black
    )
}

Dynamic Color (Android 12+)

val colorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
    if (darkTheme) dynamicDarkColorScheme(context)
    else dynamicLightColorScheme(context)
} else {
    if (darkTheme) DarkColorScheme
    else LightColorScheme
}

Shape Scale

TokenRadiusUse Case
extraSmall4dpBadges, chips
small8dpSmall cards, buttons
medium12dpCards, dialogs
large16dpLarge sheets
extraLarge28dpFABs, full sheets

Touch Targets

Requirements

  • Minimum: 48x48dp (M3 requirement)
  • Recommended: 48x48dp with 8dp spacing
  • WCAG 2.2: 24x24 CSS px minimum (Level AA)

Implementation

// GOOD - Proper touch target
IconButton(
    onClick = { /* action */ },
    modifier = Modifier.minimumInteractiveComponentSize()
) {
    Icon(
        imageVector = Icons.Default.Close,
        contentDescription = "Close dialog"
    )
}

// BAD - No touch target guarantee
Icon(
    imageVector = Icons.Default.Close,
    modifier = Modifier
        .size(24.dp)
        .clickable { /* action */ }
)

Spacing Scale

Base unit: 4dp

SizedpUse Case
xs4dpInline spacing
sm8dpRelated elements
md12dpGroup spacing
lg16dpSection spacing
xl24dpMajor divisions
2xl32dpPage margins
3xl48dpLarge gaps
4xl64dpHero spacing

DO / DON'T

State Management

DO: Hoist state to appropriate level

@Composable
fun SearchScreen(viewModel: SearchViewModel = viewModel()) {
    val query by viewModel.searchQuery.collectAsState()
    SearchBar(query = query, onQueryChange = viewModel::updateQuery)
}

DON'T: Create state in leaf composables

@Composable
fun SearchBar() {
    var query by remember { mutableStateOf("") } // Can't test, can't share
    TextField(value = query, onValueChange = { query = it })
}

Modifiers

DO: Create modifiers outside composable body

private val cardModifier = Modifier
    .fillMaxWidth()
    .padding(16.dp)

@Composable
fun MyCard() {
    Card(modifier = cardModifier) { /* content */ }
}

DON'T: Create modifiers inside composition

@Composable
fun MyCard() {
    Card(
        modifier = Modifier // Creates new object every recomposition
            .fillMaxWidth()
            .padding(16.dp)
    ) { /* content */ }
}

Collections

DO: Use immutable collections for stable recomposition

@Immutable
data class UiState(
    val items: ImmutableList<Item> = persistentListOf()
)

DON'T: Use mutable collections in state

data class UiState(
    val items: List<Item> = emptyList() // Unstable!
)

LazyColumn Keys

DO: Provide stable keys

LazyColumn {
    items(items, key = { it.id }) { item ->
        ItemRow(item)
    }
}

DON'T: Rely on index-based keys

LazyColumn {
    items(items.size) { index -> // Breaks on reorder
        ItemRow(items[index])
    }
}

Severity Levels

When auditing, classify issues as:

LevelIconDescriptionExample
Critical🔴Blocks accessibility or causes crashesMissing contentDescription
Important🟠Violates M3 guidelines or hurts UXTouch target < 48dp
Warning🟡Suboptimal but functionalHardcoded color
Suggestion🔵Polish opportunitiesNon-standard spacing

References

For detailed specifications, see:

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.1%
按下载量换算21

Claude

32.54%
按下载量换算21

Cursor

17.44%
按下载量换算11

Gemini CLI

8.53%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills