android-permissions-derive

Derives, declares, and audits Android app permissions from user-visible features.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/nolte/claude-android-engineering --skill android-permissions-derive-nolte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-permissions-derive
Source: https://github.com/nolte/claude-android-engineering/tree/main/skills/android-permissions-derive
Command: npx skills add https://github.com/nolte/claude-android-engineering --skill android-permissions-derive-nolte

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Android apps often accumulate unjustified permissions copied from templates or injected by libraries, which breaks permission-free alternatives, triggers Play Store restrictions, and erodes user trust. This Skill derives the exact permission set an app genuinely needs, forward from user-visible features, and keeps the manifest, runtime flow, ledger, and tests consistent. ## Core Features & Use Cases - Forward derivation with an alternatives gate: Each permission must trace from a named user feature through a concrete API call, and is rejected when a documented permission-free path (photo picker, ACTION_IMAGE_CAPTURE, SAF) serves the feature. - Three operations: derive (decide and record a ledger row), audit (read-only severity-classified report of the existing manifest set), and apply (write declarations, runtime request flows, and degradation paths). - Merged-manifest verification and testing: Reads the merged manifest and built APK via apkanalyzer, removes library-injected permissions with tools:node="remove", and covers granted, denied, and permanently denied states through ADB-driven tests. - Use Case: A dependency bump silently adds ACCESS_FINE_LOCATION to your app. Run the audit operation to get a Critical finding naming the library, then derive and apply to remove it with a recorded ledger row. ## Quick Start Ask the assistant to derive which Android permissions your app needs for a specific feature, or to audit the current manifest permission set for unjustified entries.

Frequently Asked Questions about android-permissions-derive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide which Android permissions my app actually needs?

State each capability as a user-visible feature, then check the alternatives gate for a documented permission-free path such as the photo picker or ACTION_IMAGE_CAPTURE. Only permissions traced to a concrete API call are admitted, each with a justified ledger row.

How do I remove a permission injected by a third-party library?

Read the merged manifest to identify the library contribution, confirm no app feature depends on it, then add a uses-permission element with tools:node="remove" and tools:selector naming the library. Record the removal in the permissions ledger so dependency bumps get re-checked.

Why does ACTION_IMAGE_CAPTURE throw a SecurityException?

Declaring the CAMERA permission while relying on the ACTION_IMAGE_CAPTURE intent causes a SecurityException when the permission is not granted. The defensive declaration itself is the defect; omit CAMERA when the system camera app serves the feature.

How do I test denied and permanently denied permission states on Android?

Use ADB commands: pm revoke plus set-permission-flags with user-set and user-fixed to establish denied-once and permanently-denied states deterministically. GrantPermissionRule only grants and cannot revoke, so it cannot produce denial coverage.

When should I not use this permission derivation workflow?

Do not use it for the barcode scanning camera path, notification channel decisions, feature implementation across layers, or diagnosing build failures and crashes. Those belong to the barcode-scanner, notification-derive, feature-implement, and debugging skills respectively.