К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

argent-settings-permissions — скилл для Claude Code

Управляет системными разрешениями на iOS Simulator и Android без интерфейса настроек. Пригодится при автотестах для выдачи, сброса или запрета прав до запуска приложения.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add software-mansion/argent --skill argent-settings-permissions -a claude-code
Открыть на GitHub

Что делает argent-settings-permissions

Скилл взаимодействует с хранилищем разрешений мобильной платформы напрямую. На симуляторе iOS он редактирует базу данных TCC, а на Android меняет флаги менеджера пакетов. Это исключает ручные переходы по экранам системы при подготовке тестов.

Вызов инструмента нужен только тогда, когда само приложение не может изменить состояние прав. Например, если доступ уже был отклонён пользователем, на iOS диалог больше не появится, поэтому его открывают через сброс или выдачу в settings-permissions. Если же в приложении есть свой переключатель или на экране уже висит системный запрос, эмулировать нужно нажатие на кнопку интерфейса, а не эту команду.

Инструмент не предназначен для параметров вроде Wi-Fi, VPN или тёмной темы: он работает только с одиннадцатью правами рантайма. При этом на симуляторе iOS разрешения для уведомлений не поддерживаются и вызовут ошибку, поэтому для них придётся обрабатывать стандартный системный диалог.

Какие задачи решает

  • выдать доступ к камере или контактам до запуска приложения
  • запретить разрешение заранее для проверки обработки отказа
  • сбросить права до исходного состояния для повторного появления системного диалога
  • повторно включить разрешение, ранее отклонённое пользователем

Примеры запросов агенту

  • Сбрось разрешения камеры и фото для приложения на симуляторе iOS
  • Выдай доступ к микрофону и контактам перед запуском теста на Android
  • Запрети доступ к геолокации, чтобы проверить экран с сообщением об ошибке

Как установить argent-settings-permissions

1Через Skills CLI (Vercel)

npx skills add software-mansion/argent --skill argent-settings-permissions -a claude-code

2Вручную: положить файлы

~/.claude/skills/argent-settings-permissions/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/argent-settings-permissions/

Из того же набора15

Весь набор →
argent-android-emulator-setup software-mansion Скилл подключает Android-эмулятор через инструменты argent MCP. Нужен перед работой с интерфейсом Android или запуском эмулятора. Claude Code CX Codex Cursor +1 26 500установок argent-react-native-optimization software-mansion Скилл выявляет узкие места в React Native через замеры и очищает код от механических проблем. Запускается при лагах интерфейса, долгом старте или частых лишних рендерах. Claude Code CX Codex Cursor +1 26 400установок argent-react-native-profiler software-mansion Профилирует React Native-приложение на Hermes: показывает ререндеры, загрузку CPU и горячие места. Нужен для проверки оптимизаций. Claude Code CX Codex Cursor +1 26 300установок argent-react-native-app-workflow software-mansion Задаёт пошаговый процесс сборки, запуска и отладки React Native в симуляторе iOS или эмуляторе Android. Помогает поднять Metro и разобрать сбои билда. Claude Code CX Codex Cursor +1 26 300установок argent-ios-simulator-setup software-mansion Скилл для подключения к iOS-симулятору через MCP-инструменты argent. Используй перед любой работой с симулятором: загрузка устройства, получение UDID, взаимодействие с интерфейсом. Claude Code CX Codex Cursor +1 26 300установок argent-native-profiler software-mansion Профилирует нативную производительность на iOS и Android, помогает находить нагрузку на CPU и зависания интерфейса. Утечки памяти анализирует на iOS. Claude Code CX Codex Cursor +1 26 200установок argent-metro-debugger software-mansion Скилл подключает отладчик к JS-рантайму через CDP: инспектируете React-компоненты, читаете логи консоли, вычисляете код прямо в процессе. Работает с React Native (iOS, Android, Vega) и Chromium-приложениями (Electron, браузеры). Claude Code CX Codex Cursor +1 26 200установок argent-test-ui-flow software-mansion Скилл для автономного тестирования интерфейсов iOS и Android в Claude Code. Прогоняет цикл из кликов, скриншотов и проверок через MCP-инструменты argent. Claude Code CX Codex Cursor +1 26 200установок

Похожие

react-native-testing callstack Скилл для написания и проверки тестов компонентов React Native с помощью Testing Library. Покрывает запросы, взаимодействия, асинхронные паттерны и работает с версиями v13 (React 18) и v14 (React 19+). Claude Code CX Codex Cursor +1 5 300установок expo-project-structure expo Скилл задаёт эталонную структуру папок для нового проекта на Expo Router. Помогает разложить экраны, серверные маршруты и компоненты без мусора в корне. Claude Code CX Codex Cursor +1 21 700установок expo-skill-eval expo Оценивает скиллы Expo от срабатывания триггеров до сборки и скриншотов на эмуляторах iOS и Android в Expo Go. Пригодится авторам скиллов при тестировании генерации кода. Claude Code CX Codex Cursor +1 21 600установок expo-dom expo Запускает веб-код в webview на нативных платформах и рендерит как есть на вебе. Позволяет использовать веб-библиотеки вроде recharts или react-syntax-highlighter в Expo без переписывания. Claude Code CX Codex Cursor +1 20 800установок eas-simulator expo Запускает удалённые симуляторы iOS и Android в облаке EAS и передаёт управление агенту. Нужен для тестирования мобильных приложений на Linux, в CI или облачных песочницах. Claude Code CX Codex Cursor +1 20 500установок antislop-layoutmobile miqdadbadjuber Скилл проверяет мобильную и адаптивную вёрстку: перенос колонок, брейкпоинты, размеры и переполнение. Нужен при работе с интерфейсами. Claude Code CX Codex Cursor +1 5 700установок vercel-react-native-skills vercel Набор правил по React Native и Expo для ИИ-агента: списки, анимации, навигация. Пригодится, когда агент правит мобильный код и надо, чтобы он делал это одинаково. Claude Code CX Codex Cursor +1 253 900установок animate-expo emilkowalski Создаёт мобильные анимации для React Native и Expo на базе Reanimated и Gesture Handler. Помогает избежать просадок кадров на реальных устройствах. Claude Code CX Codex Cursor +1 135 900установок

Вопросы о argent-settings-permissions

Как установить argent-settings-permissions в Claude Code?

Выполните команду npx skills add software-mansion/argent --skill argent-settings-permissions -a claude-code.

Что делает argent-settings-permissions?

Скилл напрямую правит базу TCC на симуляторе iOS или флаги Android, выдавая, запрещая или сбрасывая права приложения. Это позволяет подготовить состояние окружения без навигации по системным меню.

Поддерживает ли скилл настройку уведомлений на симуляторе iOS?

Нет, для разрешений уведомлений на iOS симуляторе эквивалента в TCC нет, поэтому скилл вернёт ошибку. Для проверки уведомлений на iOS нужно обрабатывать диалоговое окно в интерфейсе приложения.

Исходный текст

SKILL.md · Apache-2.0
---
name: argent-settings-permissions
description: Grant, deny, or reset an app's runtime permissions (camera, microphone, photos, contacts, notifications, calendar, location, location-always, media-library, motion, reminders) on an iOS simulator or Android device using the argent `settings-permissions` tool - without navigating the system Settings UI. Use when the permission cannot be changed through the app itself - and only then, pre-authorize before the app asks, deny up front, re-enable a permission the user already denied, or reset so the prompt reappears. If the app can flip it - via an in-app toggle or the system permission dialog the app triggers - interact with the app instead.
---

## What this tool is for

`settings-permissions` edits the platform's permission store directly - the iOS simulator's TCC database, or Android's package-manager permission flags. It replaces the manual **Settings → Privacy** dance during test setup: pre-authorize a service so the app never has to ask, deny it up front to test the refusal path, or reset it so the first-run dialog appears again on the next launch.

It is a **test-setup / out-of-band** tool, not a general permissions toggle. The default way to change a permission is still through the app - this tool is the exception for the cases the app can't reach.

## When to use it - and when NOT to

Decide with this order. The first matching row wins.

| Situation                                                                                                        | Do this                                                                                       | Why                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The app has an **in-app control** for the permission (a toggle in its own settings screen)                       | **Tap it in the app** (`describe` → `gesture-tap`) - do NOT use this tool                     | It's real user behavior and exercises the flow you're testing. See `argent-device-interact`.                                                                            |
| The app is **about to ask** (or just asked) and the system **permission dialog is on screen**                    | **Tap the dialog** (`Allow` / `Don't Allow` / `Allow While Using App`) - do NOT use this tool | The app-triggered prompt is the natural path; answering it is what a user does. `describe` exposes the dialog buttons; fall back to `screenshot` only if it doesn't.    |
| You need the permission **already granted/denied before the app runs**, so no dialog interrupts the flow         | **Use this tool** (`grant` / `deny`) before `launch-app`                                      | The app can't pre-set its own permission; a real user would do it in Settings. This is the core use case. (`deny` suppresses the prompt on **iOS only** - see Gotchas.) |
| The user **already denied** it and you need it **on** again                                                      | **Use this tool** (`grant`)                                                                   | iOS never re-shows a dialog once denied - the only in-device path is the Settings app. This tool is the shortcut.                                                       |
| You need the **first-run dialog to appear again** (test the prompt itself, or reset dirty state)                 | **Use this tool** (`reset`)                                                                   | Returns the permission to "not yet asked" so the app prompts on next use.                                                                                               |
| The permission is **not one this tool supports** on the target platform (see the support table)                  | **Do NOT use this tool**                                                                      | It will return an "unsupported" error. Use the app dialog if the app triggers one, or navigate the real Settings app.                                                   |
| The setting isn't one of the **11 runtime permissions** below (e.g. Wi-Fi, cellular data, dark mode, VPN, Focus) | **Do NOT use this tool**                                                                      | Out of scope - drive the Settings app or the app's own UI instead.                                                                                                      |

**Rule of thumb:** if a human tester could flip it _inside the app_, do that. Reach for `settings-permissions` only for a change a human would otherwise make in the **system Settings app**.

## Supported permissions & platform coverage

| `permission`      | iOS simulator (TCC service)                                                                                                                            | Android (`android.permission.*`)                                                                          |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- |
| `camera`          | `camera` - only if the target simulator's **runtime** models it (varies by simruntime, not by the installed Xcode; simulators have no camera hardware) | `CAMERA`                                                                                                  |
| `microphone`      | `microphone`                                                                                                                                           | `RECORD_AUDIO`                                                                                            |
| `photos`          | `photos` + `photos-add` (add-only access is a separate TCC service; `photos-add` is best-effort - check `applied` to see whether both changed)         | `READ_MEDIA_IMAGES` + `READ_MEDIA_VIDEO` + `READ_MEDIA_VISUAL_USER_SELECTED` + `READ_EXTERNAL_STORAGE`    |
| `contacts`        | `contacts`                                                                                                                                             | `READ_CONTACTS` + `WRITE_CONTACTS`                                                                        |
| `notifications`   | **unsupported** - no iOS equivalent; answer the app's dialog instead                                                                                   | `POST_NOTIFICATIONS`                                                                                      |
| `calendar`        | `calendar`                                                                                                                                             | `READ_CALENDAR` + `WRITE_CALENDAR`                                                                        |
| `location`        | `location`                                                                                                                                             | `ACCESS_FINE_LOCATION` + `ACCESS_COARSE_LOCATION`                                                         |
| `location-always` | `location-always`                                                                                                                                      | `ACCESS_BACKGROUND_LOCATION` (a **grant** also adds fine + coarse - background alone can't read location) |
| `media-library`   | `media-library`                                                                                                                                        | `READ_MEDIA_AUDIO` + `READ_EXTERNAL_STORAGE`                                                              |
| `motion`          | `motion`                                                                                                                                               | `ACTIVITY_RECOGNITION`                                                                                    |
| `reminders`       | `reminders`                                                                                                                                            | **unsupported** - no Android runtime permission                                                           |

One abstract permission can map to several concrete Android permissions; which ones actually exist depends on the app's manifest and the device's API level (e.g. `READ_MEDIA_*` on API 33+ vs `READ_EXTERNAL_STORAGE` below it).

## Actions

- **`grant`** - pre-authorize the permission. Requires `bundleId`.
- **`deny`** - refuse it. Requires `bundleId`. Use to test the app's "permission denied" path.
- **`reset`** - return to the not-yet-asked state so the dialog reappears on next use. Always per-app (`bundleId` required):
  - iOS: removes that app's TCC row. A device-wide reset (no bundleId) is **not** offered - on recent iOS runtimes it reports success but leaves existing per-app grants untouched, so it would report a change that never happened.
  - Android: revokes the grant, then best-effort clears the user-set/user-fixed flags (flag-clearing first appears in Android 13 / API 33; the revoke is what counts toward success). Below API 33 (i.e. API 23-32, everywhere a user-fixed state can exist) flag-clearing is unavailable, so a `reset` there revokes the grant but cannot clear a "don't ask again" (user-fixed) state - the dialog may stay suppressed on those older devices.

## Parameters

```json
{
  "udid": "<UDID-or-serial>",
  "action": "grant",
  "permission": "camera",
  "bundleId": "com.example.app"
}
```

- `udid` - target from `list-devices` (iOS simulator UDID, or Android serial). See `argent-ios-simulator-setup` / `argent-android-emulator-setup` to get one.
- `action` - `grant` | `deny` | `reset`.
- `permission` - one of the 11 names above.
- `bundleId` - iOS bundle id or Android package name. **Required for every action**.

## Platform behavior

**iOS simulator only.** Edits the simulator's TCC store - always per-app (`bundleId` required). There is no host-side TCC switch on a physical iPhone, so this tool does not apply to real iOS devices. The simulator must be **booted** first (`boot-device`) - otherwise the tool fails with a "current state: Shutdown" error and surfaces the boot hint.

**Android emulator and physical device.** Changes the app's `android.permission.*` runtime permissions over adb (and, for `reset`, best-effort clears the user-set/user-fixed flags - the revoke is what decides success; flag-clearing needs Android 13 / API 33+). Requirements:

- The app must be **installed** - the tool probes for the package first and errors clearly if it is missing (a transport/timeout failure surfaces adb's real cause, not a false "not installed").
- The app must **declare** the permission in its manifest. The package manager rejects any mapped permission the manifest doesn't request; those come back in the result's `skipped` list. The action succeeds if **at least one** mapped permission sticks, and errors only if **all** of them were rejected.

## Gotchas

- **Changing a permission can terminate a running app** (system behavior on both platforms). Prefer setting permissions **before** `launch-app`; if you change one while the app is running, `restart-app` afterward.
- **Reset is per-app on both platforms** - pass `bundleId`; there is no reliable device-wide reset.
- **A partial Android result is normal.** `applied` lists what actually changed; `skipped` lists mapped permissions the package manager rejected (usually not in the manifest, or gated by API level). Both together tell you what happened.
- **A pre-launch `deny` suppresses the prompt on iOS only.** On iOS a TCC denial answers the app's request, so no dialog appears. On Android a `deny` clears the grant but sets no "user-fixed" flag, so the app's next request still shows the system dialog - a pre-launch `deny` there tests the revoked _state_, not a suppressed prompt.
- **`camera` on iOS** may be rejected by a simulator **runtime** that doesn't model the service (it varies by simruntime, not by the installed Xcode - a runtime can accept `camera` even when the platform's own service list omits it). A rejection surfaces as a generic CoreSimulator error, so a `camera` failure (unless it's the shutdown-simulator case, which gets the boot hint instead) is reported with a hint about the runtime's supported services.
- **`grant location` needs the app installed first (iOS).** Location authorization isn't stored in TCC and isn't applied to a bundle id until the app exists, so a pre-install `grant location` / `grant location-always` records nothing. On a **local** simulator the tool checks install state and errors clearly instead of reporting a false success; on a **remote** simulator it cannot probe install state, so a pre-install grant there reports success while recording nothing - make sure the app is installed before granting location remotely. (TCC-backed services like `camera`/`photos` _can_ be granted before install; they persist and apply on install.)

## Result

Returns `{ action, permission, bundleId, applied, skipped? }`:

- `applied` - the platform-level services/permissions actually changed (the TCC service(s) on iOS; the `android.permission.*` names on Android).
- `skipped` - Android only, present when some mapped permissions were rejected but others succeeded.

The call **fails** when nothing could be applied - read the error; it names the reason: an unsupported permission for the platform (`notifications` on iOS, `reminders` on Android), the app not installed (including a pre-install `grant location` on iOS), a shutdown simulator (iOS), or every mapped permission being rejected (usually a missing manifest entry). A non-shutdown `camera` failure additionally hints about the simulator runtime's supported services (a shutdown-simulator failure gets the boot hint instead).

## Examples

Pre-grant the camera before launching, so the app never prompts:

```json
{ "udid": "<UDID>", "action": "grant", "permission": "camera", "bundleId": "com.example.app" }
```

Test the denied path - refuse location, then launch and observe the fallback:

```json
{ "udid": "<serial>", "action": "deny", "permission": "location", "bundleId": "com.example.app" }
```

Reset notifications on Android so the first-run prompt appears again next launch:

```json
{
  "udid": "<serial>",
  "action": "reset",
  "permission": "notifications",
  "bundleId": "com.example.app"
}
```

Grant always-on location on Android (fans out to background + foreground automatically):

```json
{
  "udid": "<serial>",
  "action": "grant",
  "permission": "location-always",
  "bundleId": "com.example.app"
}
```

© software-mansion · Apache-2.0 · software-mansion/argent

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой