Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

glance-canonical-layouts

Skill by android

Glance Canonical Layouts helps an AI assistant build Android home screen widgets with Jetpack Glance. It is for Android developers who want standard widget layout patterns from the Android Platform Samples project.

  • Score 94
  • 11k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install glance-canonical-layouts

Built from the published package, never by AI.

git clone --depth 1 https://github.com/android/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/system/glance-canonical-layouts ~/.claude/skills/glance-canonical-layouts

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install glance-canonical-layouts in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Glance Canonical Layouts is an agent skill for building Android home screen widgets with Jetpack Glance. It directs the assistant to find a requested layout in the list of canonical reference files, such as Action List, Check List, Expressive Toolbar and Image Grid. The assistant copies those files into the target app module, updates package names and imports, and removes unused code so the project compiles.

The skill also covers setup steps. These include setting SizeMode.Exact in the widget provider, registering the widget receiver in AndroidManifest.xml, and adding the required Glance dependencies. It is intended for Android developers who want to implement standard widget layout patterns, including Check List, Image Grid, Snap Scrolling and Standard Toolbar.

Written from the project's SKILL.md and checked against it.

What it can do

  • Action list layoutBuilds a widget list where items handle actions through Glance action callbacks.
  • Check list layoutBuilds a checklist widget with checkbox toggling through action parameters or callbacks.
  • Expressive toolbar layoutBuilds a toolbar widget with icon buttons and a styled background.
  • Image grid layoutBuilds a widget that shows a grid of images with a fake data repository.
  • Snap scrollingSupports snap scrolling layouts when newer Glance, compileSdk and AGP versions are used.
  • Standard toolbarCovers the standard toolbar widget layout pattern.

What you need

  • Jetpack Glance (glance-appwidget, glance-material3, glance-appwidget-preview, glance-preview 1.2.0 or higher)
  • Android Gradle Plugin 9.1.0 or higher for Snap Scrolling
  • compileSdk 37 for Snap Scrolling
  • Coil image loading library for some sample data repositories
  • androidx.appcompat for FontUtils.kt

Try asking

  • Create a home screen widget with a checklist using Glance canonical layouts
  • Add an image grid widget to my Android app using Jetpack Glance
  • Implement a snap scrolling widget layout with Glance in my project

Good to know

  • Snap Scrolling needs Glance 1.3.0-alpha02 or higher, compileSdk 37 and AGP 9.1.0 or higher.
  • The widget will not appear in the widget picker unless the receiver is registered in AndroidManifest.xml with the matching widget info XML.
  • Sample code must be adapted to the target app's package name, import paths and class names.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: system/glance-canonical-layouts/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md24 KB
  • references/ActionDemonstrationActivity.kt2 KB
  • references/CanonicalLayoutActivity.kt13 KB
  • references/CollectionsKtx.kt1 KB
  • references/collections/ActionListAppWidget.kt3 KB
Show all 88 files
  • references/collections/CheckListAppWidget.kt4 KB
  • references/collections/ImageGridAppWidget.kt3 KB
  • references/collections/ImageTextListAppWidget.kt3 KB
  • references/collections/data/FakeActionListDataRepository.kt4 KB
  • references/collections/data/FakeCheckListDataRepository.kt4 KB
  • references/collections/data/FakeImageGridDataRepository.kt8 KB
  • references/collections/data/FakeImageTextListDataRepository.kt7 KB
  • references/collections/layout/ActionListLayout.kt20 KB
  • references/collections/layout/CheckListLayout.kt17 KB
  • references/collections/layout/EmptyListContent.kt900 B
  • references/collections/layout/ImageGridLayout.kt13 KB
  • references/collections/layout/ImageTextListLayout.kt17 KB
  • references/collections/layout/ListItem.kt3 KB
  • references/collections/layout/NoDataContent.kt3 KB
  • references/collections/layout/RoundedScrollingLazyColumn.kt3 KB
  • references/collections/layout/RoundedScrollingLazyVerticalGrid.kt4 KB
  • references/collections/layout/VerticalListItem.kt3 KB
  • references/res/drawable/four_side_cookie_background.xml1 KB
  • references/res/drawable/sample_ac_icon.xml1 KB
  • references/res/drawable/sample_add_icon.xml315 B
  • references/res/drawable/sample_app_logo.xml1 KB
  • references/res/drawable/sample_arrow_right_icon.xml365 B
  • references/res/drawable/sample_bulb_icon.xml651 B
  • references/res/drawable/sample_camera_icon.xml1 KB
  • references/res/drawable/sample_checked_circle_icon.xml402 B

And 58 more files on GitHub.

Alternatives to glance-canonical-layouts

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

glance-canonical-layouts: common questions

What is a Glance canonical layout?

The source describes these as standard widget layout patterns from the Android Platform Samples project, built with Jetpack Glance. Examples named include Check List, Image Grid, Snap Scrolling and Standard Toolbar.

Does this skill require Jetpack Glance?

Yes. The skill states that the project must use Jetpack Glance, and it lists the Glance dependencies to add to the app module.

Why does my widget not show in the widget picker?

The source says the widget receiver must be registered in AndroidManifest.xml inside the application element, with android:resource pointing to the copied Widget Info XML file.

How do I install glance-canonical-layouts?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is glance-canonical-layouts free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is glance-canonical-layouts safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to glance-canonical-layouts?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

glance-canonical-layouts Install

Add to stack

Loading.