agentleFS
MKS-01MKS-01/appscreenmap/.claude/skills/stack-rules/SKILL.md

stack-rules

Skill2 starsChanged 16 days agoMITView on GitHub

Keep the app stack scan's rules current — the framework, language and UI fingerprints (packages/stack/.../detect.py), the storage map (storage.py), the LibChecker-Rules library-name snapshot (libchecker.json) and, once built, their iOS counterparts. Use when `appscreenmap stack` names the wrong framework or misses one, a new framework or major release changes its runtime files (React Native, Flutter, Expo, Compose Multiplatform, .NET MAUI, Unity…), a storage library is missing from "Where it keeps data", the snapshot is more than ~3 months old, or someone asks to add, tune or review a stack rule.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check kinds: lib (a native library file name), lib-prefix, path (an APK entry path prefix), dex (a class descriptor prefix in the dex …

    line 20
  2. Very specific:

    Prefer a runtime file (lib, path) over a class name: R8 renames library classes in release builds (it hid SQLDelight entirely in one app.

    line 45
  3. Very specific:

    Edit the rule: Keep the confidence honest (table above).

    line 49
  4. Very specific:

    Every ~3 months, or when a known library shows as unnamed.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Stack rules upkeep

appscreenmap stack (package packages/stack, plan docs/PLAN.md §8.6) reads an installed build and matches it against rules. The rules are data in code: each is a name, a category and a list of (kind, pattern, confidence) checks. The data contract is audits/stack.json in docs/MAP_SCHEMA.md.

FileHolds
packages/stack/src/appscreenmap/stack/detect.pyRULES: frameworks, runtimes, language, UI toolkit, KMP. CROSS_PLATFORM and summarize() turn signals into the one-line summary
packages/stack/src/appscreenmap/stack/storage.pySTORAGE: where each storage library writes under /data/data/<pkg>/ and whether it encrypts (True, False, None = optional)
packages/stack/src/appscreenmap/stack/libchecker.jsonSnapshot of LibChecker-Rules (Apache-2.0): native library and component names → library labels. Never edit by hand
packages/stack/tests/test_stack.pyOne parametrised case per framework, plus calibration tests
detect.py IOS_RULES, storage.py IOS_STORAGE, tests/test_ios.pyThe iOS rules and their cases (CASES); how they are read is in stack-ios

Check kinds: lib (a native library file name), lib-prefix, path (an APK entry path prefix), dex (a class descriptor prefix in the dex string table, e.g. Lcom/getcapacitor/). iOS: framework, bundle-path, bundle-file, symbol, dylib (see stack-ios); an iOS storage location may use {bundle} for the bundle id.

Confidence: what each level promises

LevelUse only whenExample
certainOnly that stack ships the file: its runtimelibflutter.so, libhermesvm.so, libunity.so
strongThe stack's build always leaves it, but another stack could carry itMETA-INF/androidx.compose.*.version, Lorg/jetbrains/compose/resources/, every storage rule
likelyA hint that is often, not always, trueKMP-oriented libraries on Android (Ktor client, SQLDelight)

Two rules never change: KMP on Android is never more than likely (it compiles to plain Kotlin; on iOS kfun: symbols make it certain), and a storage hit is strong at most (bundled is not used; the Frida probe confirms). A bundled library is not proof the app uses it.

Add or fix a rule

  1. Get evidence from a real build, locally. Real apps are tested outside the repo and never named in it (code, tests, docs, commit messages). Pull and list one:
    uv run appscreenmap-engine stack --package <pkg> --out <scratch>/runs     # keeps the APKs in <canvas>/build/apks/
    unzip -l <scratch>/runs/<proj>/<run>/build/apks/base.apk | grep -E "lib/|assets/|META-INF/.*version"
    python3 -I -c "import sys,re;b=open(sys.argv[1],'rb').read();print(sorted(set(re.findall(rb'L[a-z][\w/]{3,60}/', b)))[:200])" classes.dex
    Prefer a runtime file (lib, path) over a class name: R8 renames library classes in release builds (it hid SQLDelight entirely in one app; the framework SQLiteOpenHelper and the *.db names survived).
  2. Write the test first in test_stack.py: a synthetic APK (apk(), dex(), elf() helpers) with the new markers and the expected summary or storage row. Add a negative case when the change is a calibration (the marker must not fire).
  3. Edit the rule. Keep the confidence honest (table above). A new category or a new facts field is a schema change: update docs/MAP_SCHEMA.md (additive only), packages/stack/README.md, and the viewer's insights/stack.ts type. Viewer label text lives in insights/StackDetails.tsx (KIND_WORD).
  4. Storage rules also need locations (paths under the data folder, exact file names when the library fixes them, e.g. shared_prefs/FlutterSecureStorage.xml) and encrypted. The data-at-rest scan reads these paths, so a wrong path means a missed check. Cite the library's own docs or source for the file name in the commit message.
  5. Verify: uv run pytest -q packages/stack, then scan the Playground on the emulator (uv run appscreenmap-engine stack --package dev.appscreenmap.playground --out <scratch>/runs: still "Native Android: Kotlin, Jetpack Compose", min 26 / target 36 / compile 36) and the real app that prompted the change, locally.
  6. Record a calibration in the table below when a rule was wrong.

Refresh the LibChecker snapshot

make stack-rules-sync        # python3 -I scripts/sync-libchecker-rules.py: fetches the pinned commit, rewrites libchecker.json
git diff --stat packages/stack/src/appscreenmap/stack/libchecker.json
uv run pytest -q packages/stack

Every ~3 months, or when a known library shows as unnamed. The snapshot records commit and synced; the commit message says the old and new commit. Only exact-name rules come across (LibChecker's regex rules live in its app, not the repo).

When

TriggerCheck
React Native releasenative library names (libreactnative.so replaced libreactnativejni.so in 0.76; Hermes ships as libhermes.so or libhermesvm.so) and the bundle path
Flutter, Compose Multiplatform, Expo, MAUI, Unity major releasetheir runtime files and asset folders
A wrong or missing signal on a real appsteps above, then a calibration row
libchecker.json synced older than ~3 monthsrefresh

Calibrations

DateRuleWhat was wrongChange
2026-10-27kmp-librarieskotlinx.datetime fired on a React Native app (an Android SDK bundles it)removed from the KMP hints
2026-10-27sqlite (storage)R8 hid SQLDelight in a release build, so no storage was foundframework SQLiteOpenHelper rule, plus the *.db names the code opens

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.