modularization

在编写或修改多模块 Android/Kotlin 项目中的任何类、对象、函数、属性或常量时使用(settings.gradle(.kts) 包含多个模块,例如 :app、:core:*、:feature:*、:data 等)。适用于出现顶级声明使用 Kotlin 默认 public 可见性、应仅模块内可见却被其他模块访问、为“调用方需要访问”而设为 public,或在是否应为 public 与 internal 间纠结的情况。

仓库最近推送
GitHub Stars
183
Forks
22
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "modularization":https://skillpi.com/zh/skills/deepskill-276b70ab61609502cb404e1ca09be8b01fab4a48d6fa17255d2bd1891ff59c3a。安装前核对上游来源和版本:https://github.com/rcosteira79/android-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

在编写或修改多模块 Android/Kotlin 项目中的任何类、对象、函数、属性或常量时使用(settings.gradle(.kts) 包含多个模块,例如 :app、:core:*、:feature:*、:data 等)。适用于出现顶级声明使用 Kotlin 默认 public 可见性、应仅模块内可见却被其他模块访问、为“调用方需要访问”而设为 public,或在是否应为 public 与 internal 间纠结的情况。

0 下载

介绍来源: third_party · rcosteira79 · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: modularization
description: Use when writing or changing any class, object, function, property, or constant in a multi-module Android/Kotlin project (settings.gradle(.kts) includes more than one module — :app, :core:*, :feature:*, :data, etc.). Symptoms — a top-level declaration left at Kotlin's default public visibility; an implementation class, mapper, helper, constant, or UI-state holder reachable from another module though only used within its own; reaching for public "because the caller needs it"; "should this be public or internal?".

Modularization

Declare everything at the lowest visibility that still compiles. Start private; widen to internal only when another file in the same module needs it; widen to public only when a different module actually consumes it. Kotlin defaults to public, and in a multi-module project that default is usually wrong — a public symbol joins the module's API surface: it leaks implementation across the boundary and you are then obliged to keep it stable.

  • Public interface as the module's API → the interface is public; its implementation class stays internal (DI-bound, never named from another module).
  • Mapper / helper / extension / constant / UI-state holder used only inside the module → internal (or private if a single file uses it). "Rendered by a composable in this module" does not require public — internal is visible to the whole module.
  • Member used only within its class → private.

Widening a symbol to public is a decision, not a default: confirm a real cross-module consumer first.

版本历史

  1. v5.2.0 GitHub ↗
    原版更新说明

    First tagged release of the **5.x** line — capturing everything merged since `v3.0.0` (89 commits, 12 PRs). The through-line: repeated roster audits that grew the collection to 21 skills and then trimmed each one to the content that actually earns its place against a strong base model. ## Highlights ### New skills - **`pdf-annotations`** — platform PDF annotation & page-object editing (API 36.1 / SDK-extension-18 surface) (#29) - **`koin`**, **`kmp-boundaries`**, **`modularization`**, **`datastore`**, **`paging`** — added across the roster audits (#4, #6) - **`android-testing`** — renamed and reorganised from `android-tdd`, with the compose reference reorg (#10) ### Roster audits & quality passes - **Sonnet 4.6 baseline audit** — trimmed every skill to its earned core; fixed stale claims across the roster (#13) - **Roster audit v1 / v2** — new skills plus multi-source depth passes across references (#4 → 4.1.0, #6 → 5.0.0) - **JetBrains skills audit** — README link + AGP 9 additions across three skills (#7 → 4.2.0) - **Verified micro-lifts** — debug-log hygiene, perf baseline, pass-through red flag (#12) ### Integrations & maintenance - Integrated findings from **skydoves/android-testing-skills**, with a documented cherry-pick subset (#5, #9) - **Upstream drift watcher** for credited skill repos (#8) - Re-baselined the upstream-audit ledger (#11) - Lint hygiene: stale frontmatter/link fixes (#30) ### This release - Restructured **README** with a centered badge header; the version badge tracks the plugin manifest via a dynamic JSON badge, so it never drifts - Trimmed `pdf-annotations` provenance asides while keeping every API contract and the version gate --- ## What's Changed * Roster audit: 2 new skills, 4 contradiction fixes, depth pass across 8 references (4.1.0) by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/4 * JetBrains skills audit: README link + AGP 9 additions across 3 skills (4.2.0) by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/7 * Integrate findings from skydoves/android-testing-skills by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/5 * Add upstream drift watcher for credited skill repos by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/8 * Document skydoves cherry-pick subset and breadcrumb it to android-tdd by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/9 * Roster audit v2: 3 new skills + multi-source depth pass across 13 files (5.0.0) by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/6 * Rename android-tdd → android-testing + compose reference reorg by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/10 * chore: re-baseline upstream-audit-ledger (2026-06-01) by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/11 * Verified micro-lifts: debug-log hygiene, perf baseline, pass-through red flag by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/12 * Audit the android-skills roster against the Sonnet 4.6 baseline — trim to the earned core by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/13 * Add pdf-annotations skill: platform PDF annotation & page-object editing by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/29 * Fix stale skill frontmatter/link (lint hygiene) by @rcosteira79 in https://github.com/rcosteira79/android-skills/pull/30 **Full Changelog**: https://github.com/rcosteira79/android-skills/compare/v3.0.0...v5.2.0

  2. v3.0.0 GitHub ↗
    原版更新说明

    ## Highlights The 3.0.0 cycle adds a new networking skill for KMP, sharper guidance across existing skills via paired RIGHT/WRONG examples, and integration with Google's `android` CLI for runtime UI inspection and authoritative documentation lookup. ## New skill - **`kmp-ktor`** — Ktor client setup for Kotlin Multiplatform and Android: per-platform engine selection (OkHttp/Darwin/CIO), `kotlinx.serialization` with the `encodeDefaults` guard, bearer token auth with refresh via the `Auth` plugin and `markAsRefreshTokenRequest()`, `MockEngine` testing, and `DataError` mapping at the repository boundary. ## Skill improvements - RIGHT vs WRONG sections added to four skills: `kotlin-flows`, `android-retrofit`, `coil-compose`, `android-data-layer` - `compose` skill: Authoritative Docs section using `android docs search` - `android-debugging` skill: Runtime UI Inspection via `android layout` - `compose/references/performance.md`: `android layout --diff` as a CLI alternative to Android Studio's Layout Inspector ## Tooling and documentation - Google's `android` CLI documented as a recommended companion tool - `android-source-explorer-mcp` promoted from optional to recommended - README restructured: agent install steps first, companion tools last - Related Projects expanded with `compose-skill` (Meet-Miyani), `compose_skill` (hamen), and `android-reverse-engineering-skill` ## Inspiration credits The `kmp-ktor` skill draws on the Ktor reference structure from [Meet-Miyani/compose-skill](https://github.com/Meet-Miyani/compose-skill).

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 针对多模块 Android/Kotlin 项目中常见的可见性控制问题,提供实用解决方案
  • 适用于大型 Android 项目开发者,具有明确的工程价值
触发精准95/100

亮点

  • 触发描述清晰完整,覆盖多种典型症状和使用场景
  • 边界定义明确,能有效区分适用与不适用情况
结构规范90/100

亮点

  • 文档结构清晰,包含核心原则、具体规则和示例
  • frontmatter 完整,内容组织良好,易于理解执行
执行可靠90/100

亮点

  • 提供的是编码规范建议,不涉及复杂执行流程,可靠性高
  • 原则明确,易于在实际开发中应用
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。