/qaren:setupfrom qaren
Installs the QaReN CLI, writes config, selects a simulator, and runs a first smoke check. For first-time setup or when qaren is not found.
Ships in qaren. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run these steps in order from the app's root directory. Each step names when to stop; when you stop, tell the user the one reason and the fix.
QaReN 2.0 needs an Apple silicon Mac with Xcode, Node 24 or newer, pnpm, and an Expo app that uses expo-dev-client. This setup prepares an iOS simulator; for Android (a booted emulator or one USB-connected phone), see the CLI README's Check a plan.
The plugin root is two directories above this skill's base directory. Resolve one absolute qaren path and use it for every later qaren command in this session. Read version from <plugin root>/.claude-plugin/plugin.json; QaReN home is $QAREN_HOME (~/.qaren when unset):
packages/qaren-plugin of a QaReN checkout (two directories up holds scripts/install-qaren-from-source.sh). If so, use the checkout build instead of the release installer: get <commit> with git -C <plugin root> rev-parse --short=12 HEAD, and resolve <QaReN home>/runtime/<version>-dev.<commit>/bin/qaren. If its --version prints exactly qaren <version>-dev.<commit>, use it and continue to doctor. Otherwise offer to run bash scripts/install-qaren-from-source.sh from that checkout; it needs Rust (https://rustup.rs) and prints the binary path to use. Stop until that matching build is installed; then continue to doctor.bash <plugin root>/scripts/ensure-qaren.sh --print-bin. If it prints an absolute path ending in /bin/qaren, use that plugin-verified binary and continue to doctor.bash <plugin root>/scripts/ensure-qaren.sh --install. Use its printed binary path and pass the user any stderr notice about PATH or an existing command. The CLI installation guide owns the verification, PATH-linking and fallback contract.command -v qaren resolves, through links, under <QaReN home>/runtime/ and prints qaren <version>-dev.<commit>, use that resolved path. Otherwise ask for a checkout of Lykhoyda/QaReN matching the plugin's version and offer to run bash scripts/install-qaren-from-source.sh there; use the path it prints.Run <qaren path> doctor before setup continues. Stop on a FAIL and give its fix.
Present ios-toolchain-match warnings before building.
DEVELOPER_DIR, TOOLCHAINS, EXPO_USE_PRECOMPILED_MODULES and
RCT_USE_PREBUILT_RNCORE are inherited. Native source/precompiled switches take
effect at pod installation; changing an export does not change existing Pods.
Follow the returned action and obtain approval before regenerating native files.
Present host-memory, host-devices, device-helpers, simulator-service and host-load warnings
with their next steps before the smoke run; use the conservative lane recommendation
in the host budget.
If memory or CPU is constrained, recommend fewer concurrent lanes and closing
unneeded apps. Ask the owner to shut down an affected borrowed device; restarting
CoreSimulatorService stops every simulator on the machine. Setup never performs
either action. A warning permits setup to continue; an unknown probe is not a healthy host.
package.json must list expo and expo-dev-client, and pnpm-lock.yaml must exist. Otherwise stop: "QaReN supports pnpm Expo dev-client apps."node_modules is absent, ask before running pnpm install.pnpm exec expo config --type public --json. Take appId from ios.bundleIdentifier and set devClientScheme to exp+<slug>, where <slug> is the config's slug; expo-dev-client registers that scheme unless its config plugin sets addGeneratedScheme: false, in which case ask. Expo may print status lines before the JSON document; parse that document.If .qaren/config.yaml exists, show it next to the detected values and change nothing without the user's consent; if its appId or devClientScheme differs from the detected values, stop until the user resolves it. Otherwise write exactly:
appId: <bundle identifier>
devClientScheme: exp+<slug>
Read the linked screenshot and video privacy policy and explain its limits. Ask which media policy applies to this checkout. Dev mode uses non-strict rules and is the default when video is absent. Choose video: strict when the app can show real private data. Write a declaration only after an explicit answer. With no answer, preserve the existing configuration. If the key is absent, say 'No video policy is declared. Dev-mode media rules apply. Set video: strict for strict media withholding.'
The keys and their validation are owned by the CLI's config.rs.
If the operator supplies custom registry credential environment names, optionally
add registryAuthEnv: [PRIVATE_REGISTRY_TOKEN] using names only, never values.
Keep the default configuration above minimal; obtain names from the operator
rather than reading auth stores to detect them. The list exposes inherited
variables to install/prebuild descendants and withholds their output; follow the
CLI registry-auth policy, including reserved names and the prewarm-fetch exclusion.
Read the simulator inventory; never boot, shut down or erase a simulator yourself:
xcrun simctl list devices booted -j
xcrun simctl list devices available -j and pass --boot-device --device <udid>; qaren boots it under its device lease.--device <udid>.Read the app's launch path in source (its root navigator and any auth gate) and pick one static text the user sees on the screen the app opens on; the ✓ check reads visible text, so never use a testID there. Never assume the signed-out screen: when a saved sign-in decides where the app opens, an earlier install's session on that simulator survives this run, so pick a text shown on launch both signed in and signed out, or ask the user which screen the app opens on now. Write .qaren/plans/smoke.md, quoted targets only:
## QA
### First screen
1. Wait for "<text>" to appear
✓ "<text>"
This plan needs no TYPESAFE_API_KEY.
The first run builds and installs the app; a cold iOS build needs about 10 GiB free on the home and app volumes (check refuses DISK_BUDGET_EXCEEDED with less) and can take longer than 10 minutes, and Claude Code stops both foreground and background commands at that limit. Start the check detached from the host, with sh staying resident as its parent: qaren cancels a run whose calling process exits, so never background qaren itself with & or nohup.
First create the output directory and note the path it prints as <dir>:
mktemp -d "${TMPDIR:-/tmp}/qaren-setup.XXXXXX"
Then start the check; this command returns at once:
nohup sh -c '<qaren path from step 1> check --plan-file .qaren/plans/smoke.md [device flags from step 4] --json > <dir>/receipt.json 2> <dir>/progress.log; echo $? > <dir>/exit' < /dev/null > /dev/null 2>&1 &
Within a minute <dir>/progress.log contains ▸ watch live: qaren watch <run-id>; tell the user they can follow the run live with qaren watch <run-id> in their own terminal. If <dir>/exit appears first, the check refused before its run started, so go to the receipt, or to <dir>/progress.log when the receipt is empty. Otherwise follow the run in short calls that each end well within the host's limit, repeating until <dir>/exit exists:
for i in $(seq 20); do [ -s <dir>/exit ] && break; sleep 5; done; tail -n 3 <dir>/progress.log
Stopping a poll never affects the run. If <dir>/exit never appears, <qaren path> status <run-id> --json reports the run's state and its next action.
Once <dir>/exit exists, read <dir>/receipt.json; if it is empty, report the exit code and the diagnostic from <dir>/progress.log and stop. Otherwise report the receipt's result, run_id and next_action. When result is not pass, quote failure.code and failure.next_action verbatim if present and stop. One managed native build runs per Mac at a time by default, so a check can wait for another run's build; private lock namespaces are independent, and qaren cleanup of a dead holder, run from that holder's home, affects only that holder's proven resources. When a pass receipt's next_action is a qaren cleanup command, teardown was incomplete: offer to run it. On pass, continue to step 7.
If the launch path read in step 5 has no auth gate, setup is complete; use using-qaren for a feature plan. Otherwise offer to save a reusable sign-in block. Start it on the sign-in screen; put any sign-out steps in their own block above it. Use visible labels when the app has no testIDs. Write a ### Sign in block using names only:
### Sign in
1. Fill "<username field>" with input USERNAME
2. Fill "<password field>" with input PASSWORD
3. Tap "<sign-in button>"
✓ "<signed-in text>"
For input echoes and optional echo declarations, follow the runtime-input hash protections. Ask the user to export QAREN_INPUT_USERNAME and QAREN_INPUT_PASSWORD from their password manager in their own shell; keep values out of plans, messages and tool output. Ensure the check inherits that shell's inputs. Use the same app configuration and device flags as step 6; for a label-only app, follow the README's runtime-input prerequisites.
Run this plan once using step 6's run-and-wait procedure. Read the receipt's hints and stderr: when LOGIN_BLOCK_CANDIDATE names a likely login block and prints loginBlock and loginMarker, ask the user to confirm that block signs in, then show those lines and paste them into .qaren/config.yaml only with the user's consent, as in step 3. When LOGIN_MARKER_MISMATCH appears, confirm with the user that the configured marker is visible only on the sign-in screen, or switch to the printed first selector. When LOGIN_BLOCK_NO_INPUTS appears, re-save the block as it says. When LOGIN_BLOCK_RUN_ONLY appears, the block exists only in that PR run's evidence: save it with qaren check in the main copy before configuring login. If LOGIN_BLOCK_SIGNS_OUT appears, split out the sign-out steps and re-save the sign-in block before configuring it. Follow CORPUS_NOT_SHARED when working in a linked worktree. If no block was saved, read blocks_not_saved and resolve its reason; do not invent a marker or login configuration.
Confirm <qaren path> doctor reports the saved login for the selected platform. Every later run needs the configured login block's QAREN_INPUT_<NAME> variables. The worked example covers setup, replay and worktrees. QaReN is now set up; use using-qaren for a feature plan.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
3 skills in this plugin
/feedbackUse when the user wants to report a QaReN bug or request a feature. Drafts a sanitized GitHub issue and files it only after the user confirms./using-qarenEntry point for QaReN: QA a React Native app on the simulator with the qaren CLI. Use when the user wants to test a feature, write a QA plan, check the working tree or QA a pull request.npx claudepluginhub lykhoyda/qaren --plugin qarenOther plugins' skills for the same job