agentleFS
godhiraj-codegodhiraj-code/greenbuild-plugin/skills/device-cloud-setup/SKILL.md

device-cloud-setup

Skill1 starsChanged 28 days agoMITView on GitHub

Run web and mobile tests on BrowserStack (Automate, App Automate, Local, reporting/observability), Sauce Labs, or LambdaTest, with capabilities, tunnels, parallelism, and CI secrets.

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a short device/browser matrix based on analytics, not "everything".

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Device cloud setup

Credentials always come from env/CI secrets: BROWSERSTACK_USERNAME / BROWSERSTACK_ACCESS_KEY, SAUCE_USERNAME / SAUCE_ACCESS_KEY, LT_USERNAME / LT_ACCESS_KEY.

BrowserStack via the SDK (Python example; Java, Node and others are similar)

pip install browserstack-sdk
browserstack-sdk setup --username "$BROWSERSTACK_USERNAME" --key "$BROWSERSTACK_ACCESS_KEY"
browserstack-sdk pytest -s tests/     # SDK injects caps + parallels from browserstack.yml

browserstack.yml:

projectName: Web Shop
buildName: ${CI_PIPELINE_ID}
platforms:
  - os: Windows
    osVersion: 11
    browserName: Chrome
    browserVersion: latest
  - deviceName: Samsung Galaxy S23
    osVersion: 13.0
    browserName: chrome
parallelsPerPlatform: 2
browserstackLocal: true     # for localhost/staging behind firewall
debug: false
networkLogs: true
testObservability: true     # test reporting/analytics dashboard

Without the SDK: W3C capabilities

Hub https://hub.browserstack.com/wd/hub, with vendor options under bstack:options (os, osVersion, projectName, buildName, sessionName, local, debug).

App Automate (mobile)

curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" \
  -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@app.apk"
# returns {"app_url":"bs://..."} -> set `app: bs://...` in browserstack.yml

Then pick real devices (deviceName + platformVersion) and run your Appium suite through the SDK.

Local testing

Set browserstackLocal: true (the SDK starts the tunnel). Use localIdentifier when several jobs run tunnels in parallel.

Mark pass/fail

The SDK marks sessions automatically. Without it, run driver.execute_script('browserstack_executor: {"action":"setSessionStatus","arguments":{"status":"failed","reason":"..."}}').

Sauce Labs (brief)

Hub https://ondemand.us-west-1.saucelabs.com/wd/hub (pick your data center). Options go under sauce:options (build, name, tunnelName). Tunnel: Sauce Connect.

LambdaTest (brief)

Hub https://hub.lambdatest.com/wd/hub. Options go under LT:Options (build, name, tunnel). Tunnel: LambdaTest Tunnel.

Checklist

  1. Align parallel count with the plan limit.
  2. Name each build after the CI run.
  3. Use a short device/browser matrix based on analytics, not "everything".
  4. Upload video/log links into the report.
  5. Fail fast on capability errors.
  6. Watch the queue time: it is wasted minutes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.