agentsclimarketplace

Android

Skill tienenwu/fables/en/android

Self-evolving skill packs that give Claude Code & Codex judgment, not knowledge — decidable rules, per-playbook regression quizzes for models, and a project harness generator. zh-TW canon + full EN mirror.

Install
npx -y skills add tienenwu/fables --skill android

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when writing, refactoring, or debugging Android app code (Kotlin, Jetpack Compose, Gradle, ProGuard/R8) — before adding a feature, touching build config or proguard-rules, preparing a release/AAB, or when facing release-only crashes, ClassNotFoundException after minify, lifecycle leaks, ANR, or excessive recomposition.

SKILL.md

4.7 KB, as published. Nobody here has run it

🌐 繁體中文(canonical) · English mirror

Android Development Judgment Handbook

Core Principles

  1. A green light on a debug build does not count: R8, obfuscation, signing, and backend environment flags only take effect in release — changes on the release path must be verified with release-grade builds.
  2. State flows down, events flow up: the UI layer makes no business decisions; a Composable holds no mutable business state.
  3. The lifecycle is the default enemy: for any long-lived object holding a Context/View, first assume it will leak, then prove it won't.
  4. Reflection is R8's blind spot: for every class constructed via reflection (Gson/Moshi/Retrofit models), change the keep rules in lockstep when the class changes — otherwise it's a release-only bomb.
  5. No IO on the main thread, no GlobalScope for coroutines — there is no exceptional case worth discussing.

Kickoff Routing

SituationPathRead first
New screen/featureDefine the state owner and data flow first, then write the UIreferences/architecture-state.md
UI jank, excessive recompositionDon't touch the UI first — inspect the state designreferences/compose-ui.md
Async, Flow, lifecycle issuesCheck collect location and scope choicereferences/coroutines-lifecycle.md
Add/change API model (Gson/Moshi/Retrofit)Change implementation + keep rules togetherreferences/release-checklist.md §R8
Ship release / change build configRun every item on the mandatory checklistreferences/release-checklist.md
Crashes only in release, fine in debugAssume minify/obfuscation/environment flags first, don't guessreferences/release-checklist.md

Red Lines (Absolutely Forbidden)

  • Never declare release-related changes done after verifying only with a debug build — minify, keep rules, and BuildConfig flags all have zero effect in debug.
  • Never GlobalScope.launch — the lifecycle is uncontrolled; it keeps running after the screen is destroyed, causing both leaks and crashes.
  • Never make network/DB calls in the body of a Composable function — it fires again on every recomposition; use LaunchedEffect or push it down into the ViewModel.
  • Never let a ViewModel hold a reference to an Activity/Fragment/View — rotating the screen leaks it immediately; if you need a Context, use the Application-level one.
  • Never catch and only log without notifying the caller — the user sees a spinner that never stops; errors must become UI state.
  • Never change test assertions to turn CI green — two red runs in a row is a wrong-direction signal; back up to the previous decision point.

Failure Signals (Back Up, Don't Retry)

SymptomUsually meansBack up to
Fix recomposition in one place, another place janksState placed at the wrong layer, granularity too coarseRethink the state-owner design
Piling on more remember / derivedStateOf just to stop flickerUpstream is passing an unstable object as stateCheck the stability of the incoming parameters
Fix one keep rule for a release crash and the next one popsPatching class by class; keep the whole model directory insteadR8 rule layer
More and more null checks inside lifecycle callbacksHolding a reference you shouldn'tOwnership design
Same ANR persists after three different rewritesHidden synchronous IO on the main threadFind the real blocking point before touching anything

references Index

  • references/architecture-state.md — layering criteria, which layer state belongs in, UDF positive/negative examples. Read before touching architecture or adding a feature.
  • references/compose-ui.md — when to extract a Composable, stability and recomposition, side-effect API choice. Read before writing UI.
  • references/coroutines-lifecycle.md — scope/Dispatcher choice, Flow collect location, typical leaks. Read whenever you touch async.
  • references/release-checklist.md — R8/keep, build variant, signing, permissions, item-by-item sign-off before publishing. Mandatory before shipping a release.
  • references/test-scenarios.md — the judgment test set, to verify whether the model taking over actually follows the playbook. Do not give it to a model that is executing.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.