agentleFS
wrsilvawrsilva/reis-mobile/skills/mobile-hardware/SKILL.md

mobile-hardware

Skill8 starsChanged 58 days agoMITView on GitHub

Integrates and reviews device hardware features across Flutter, Android, iOS, React Native and Kotlin Multiplatform, such as camera and microphone capture, Bluetooth and BLE, NFC, location and geofencing, motion sensors, barcode and QR scanning, and haptics. Covers capability checks, runtime permissions, lifecycle and background limits, battery cost and real-device testing. Biometric sign-in belongs to mobile-auth.

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
  1. Distinctive:

    Check three things separately: the hardware exists, it is turned on (Bluetooth enabled, location services on, NFC enabled) and the app has …

    line 30
  2. Distinctive:

    Ask for permission in context, when the user starts the feature, and handle denied, permanently denied or restricted, and reduced grants …

    line 31

≈ “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

Mobile Hardware

Hardware is optional, shared, revocable and slow. Trace each capability from its availability check to the release of the resource. Reuse the project brief, then inspect the library or platform API in use, the declared permissions and usage strings, the screens that acquire the resource and any background work before changing a flow.

Pick the reference

ProjectRead
Flutterreferences/flutter.md
Androidreferences/android.md
iOSreferences/ios.md
React Native / Exporeferences/react-native.md
Kotlin Multiplatformreferences/kotlin-multiplatform.md

Flutter and React Native apps also need the Android and iOS references for permissions, declarations and native behavior. Confirm plugin and library versions from the lock file.

Build the capability inventory

Record for each capability: the API or library, declared permissions and usage strings, the store-facing feature declaration, where it is acquired and released, whether it runs in the background, its battery cost and the fallback when it is missing or denied. On Android, declare optional hardware with <uses-feature android:required="false"> so the app stays installable without it. On iOS, list a device capability as required only when the app cannot work at all without it, because the App Store then hides the app from devices that lack it.

Availability, state and permission

  • Check three things separately: the hardware exists, it is turned on (Bluetooth enabled, location services on, NFC enabled) and the app has permission. Each has its own message and recovery path.
  • Ask for permission in context, when the user starts the feature, and handle denied, permanently denied or restricted, and reduced grants such as approximate location.
  • Background location is a separate, later request with its own justification, and both stores review it closely. Request foreground access first.
  • Denial or revocation disables only the feature that needs the hardware. Android ends the app's process when the user revokes a permission in Settings, so restore state on the next launch.
  • The data captured through hardware, such as photos, audio and location, follows mobile-privacy.

Lifecycle and concurrency

  • Acquire capture sessions, scans, sensor listeners and location updates when the feature becomes visible, and release them when it leaves the foreground. Another app or the system can take the camera or microphone; handle the interruption and resume.
  • Configuration changes, navigation and process death must not leak a session or leave a listener registered.
  • BLE is a connection state machine: scanning, connecting, discovering services, ready and disconnected, each with a timeout. Run one GATT operation at a time, reconnect with backoff and treat vendor and firmware differences as expected input.
  • Process frames and sensor samples off the main thread with backpressure: keep the latest frame and drop the rest instead of queueing.

Battery and background

Scans and location updates are the expensive part. Use the lowest accuracy and frequency that serve the feature and stop when it is done. Ongoing work in the background needs the platform's mechanism: a foreground service of the right type on Android, a declared background mode on iOS. See background execution for the budget.

Verify and deliver

Simulators and emulators do not reproduce most hardware: the iOS Simulator has no camera, Bluetooth or NFC. Unit-test the state machine against a fake hardware interface, then test on real devices for each OS version and vendor that matters. Cover denial, revocation while running, hardware turned off, interruption, background and foreground transitions, and a missing capability.

Return the capability inventory with path:symbol evidence, the permission and declaration changes, the implemented states, the device test matrix with results and any device or OS version not tested.

Official sources

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.