Agent skill

Select PR Routines

by Mentra-Community in Mentra-Community/MentraOS

Select device-test coverage when opening or updating a MentraOS PR.

Apache-2.0Auto-check passedTesting & QA

Install Select PR Routines

skills CLI
$ npx skills add Mentra-Community/MentraOS --skill select-pr-routines -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mentra-Community/MentraOS select-pr-routines --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mentra-Community/MentraOS.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/select-pr-routines .claude/skills/select-pr-routines && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
select-pr-routines
GitHub stars
2.4k
Token cost
~3.3k tokens
SKILL.md length
1,528 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

Select device-test coverage when opening or updating a MentraOS PR.

  • Works in 3 steps: Read the PR diff and describe the… → Read the private → Select the smallest set whose actual…
  • Tasks that involve Test coverage
  • SKILL.md covers Find coverage, Request existing coverage, Request an edit or new routine and Keep request status honest
  • Calls gh, node and git

What it does

Select PR Routines is an agent skill from Mentra-Community/MentraOS. Select device-test coverage when opening or updating a MentraOS PR. Request existing routine runs with routine: labels, or request an edit or new routine through the PR authoring system when coverage needs to change. Use create-routine for machine-side authoring.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test coverage. The repository describes itself as: MentraOS is the leading smart glasses OS. See live captions, stream your view, talk to AI, and capture photos hands-free on compatible glasses. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Test coverage

Example prompts

  • “/select-pr-routines”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read the PR diff and describe the behavior it changes. For an existing PR
  2. Read the private
  3. Select the smallest set whose actual steps exercise the changed behavior.

What it can do on your machine

Read from SKILL.md and the folder at commit 223f5b9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • node
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Select PR Routines loads about 3.3k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 1,528 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mentra-Community/MentraOS at commit 223f5b9, republished under its Apache-2.0 licence (© Mentra-Community). 1,528 words, ~3,260 tokens.

Download SKILL.mdSave it as .claude/skills/select-pr-routines/SKILL.md (or your agent's skills folder).
name
select-pr-routines
description
Select device-test coverage when opening or updating a MentraOS PR. Request existing routine runs with routine:* labels, or request an edit or new routine through the PR authoring system when coverage needs to change. Use create-routine for machine-side authoring.

Select or request routine coverage for a PR

Match coverage to the PR's behavior, then make the appropriate request:

Coverage neededRequest
Existing steps already test the behaviorAdd routine:<id> for ordinary replay of the PR build
An existing flow needs changed expectations or additional stepsRequest routine-work:edit with an authoring brief
No suitable flow existsRequest routine-work:create with an authoring brief

A request is not a passing test result. Docs-only changes need no device coverage.

Find coverage

  1. Read the PR diff and describe the behavior it changes. For an existing PR:

    bash
    gh pr view PR --repo Mentra-Community/MentraOS --json headRefOid,baseRefOid,labels,files
    gh pr diff PR --repo Mentra-Community/MentraOS
  2. Read the private Mentra-Automated-Testing repository through gh. Resolve its latest main commit once, then list routines and read candidates at that exact SHA. If the user explicitly selects another routine revision, use that authorized exact SHA for all source reads instead. This needs GitHub access to the repository, not Core/Admin credentials, and does not depend on a local checkout's branch or modify it with git pull:

    bash
    harness_repository=Mentra-Community/Mentra-Automated-Testing
    harness_sha=$(gh api "repos/$harness_repository/commits/main" --jq .sha)
    gh api "repos/$harness_repository/git/trees/$harness_sha?recursive=1" \
      --jq 'if .truncated then error("Incomplete routine tree; inspect directories individually") else .tree[] | select(.type == "blob" and (.path | test("^routines/[^/]+/routine\\.ts$"))) | .path end'

    The harness discovers routines/<id>/routine.ts without a static registry. Set routine_path to a discovered path and read its source:

    bash
    gh api "repos/$harness_repository/contents/$routine_path" --method GET \
      -f ref="$harness_sha" -H 'Accept: application/vnd.github.raw+json'

    Fetch imported helper paths with the same command and SHA too. The PR author inspects coverage and submits the brief; the assigned machine-side authoring agent makes routine edits. Read purpose, platforms, prerequisites, fixtures and ordered step IDs. Follow each candidate's actions into helpers to identify pages, clicked controls and assertions; the English description alone does not prove coverage. Report missing private repository access explicitly. Core/Admin credentials are not needed for this source inspection.

  3. Select the smallest set whose actual steps exercise the changed behavior. Do not select every routine for shared SDK files. Trace the actual affected path. Mac evidence does not qualify Android-only or physical-iPhone behavior. A visibility change may need different coverage from a real meeting; report the gap instead of inventing a dispatch ID. If the PR intentionally changes an expected outcome, identify the conflicting step and request an edit rather than running known-invalid old assertions. Prefer extending a coherent existing flow over creating duplicate coverage. Explain which stable step IDs cover the PR; for an edit, name the insertion before/after an existing step and its expected outcome. A matching recorded example can corroborate behavior, but it may use an older source revision.

Request existing coverage

Build each label as routine:<id> from the selected routine's declared ID. A real routine on Harness main is requestable without a published collection or existing Core enrollment. Required Harness PR checks validate source before merge; they do not prove the routine passes on devices.

An ordinary new request resolves current Harness main once at submission and freezes that exact SHA with the selected PR app build. Labels contain the routine ID, not a source revision. If that SHA differs from the source inspected above, read the requested source before claiming it covers the PR. An explicitly selected authorized routine SHA overrides the default through the request workflow's optional routine_revision input. Leave it absent to select current main; to request the exact inspected source, supply -f routine_revision="$harness_sha" with the existing routine/platform and exact app-build selectors to request-e2e-routine.yml on --ref dev. Omitted overrides on reruns inherit the original member's exact routine and app selections. Never substitute an older published routine.

Core durably records source preparation in the same test-request queue. The host obtains request-scoped verified Git inventory/blobs through Core, constructs the routine-owned source and runs bounded installed API/factory preflight before any device grants. Temporary source failures remain waiting with a reason; invalid or incompatible source reports its exact refusal/wait. Collection publication and framework activation at that routine commit are not prerequisites. The configured host/lane, artifact, capability and authority checks still apply.

Do not claim the request ran or substitute another routine. When creating the PR, include its --label in the existing gh pr create command. For an existing PR, set selected_label to that exact discovered label:

bash
gh pr edit PR --repo Mentra-Community/MentraOS --add-label "$selected_label"
gh pr view PR --repo Mentra-Community/MentraOS --json labels,headRefOid

For the GitHub REST API, POST appends labels; do not use PUT to replace them:

bash
gh api --method POST repos/Mentra-Community/MentraOS/issues/PR/labels \
  -f "labels[]=$selected_label"

Add only missing selected labels. Preserve unrelated and previously requested labels; flag a stale routine label for the author rather than silently removing it. In the PR's validation section, name each label and its covered behavior, separate pending routine results from completed local tests, and list uncovered changes.

Show full SKILL.md (878 more words)Show less

Request an edit or new routine

Use the existing PR authoring contract and its JSON template. This dispatches machine-side work using create-routine; the PR author does not need to reserve hardware or implement another authoring workflow.

  1. Choose edit for an existing routines/<id>/routine.ts at the selected harness commit, or create with a new stable ID absent at that commit. Pin source.revision to the exact reviewed harness SHA, not the MentraOS PR SHA or a moving branch. Describe the goal, changed or added English steps and observable expected results. For edits, name the affected step IDs and preserve the rest of the flow. The machine verifies the complete saved flow, not just the new step.

  2. Choose an enrolled host/lane offering the required platform, glasses models and capabilities. Use an already configured target or ask its owner for the host/lane IDs and prerequisites. If Admin access is already available, its GET /api/admin/test-runs/restoration/list projection for host/lane IDs and platform can help, together with the configured lane's capabilities. Authoring uses mac or android; ordinary catalog/replay uses ios-on-mac or android. Current machine-side intake rejects nonempty requirements.environment. Use [] when no generic environment provider is needed; otherwise report the unsupported prerequisite. Preserve the routine's actual fixture needs. If access or a prerequisite is missing, explain exactly what is needed and ask the owner; do not invent IDs or erase requirements to admit the job.

  3. Save the contract's comment to a file, replacing its example values. It must start with <!-- mentra-routine-work:v1 --> and contain exactly one JSON block with no surrounding prose. Keep credentials and private device/account data out of the public brief. The workflow supplies the current PR build and origin; do not put artifact URLs, tokens or build metadata into the comment.

    Validate the draft from the MentraOS checkout without dispatching:

    bash
    node --input-type=module - /private/tmp/routine-work-comment.md edit <<'JS'
    import {readFile} from 'node:fs/promises';
    import {parseRoutineWorkBrief} from './.github/scripts/routine-work.mjs';
    const [path, kind] = process.argv.slice(2);
    parseRoutineWorkBrief(await readFile(path, 'utf8'), kind);
    console.log('Valid routine-work brief');
    JS

    Use create as the last argument for a creation request. Validation checks the brief's schema; it does not prove host capabilities or source review.

  4. On the open same-repository PR targeting dev or staging, first inspect its comments and labels. There must be one marked brief and one authoring-kind label. If no brief exists, post the file and add the missing matching label (routine-work:edit in this example):

    bash
    gh pr comment PR --repo Mentra-Community/MentraOS --body-file /private/tmp/routine-work-comment.md
    gh pr edit PR --repo Mentra-Community/MentraOS --add-label routine-work:edit

    The comment author must be a human account with repository write or admin access, verified through GitHub's collaborator permission endpoint. Comment association labels can vary by credential and do not establish access. An AI using that account's gh login works; a bot-authored brief does not. For an existing request, edit its comment by ID instead of posting a second brief. Read back the comment and labels. Ordinary routine:<id> labels can coexist for other relevant coverage.

  5. Follow the request workflow and its updating status comment. Automatic intake uses ROUTINE_WORK_PR_DISPATCH_ENABLED, independently of ordinary replay's gate. When an authorized manual submission is needed, use the same intake:

    bash
    gh workflow run request-routine-work.yml --repo Mentra-Community/MentraOS --ref dev -f pr=PR

    Intake requires the current PR's published platform artifact. A waiting-for-build notice means nothing was submitted: the enabled automatic build callback, or the same manual intake after publication, submits the work. Changing the brief, source, target or build creates a new work occurrence. Review corrections should continue the existing machine job rather than redispatching by editing the brief. After source review, require the linked ordinary passing run and recording before reporting coverage as verified. Request ordinary replay of the reviewed source through the existing label/workflow; report pending source preparation or the exact refusal explicitly rather than requiring eager collection publication.

Keep request status honest

  • PR dispatch is off unless DEVICE_ROUTINE_PR_DISPATCH_ENABLED is explicitly enabled. Adding labels does not enable that gate. When enabled, the existing request workflow submits routine IDs with exact PR build sources through POST /api/internal/routine-dispatches; Core resolves current Harness main or the optional exact override once, freezes app/routine inputs, and routes source preparation to explicitly configured host/lane bindings. Check its request status and linked result. A preparing, queued, rejected, unavailable or unrecorded request is not a pass. After artifact publication, use the normal request workflow/Admin path for an authorized retry; do not toggle labels or repeatedly dispatch to overcome an explicit denial.
  • Existing enabled coverage may run after labeling. For firmware/meeting tests, confirm the request fits the existing authorized fixture and finite attempt budget. If that authorization is unknown, defer adding the label and report the recommendation and missing prerequisite. Do not enable dispatch or increase limits. Installed provider capabilities and current ownership are checked by Core and the host controller; an authorized queued request need not wait for an idle device, and an unavailable fixture must be reported as pending/not-run rather than passed.
  • In the PR's validation section, explain the selected replay/edit/create request, the behavior it covers and any missing prerequisite. A recorded pass is required for the passing-example catalog, not for requesting valid main-source coverage. Queued authoring, source ready for review and prepared source are progress states; they are not an ordinary test pass.
  • Public PRs contain coverage/status and approved result links, not credentials, account details, private logs, firmware assets or raw recordings.

© Mentra-Community, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/select-pr-routines of Mentra-Community/MentraOS.

Open the folder on GitHubat commit 223f5b9

Compare with similar skills

Select PR Routines next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Select PR Routines compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Select PR Routines this skillMentra-Community/MentraOS2.4k—~3.3kAutomated safety check: PassApache-2.0
Requirementsrizsotto/Bear6.5k—~2kAutomated safety check: PassGPL-3.0
Crap Analysisardalis/RiverBooks1352 repos~3.4kAutomated safety check: PassNone
Bmad Testarch Automatechenjackle45/SayIt1152 repos~867Automated safety check: PassMIT
Code Coverages3s-project/s3s311—~789Automated safety check: PassApache-2.0
Project Statusbactopia/bactopia522—~787Automated safety check: PassMIT

Similar skills

  • Requirements

    rizsotto/Bear

    Write, modify, or review a requirement file under docs/requirements -- pick the single owning file, keep the text contract-only, name IDs so they need no explanation, and verify cross-references and…

    6.5k GitHub stars~2k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Crap Analysis

    ardalis/RiverBooks

    Analyze code coverage and CRAP (Change Risk Anti-Patterns) scores to identify high-risk code.

    135 GitHub starsUsed in 2 repos~3.4k tokens
    Testing & QAAuto-check passed
  • Bmad Testarch Automate

    chenjackle45/SayIt

    Expand test automation coverage for codebase. An agent skill from chenjackle45/SayIt.

    115 GitHub starsUsed in 2 repos~867 tokens
    Testing & QAAuto-check passed
  • Code Coverage

    s3s-project/s3s

    Measure and grow the line coverage of the s3s crate. An agent skill from s3s-project/s3s.

    311 GitHub stars~789 tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Project Status

    bactopia/bactopia

    Show a live snapshot of the Bactopia project state — component counts, GroovyDoc coverage, nf-test coverage, and structural issues.

    522 GitHub stars~787 tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Check Coverage

    ldayton/Dippy

    Ensure comprehensive test coverage for a CLI handler. An agent skill from ldayton/Dippy.

    243 GitHub stars~403 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed

More from Mentra-Community/MentraOS

All 11 skills in this repo
  • Investigate Routine Failure

    Mentra-Community/MentraOS

    Investigate a Mentra routine failure from an Admin testRun URL or run/request ID, fetch authenticated results and verified artifacts with the existing incident-report token, trace the exact routine…

    2.4k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Mentra Update Live Firmware

    Mentra-Community/MentraOS

    Update MentraOS firmwarelive.json from the published BES and MTK feeds and prepare a PR, preserving production MTK upgrade paths.

    2.4k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • CI Triage

    Mentra-Community/MentraOS

    Triage failing GitHub PR checks: list failures with gh, fetch capped Actions logs, skip non-Actions checks, and summarize root cause.

    2.4k GitHub stars~582 tokensUpdated today
    Auto-check passed
  • Codex PR Review

    Mentra-Community/MentraOS

    Run an independent local Codex (gpt-6.1-sol, medium) review of a GitHub pull request and relay its verdict.

    2.4k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Manage Cloud Env

    Mentra-Community/MentraOS

    Add or change backend deployment environment variables through Doppler shared configs and native Porter syncs.

    2.4k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Fix Nightly Failures

    Mentra-Community/MentraOS

    Diagnose an ongoing or finished Mentra nightly suite, group demonstrated shared failures, implement fixes, and carry PRs through independent Codex review and merge.

    2.4k GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Categories

Questions about Select PR Routines

What does Select PR Routines do?

Select device-test coverage when opening or updating a MentraOS PR. Select PR Routines is an agent skill from Mentra-Community/MentraOS. Select device-test coverage when opening or updating a MentraOS PR.

When should I use Select PR Routines?

Select PR Routines fits situations like: tasks that involve Test coverage.

How do I install Select PR Routines in Claude Code?

Run `npx skills add Mentra-Community/MentraOS --skill select-pr-routines -a claude-code`. Or copy the skill folder (.agents/skills/select-pr-routines in Mentra-Community/MentraOS) into .claude/skills/select-pr-routines in your project. Claude Code loads it when a task matches its description.

How do I install Select PR Routines in Codex?

Run `npx skills add Mentra-Community/MentraOS --skill select-pr-routines -a codex`. Or copy the skill folder (.agents/skills/select-pr-routines in Mentra-Community/MentraOS) into .agents/skills/select-pr-routines in your project. Codex loads it when a task matches its description.

Can I use Select PR Routines in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mentra-Community/MentraOS --skill select-pr-routines -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/select-pr-routines, .gemini/skills/select-pr-routines, .github/skills/select-pr-routines and .opencode/skills/select-pr-routines in your project.

What does Select PR Routines need to run?

Going by SKILL.md and its folder, Select PR Routines needs the command-line tools its instructions call (gh, node and git).

Does Select PR Routines access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Select PR Routines safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Select PR Routines use?

Select PR Routines is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Select PR Routines use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Select PR Routines?

Skills that share tags, products or a category with Select PR Routines: Requirements (rizsotto/Bear, 6.5k stars), Crap Analysis (ardalis/RiverBooks, 135 stars), Bmad Testarch Automate (chenjackle45/SayIt, 115 stars) and Code Coverage (s3s-project/s3s, 311 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Select PR Routines?

Mentra-Community (a GitHub organization) maintains it in Mentra-Community/MentraOS, which has 2,381 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 11, 2026.

Source: Mentra-Community/MentraOS on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.