Agent skill

UI Shadowlayout

by afkT in afkT/DevUtils

在布局中需要阴影、圆角、纯色/渐变背景、描边、pressed/selected/ripple、虚线、子 View 按圆角裁剪, 或想少写 shape/layer-list/selector drawable 时,优先使用 com.lihang.ShadowLayout( https://github.com/lihangleo2/ShadowLayout )。流程与常见坑在…

Apache-2.0Auto-check passedDevelopment

Install UI Shadowlayout

skills CLI
$ npx skills add afkT/DevUtils --skill ui-shadowlayout -a claude-code

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

GitHub CLI
$ gh skill install afkT/DevUtils ui-shadowlayout --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/afkT/DevUtils.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/ui-shadowlayout .claude/skills/ui-shadowlayout && 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
ui-shadowlayout
GitHub stars
1.6k
Token cost
~1.1k tokens
SKILL.md length
193 words
Files
2 (incl. references)
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

在布局中需要阴影、圆角、纯色/渐变背景、描边、pressed/selected/ripple、虚线、子 View 按圆角裁剪, 或想少写 shape/layer-list/selector drawable 时,优先使用 com.lihang.ShadowLayout( https://github.com/lihangleo2/ShadowLayout )。流程与常见坑在…

  • Works in 7 steps: 类与父类:com.lihang.ShadowLayout 继承… → 命名空间:xmlns:app="http://schemas.android.co… → styleable 名:ShadowLayout,XML 里属性前缀一般为… → …
  • Tasks that involve Technical documentation
  • SKILL.md covers 权威来源(仅 Maven + 上游 GitHub), 何时用本 Skill(对齐 README 能力), 核心事实(减少踩坑) and 虚线模式 dashLine(单独使用), plus 3 more sections
  • Reaches schemas.android.com

What it does

UI Shadowlayout is an agent skill from afkT/DevUtils. 在布局中需要阴影、圆角、纯色/渐变背景、描边、pressed/selected/ripple、虚线、子 View 按圆角裁剪, 或想少写 shape/layer-list/selector drawable 时,优先使用 com.lihang.ShadowLayout( https://github.com/lihangleo2/ShadowLayout )。流程与常见坑在 SKILL,R.styleable.ShadowLayout 下全部 app:hl、代码 API 与 raw 源码见 references/reference.md。以 Maven/JitPack 坐标与上游 GitHub README/raw 为准,不依赖工作区 shadowLibrary 模块路径。

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/reference.md`).

It sits in Development, covering Technical documentation. It works with GitHub. The repository describes itself as: :fire: ( 持续更新,目前含 300+ 工具类 ) DevUtils 是一个 Android 工具库,主要根据不同功能模块,封装快捷使用的工具类及 API 方法调用。该项目尽可能的便于开发人员,快捷、高效开发安全可靠的项目。 The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Technical documentation

Example prompts

  • “/ui-shadowlayout”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. 类与父类:com.lihang.ShadowLayout 继承 FrameLayout,子 View 写在标签内即可。
  2. 命名空间:xmlns:app="http://schemas.android.com/apk/res-auto"(以工程为准)。
  3. styleable 名:ShadowLayout,XML 里属性前缀一般为 app:(全表见 references/reference.md)。
  4. 库内拼写:描边宽度属性为 app:hl_strokeWith(README 与源码均为 With,不是 Width)。
  5. 默认背景:未设置背景时内部逻辑偏白色底;仅做裁剪、不要白底时设 app:hl_layoutBackground 为透明色(README 示例用 @color/transparent)。
  6. 子 View 裁剪:dispatchDraw 内对子级做 clipPath(@RequiresApi(LOLLIPOP));逻辑在存在 getChildAt(0) != null 时按圆角裁剪,需 API 21+ 行为与设备 GPU 路径支持。
  7. RecyclerView 内点透:README 建议裁剪容器上 app:clickable="false" 避免与 item 点击冲突(见属性表 clickable)。

What it can do on your machine

Read from SKILL.md and the folder at commit 6022ede. 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 xml).

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • schemas.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

UI Shadowlayout loads about 1.1k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 193 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

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 afkT/DevUtils at commit 6022ede, republished under its Apache-2.0 licence (© afkT). 193 words, ~1,051 tokens.

Download SKILL.mdSave it as .claude/skills/ui-shadowlayout/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ui-shadowlayout
description
在布局中需要阴影、圆角、纯色/渐变背景、描边、pressed/selected/ripple、虚线、子 View 按圆角裁剪, 或想少写 shape/layer-list/selector drawable 时,优先使用 com.lihang.ShadowLayout( https://github.com/lihangleo2/ShadowLayout )。流程与常见坑在 SKILL,R.styleable.ShadowLayout 下全部 app:hl_*、代码 API 与 raw 源码见 references/reference.md。以 Maven/JitPack 坐标与上游 GitHub README/raw 为准,不依赖工作区 shadowLibrary 模块路径。

ShadowLayout:阴影 + Shape/Selector + 裁剪

权威来源(仅 Maven + 上游 GitHub)

禁止在工作区内查找或假设存在 shadowLibrary/ 等上游子模块路径。能力说明、hl_* 属性全表、代码 API、版本 tag 与 raw 链接见 references/reference.md。

新增依赖:JitPack 坐标 com.github.lihangleo2:ShadowLayout:<version>;本仓库集中坐标时 Read project-gradle-central-deps/SKILL.md,勿重复 GAV。

何时用本 Skill(对齐 README 能力)

对照上游 README;属性枚举与实现细节以 references/reference.md 中的上游 raw 为准(仅通过上游 URL,不读本地模块)。

在以下场景优先用 ShadowLayout 包裹子 View,减少 drawable 里的 shape / selector / layer-list:

  • 阴影:颜色、扩散、圆角、X/Y 偏移、单边或多边隐藏、是否完全关闭阴影。
  • 圆角:统一圆角,或四角独立(含阴影与内容区)。
  • 背景:纯色、reference 图片、与 pressed / selected / ripple 组合(类 selector)。
  • 描边:实线或虚线(dash);可按状态切换描边色。
  • 渐变:线性渐变(起止色、可选中间色、角度);设置后纯色背景属性失效。
  • 不可点击态:clickable=false 时的单独背景(配合 pressed 等)。
  • 子 View 圆角裁剪:如视频、图片、任意 View 需要不规则圆角外轮廓裁剪(README「剪裁各种难以搞定的圆角」)。

不适用 / 慎用:hl_shapeMode="dashLine" 时控件退化为虚线线段模式,初始化路径与阴影/shape 主流程不同,不能混用渐变等能力(见下文「虚线模式」)。

与 DevWidget round 包:若需求仅为无阴影的圆角矩形纯色+描边且工程已用 DevWidget,可按项目 ui-devwidget-round 取舍;本 Skill 覆盖阴影、渐变、ripple、selector 态、裁剪等更重场景。

核心事实(减少踩坑)

  1. 类与父类:com.lihang.ShadowLayout 继承 FrameLayout,子 View 写在标签内即可。
  2. 命名空间:xmlns:app="http://schemas.android.com/apk/res-auto"(以工程为准)。
  3. styleable 名:ShadowLayout,XML 里属性前缀一般为 app:(全表见 references/reference.md)。
  4. 库内拼写:描边宽度属性为 app:hl_strokeWith(README 与源码均为 With,不是 Width)。
  5. 默认背景:未设置背景时内部逻辑偏白色底;仅做裁剪、不要白底时设 app:hl_layoutBackground 为透明色(README 示例用 @color/transparent)。
  6. 子 View 裁剪:dispatchDraw 内对子级做 clipPath(@RequiresApi(LOLLIPOP));逻辑在存在 getChildAt(0) != null 时按圆角裁剪,需 API 21+ 行为与设备 GPU 路径支持。
  7. RecyclerView 内点透:README 建议裁剪容器上 app:clickable="false" 避免与 item 点击冲突(见属性表 clickable)。

虚线模式 dashLine(单独使用)

  • 仅保留:hl_shapeMode="dashLine"、hl_strokeColor、hl_stroke_dashWidth、hl_stroke_dashGap(缺一会抛 UnsupportedOperationException)。
  • 横向虚线:View 宽 > 高;纵向虚线:高 ≥ 宽(README:以长边为宽度、短边为线粗语义)。
  • 此模式下勿再依赖阴影、渐变、圆角卡片等主流程 API(上游行为见 references/reference.md)。

常用属性与 API 速查

XML 最小片段(速查)

圆角 + 阴影 + 子 View

xml
<com.lihang.ShadowLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:hl_cornerRadius="10dp"
    app:hl_shadowColor="#2a000000"
    app:hl_shadowLimit="5dp">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        android:text="内容" />
</com.lihang.ShadowLayout>

仅裁剪 + 透明底(README 视频圆角)

xml
<com.lihang.ShadowLayout
    android:layout_width="match_parent"
    android:layout_height="200dp"
    app:hl_cornerRadius_leftTop="12dp"
    app:hl_cornerRadius_rightTop="12dp"
    app:hl_layoutBackground="@android:color/transparent"
    app:clickable="false">
    <!-- 子 View:SurfaceView / TextureView / ImageView 等 -->
</com.lihang.ShadowLayout>

自检清单(写布局前)

  • 是否需要 阴影?不需要则 hl_shadowHidden="true" 或只配 shape/裁剪。
  • 描边宽度是否写成 hl_strokeWith?
  • hl_layoutBackground_true / hl_strokeColor_true 是否与对应「常态」属性成对?
  • 渐变是否误配了仍期望生效的 hl_layoutBackground?
  • 裁剪/列表场景是否处理 clickable 与 透明背景?
  • dashLine 是否单独使用且 dash 参数成对?
  • 版本/属性有疑义时是否已对照 与依赖版本同 tag 的上游 raw(README / attrs / ShadowLayout.java),而非工作区路径?

© afkT, 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

SKILL.md and 1 other file (references) in .cursor/skills/ui-shadowlayout of afkT/DevUtils.

  • SKILL.md
  • references/reference.md

Open the folder on GitHubat commit 6022ede

Compare with similar skills

UI Shadowlayout 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.

UI Shadowlayout compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
UI Shadowlayout this skillafkT/DevUtils1.6k—~1.1kAutomated safety check: PassApache-2.0
Update .NET OS Packagesdotnet/core22k—~2.3kAutomated safety check: PassMIT
Beautify GitHub Readmeoil-oil/beautify-github-readme1.8k—~4.1kAutomated safety check: PassMIT
Library Documentation Seekerwithkynam/vibecode-pro-max-kit1.1k2 repos~1kAutomated safety check: NotesMIT
Update .NET Supported OS Matrixdotnet/core22k—~4.1kAutomated safety check: PassMIT
Debate ReviewamElnagdy/review-skills1322 repos~986Automated safety check: PassMIT

Similar skills

  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Beautify GitHub Readme

    oil-oil/beautify-github-readme

    Redesign GitHub README homepages or create project-native pure SVG, hybrid SVG-composed PNG/WebP, and opt-in animated GIF assets.

    1.8k GitHub stars~4.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Library Documentation Seeker

    withkynam/vibecode-pro-max-kit

    Looks up library and framework documentation through Context7 first, with bundled Node scripts as a fallback that fetch and analyze llms.txt files.

    1.1k GitHub starsUsed in 2 repos~1k tokens
    DevelopmentAuto-check: notes
  • Official

    Audits and updates the supported-os.json files for .NET releases, checking them against upstream lifecycle data and regenerating the markdown with the release-notes tool.

    22k GitHub stars~4.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Debate Review

    amElnagdy/review-skills

    Two-model debate review of a GitHub PR, GitLab MR, Azure DevOps PR, or local working tree, posted as inline comments or printed.

    132 GitHub starsUsed in 2 repos~986 tokens
    DevelopmentAuto-check passed
  • Post Draft Review

    agent-substrate/substrate

    Posts pull request review findings as GitHub draft (pending) inline comments for a human to edit and submit, instead of publishing them straight to the PR author.

    4.5k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed

More from afkT/DevUtils

All 13 skills in this repo
  • 依据 Android 官方「版本」文档完成平台适配:按版本号 N 抓取行为变更(所有应用、 targetSdk=N)、changes/features 子页与探索新功能/API;归纳影响项并落地到 Manifest/Gradle/工具类封装。在用户要求 Android 版本适配、行为变更排查、 targetSdk 升级、新 API 封装或对照…

    1.6k GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • 统一 Android XML 资源命名:layout、drawable、mipmap、color、values、id 的前缀与 snakecase 规则;把颜色/圆角/描边/状态编码进文件名(bg、border、textcolor…selector)。

    1.6k GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • 根据用户给出的 Java/Kotlin 工具类或 View 相关源码,设计并实现 androidx.databinding.BindingAdapter。

    1.6k GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • 对 DevUtils 工程(DEPSROOT=file/gradle、DEPSMANIFEST=file/deps)中定义的第三方库 GAV 依赖做版本查证与升级;结合 Maven Central、Google Maven、Gradle Plugin Portal、 JitPack 与 GitHub Releases/README 交叉校验「最新可用版本」;必要时修正…

    1.6k GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • 为布局 XML 中的控件默认补全 DevSimple(lib/DevSimple)的 ViewTheme 样式引用: 按控件继承链匹配 ViewTheme.&lt;类名&gt;,ImageView/AppCompatImageView 使用 ViewTheme.ImageView.FITXY,无匹配则用 ViewTheme.View。工作区内优先 Read…

    1.6k GitHub stars~727 tokensUpdated 1 mo ago
    Auto-check passed
  • UI Devwidget Round

    afkT/DevUtils

    在需要圆角矩形纯色背景、描边边框时,优先用 DevWidget(io.github.afkt:DevWidgetX)的 dev.widget.ui.round 包替代 shape / layer-list drawable。流程与核心坑在 SKILL,Round 系列 View、R.styleable.DevWidget 中 app:dev 属性及源码对照见…

    1.6k GitHub stars~880 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about UI Shadowlayout

What does UI Shadowlayout do?

在布局中需要阴影、圆角、纯色/渐变背景、描边、pressed/selected/ripple、虚线、子 View 按圆角裁剪, 或想少写 shape/layer-list/selector drawable 时,优先使用 com.lihang.ShadowLayout( https://github.com/lihangleo2/ShadowLayout )。流程与常见坑在…. UI Shadowlayout is an agent skill from afkT/DevUtils.

When should I use UI Shadowlayout?

UI Shadowlayout fits situations like: tasks that involve Technical documentation.

How do I install UI Shadowlayout in Claude Code?

Run `npx skills add afkT/DevUtils --skill ui-shadowlayout -a claude-code`. Or copy the skill folder (.cursor/skills/ui-shadowlayout in afkT/DevUtils) into .claude/skills/ui-shadowlayout in your project. Claude Code loads it when a task matches its description.

How do I install UI Shadowlayout in Codex?

Run `npx skills add afkT/DevUtils --skill ui-shadowlayout -a codex`. Or copy the skill folder (.cursor/skills/ui-shadowlayout in afkT/DevUtils) into .agents/skills/ui-shadowlayout in your project. Codex loads it when a task matches its description.

Can I use UI Shadowlayout 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 afkT/DevUtils --skill ui-shadowlayout -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ui-shadowlayout, .gemini/skills/ui-shadowlayout, .github/skills/ui-shadowlayout and .opencode/skills/ui-shadowlayout in your project.

What does UI Shadowlayout need to run?

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

Does UI Shadowlayout access the network?

SKILL.md names 1 domain. In commands or code: schemas.android.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is UI Shadowlayout 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 UI Shadowlayout use?

UI Shadowlayout 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 UI Shadowlayout use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.

What are the alternatives to UI Shadowlayout?

Skills that share tags, products or a category with UI Shadowlayout: Update .NET OS Packages (dotnet/core, 22k stars), Beautify GitHub Readme (oil-oil/beautify-github-readme, 1.8k stars), Library Documentation Seeker (withkynam/vibecode-pro-max-kit, 1.1k stars) and Update .NET Supported OS Matrix (dotnet/core, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains UI Shadowlayout?

afkT (a GitHub user) maintains it in afkT/DevUtils, which has 1,612 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 2, 2026.

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