.agents/skills/android-readme-screenshot-studio/SKILL.md
Create repository screenshots from the real Bitchat Android UI, not from a drawn mockup. The result should look intentional enough for the top of the README while remaining reproducible, synthetic, and honest about what a static emulator capture proves.
Extract as much as possible from the conversation before asking questions. Confirm or infer:
origin/main.Do not invent the subject of a requested photo. Nicknames, channel names, or previous fixture copy are not sufficient justification for choosing an outdoor, urban, political, or personal scene. Reuse an existing rights-safe asset when the subject should remain stable, or ask for the intended subject. If the user explicitly approves synthetic imagery, disclose it and keep its source capture-only unless they request a committed asset.
Read references/showcase-recipes.md for every run. It contains the concrete mesh-chat and globe recipes, framing guidance, the verified current-pair fast path, and the final acceptance checklist. When the request matches the existing README pair and the production UI has not materially changed, try that fast path first and then validate every visible result. Fall back to tracing the current implementation when an entry point, state model, or composition has changed.
When a populated screen requires a debug fixture, also read ../android-ui-visual-review/references/fixture-recipes.md.
Protect the user's active checkout:
git status without modifying it.origin/main.codex/ branch in a temporary worktree rooted at the current
origin/main.Do not switch the user's original checkout, reuse a dirty branch, or mix an unrelated PR into the screenshot change. If the request continues an existing screenshot PR, reuse its already-isolated worktree only after verifying its head and base.
Before building, write a compact local matrix containing:
Use the current production UI and latest main interaction model. Trace the
screen entry point and state source before adding a fixture. A beautiful capture
of a stale or fake UI is not acceptable.
Prefer the newest stable Android runtime installed locally and a large, high-density portrait emulator profile. Reuse a previously validated capture profile when it remains available, but verify the guest properties and keep the resulting profile facts in the local capture contract rather than the repository or GitHub text.
After boot, record the guest values with an explicit emulator selector:
adb -s "$ANDROID_README_SERIAL" shell getprop ro.build.version.release
adb -s "$ANDROID_README_SERIAL" shell getprop ro.build.version.sdk
adb -s "$ANDROID_README_SERIAL" shell getprop ro.build.version.security_patch
adb -s "$ANDROID_README_SERIAL" shell wm size
adb -s "$ANDROID_README_SERIAL" shell wm density
Never publish emulator selectors, AVD names, local paths, usernames, IP addresses, or other machine identifiers.
Launch the Activity before injecting process-local state. Prefer existing debug hooks. If they cannot express the composition, add the smallest temporary command under:
app/src/debug/java/com/bitchat/android/testhook/
The fixture should:
For voice notes, route real audio files through the app's waveform extractor. Use short, distinct, locally synthesized speech clips or other rights-safe speech audio. Never draw a decorative waveform and call it speech. Wait for asynchronous decoding before capture, then inspect that pauses and syllable envelopes look plausibly different between notes.
For image attachments, use a rights-safe existing asset or an explicitly approved synthetic source. Keep fixture media outside production source sets and remove every capture-only hook before committing. Compose image rows may remember a decoded bitmap by file path. After replacing the bytes at an unchanged path, relaunch the app or use a new destination path before judging the revised crop.
Build and install the ABI-matching debug APK, satisfy onboarding and permissions, inject the fixture, and navigate to the intended surface.
Capture directly:
adb -s "$ANDROID_README_SERIAL" exec-out screencap -p > "$ARTIFACT_PATH"
Inspect the full screenshot immediately. Check message count and order, nickname ownership, peer count, waveform variety, image visibility, globe center, grid precision, clipping, and composer placement.
Inject a complete timeline in one operation and allow at least two seconds of quiet UI time after the fixture reports success. This avoids capturing entry animations, incomplete placement, or media that has not finished decoding.
Crop only Android system chrome. Preserve Bitchat's app header, translucent overlap, content, and composer. Derive the crop from the observed status and navigation insets; do not blindly reuse pixel offsets from a different profile. Because the app renders edge-to-edge, app controls may extend into the reported navigation inset. Place the bottom crop after the final control outline and shadow but before the system gesture affordance; removing the entire inset can clip the app itself. Keep every final README screenshot in a matched portrait size.
Use image inspection after the crop. File dimensions and a successful ADB command do not prove that the desired composition is visible.
Discover the current README references before writing. Prefer stable paths under
docs/screenshots/ and replace only the assets the user requested.
When adding a showcase section:
Run the bundled validator for every final asset:
python3 \
.agents/skills/android-readme-screenshot-studio/scripts/validate_readme_screenshots.py \
--repo-root . \
--readme README.md \
--require-same-size \
--asset docs/screenshots/readme-mesh-chat.png \
--asset docs/screenshots/readme-geohash-globe.png
When replacing only one image in an existing pair, pass both the changed and
unchanged assets with --require-same-size, and verify the unchanged asset's
checksum. Pass only one asset and omit --require-same-size only when the
README has no paired screenshot to preserve.
Before committing:
git diff -- app/src/debug is empty.git status --short lists only the intended README and screenshot
files.git diff --check../gradlew assembleDebug after fixture removal.The final commit must not contain synthetic peer data, generated photo sources, audio clips, ADB outputs, emulator configuration, or local capture reports unless the user separately requested those artifacts in the repository.
Use the capture manifest and report format from
../android-ui-visual-review/ when before/after evidence is useful. For a
README-only change with no production UI delta, identical before/after images
are acceptable when explicitly labeled “no production UI delta.”
State limitations plainly:
GitHub writes require user authorization. When authorized:
codex/ branch.gh pr create or update the existing PR.gh pr view and gh pr checks.gh.main commit.When GitHub publication is not authorized, leave the finished commit or local change in the isolated worktree and hand back its branch and artifact paths. Do not silently push it.
Do not place local paths, device selectors, generated-image paths, or personal machine details in commits, PR text, comments, or merge messages.
Lead with the outcome and include: