platform-resolution-check
Skill2 starsChanged 4 months agoMITView on GitHub
Use when a bug appears on one platform only, when a React Native background handler or native module never runs, or when a .web/.ios/.android file seems to be ignored. Checks the quiet machinery that picks one file over another.
In this repository3 other files it gives its agents.
- cron-aware-watchdogSkill
- release-artifact-checkSkill
- verify-before-doneSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Does the registration actually run?: Add a log line at the point of registration, not at the point of use.
- Distinctive: line 57
Verify these on a real device, with the app closed, across a full cycle.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
When it breaks on one platform only, suspect resolution
Bundlers pick files by extension. Metro turns ./index into
index.android.js, index.ios.js or index.js depending on the platform.
Webpack and Expo's web build do the same with .web.tsx.
This machinery is silent. It either engages or it does not, and both look identical: no warning, no error. The application starts, and one file simply never loads.
The check, in order
Is the entry point extensionless?
{ "main": "index" }With
"main": "index.js"there is nothing left to resolve. Android loadsindex.jsand never seesindex.android.js. Anything registered there, typically background task handlers and widget handlers, never registers.- Does the registration actually run? Add a log line at the point of registration, not at the point of use. A handler that is never registered produces no error; the system just never calls it.
- Is the platform file where the resolver looks? A
.web.tsxstub next to a native-only module has to sit beside the import path, not beside the package. - Did a prebuild step overwrite it? Generating native projects rewrites
directories. Anything not managed by a config plugin, hand-written native
modules among them, can be wiped. Check
git statusafter every prebuild.
Symptom to suspect
| Symptom | Look at |
| Background task fires, nothing happens | Entry point resolution, handler registration |
| Feature works in the app, stale outside it | A second refresh path masking the broken one |
| Web build crashes on a native-only import | Missing .web.tsx stub |
| Native module vanished after a build | Prebuild overwrote an unmanaged directory |
| Works in emulator, not on device | Anything that needs a full background cycle |
Why the emulator hides it
Developing in an emulator means opening the app constantly. Many systems refresh their surfaces when the app opens, through a path that does not need the background handler. So the broken path is masked by the working one at every check, and the bug only appears when the app is left alone.
Verify these on a real device, with the app closed, across a full cycle.
Why this exists
A prayer-time widget showed stale data for weeks. Typecheck green, tests green,
not reproducible in the emulator. The cause was "main": "index.js" instead of
"main": "index": Android loaded the iOS entry point, the widget task handler
never registered, and the background update found no handler to call. The fix
was one word.
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
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.

