Skip to content

datit309/supergraph / plugins/supergraph/skills/mobile-agent

mobile-agent

Verified

Test mobile apps using connected iOS WebDriverAgent or Android UiAutomator2 backends. Verify MCP availability, device selection and driver readiness before actions; collect snapshots and evidence without claiming unexecuted tests passed.

FileKindSize
SKILL.mdskill md8.0 KB
scripts/init-mobile-qa.shexecutablescript3.6 KB
templates/mobile-bug-report-template.mdmarkdown1.1 KB
templates/test-matrix-mobile-template.mdmarkdown2.5 KB

scripts/init-mobile-qa.sh

View on GitHub
#!/usr/bin/env bash
set -euo pipefail

# Helper to scaffold Mobile QA matrices, bug reports, and inspect iOS/Android device readiness
CMD="${1:-help}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
QA_DIR="docs/qa"

mkdir -p "$QA_DIR" "$QA_DIR/evidence" "screenshots"

case "$CMD" in
  matrix)
    FEATURE="${2:-core}"
    APP_ID="${3:-com.example.app}"
    PLATFORM="${4:-Cross-Platform}"
    OUT_FILE="$QA_DIR/mobile-matrix-$FEATURE.md"
    TPL="$SKILL_DIR/templates/test-matrix-mobile-template.md"

    if [[ -f "$OUT_FILE" ]]; then
      echo "Matrix already exists at $OUT_FILE"
    else
      sed -e "s/\[Feature Name\]/$FEATURE/g" \
          -e "s/\[com.example.bundleid \/ package\]/$APP_ID/g" \
          -e "s/\[iOS | Android | Cross-Platform\]/$PLATFORM/g" \
          -e "s/\[YYYY-MM-DD\]/$(date +%Y-%m-%d)/g" \
          "$TPL" > "$OUT_FILE"
      echo "βœ… Created mobile test matrix: $OUT_FILE"
    fi
    ;;

  bug)
    FEATURE="${2:-general}"
    DEFECT_ID="${3:-MOB-BUG-001}"
    TITLE="${4:-Mobile UI defect}"
    PLATFORM="${5:-Mobile}"
    OUT_FILE="$QA_DIR/mobile-bug-$DEFECT_ID.md"
    TPL="$SKILL_DIR/templates/mobile-bug-report-template.md"

    sed -e "s/\[DEFECT-ID\]/$DEFECT_ID/g" \
        -e "s/\[Brief bug description\]/$TITLE/g" \
        -e "s/\[iOS | Android\]/$PLATFORM/g" \
        -e "s/\[YYYY-MM-DD HH:mm:ss\]/$(date '+%Y-%m-%d %H:%M:%S')/g" \
        "$TPL" > "$OUT_FILE"
    echo "βœ… Created mobile defect report: $OUT_FILE"
    ;;

  doctor)
    echo "πŸ” Checking Unified Mobile QA Environment (iOS & Android)..."
    STATUS=0

    echo ""
    echo "--- 🍏 iOS (WebDriverAgent) ---"
    # 1. Check curl connection to WDA
    if curl -s --connect-timeout 2 "http://127.0.0.1:8100/status" > /dev/null; then
      echo "  βœ” WDA Server is running on http://127.0.0.1:8100"
    else
      echo "  β„Ή WDA Server not reachable on :8100 (Start WDA or run 'iproxy 8100 8100')"
    fi

    if command -v idevice_id &> /dev/null; then
      DEVICES=$(idevice_id -l 2>/dev/null || true)
      if [[ -n "$DEVICES" ]]; then
        echo "  βœ” Connected physical iOS device(s):"
        echo "$DEVICES" | sed 's/^/    - /'
      else
        echo "  β„Ή No physical iOS devices currently connected via USB."
      fi
    fi

    if command -v xcrun &> /dev/null; then
      BOOTED_SIMS=$(xcrun simctl list devices booted -j 2>/dev/null || true)
      if echo "$BOOTED_SIMS" | grep -q "Booted"; then
        echo "  βœ” Found booted iOS Simulator(s)."
      fi
    fi

    echo ""
    echo "--- πŸ€– Android (UiAutomator2) ---"
    # 2. Check curl connection to UiAutomator2 Server
    if curl -s --connect-timeout 2 "http://127.0.0.1:6790/status" > /dev/null; then
      echo "  βœ” UiAutomator2 Server is running on http://127.0.0.1:6790"
    else
      echo "  β„Ή UiAutomator2 Server not reachable on :6790 ('adb forward tcp:6790 tcp:6790')"
    fi

    if command -v adb &> /dev/null; then
      echo "  βœ” adb CLI is installed ($(which adb))"
      AND_DEVICES=$(adb devices 2>/dev/null | grep -v "List of" | grep -v "^$" || true)
      if [[ -n "$AND_DEVICES" ]]; then
        echo "  βœ” Connected Android device(s):"
        echo "$AND_DEVICES" | sed 's/^/    - /'
      else
        echo "  β„Ή No Android devices currently attached via ADB."
      fi
    fi

    echo ""
    exit "$STATUS"
    ;;

  *)
    echo "Usage:"
    echo "  $0 matrix <feature> [app_id] [platform]    Create mobile test matrix"
    echo "  $0 bug <feature> <defect_id> \"<title>\"     Create mobile defect report"
    echo "  $0 doctor                                 Inspect iOS & Android health"
    exit 1
    ;;
esac
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 319kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 319kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 319kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall