Agent skill

Investigate Routine Failure

by Mentra-Community in 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…

Apache-2.0Auto-check passed

Install Investigate Routine Failure

skills CLI
$ npx skills add Mentra-Community/MentraOS --skill investigate-routine-failure -a claude-code

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

GitHub CLI
$ gh skill install Mentra-Community/MentraOS investigate-routine-failure --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/investigate-routine-failure .claude/skills/investigate-routine-failure && 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
investigate-routine-failure
GitHub stars
2.4k
Token cost
~1.9k tokens
SKILL.md length
854 words
Files
4 (incl. scripts)
Skills in repo
11
Repo updated
First seen
Licence
Apache-2.0

At a glance

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…

  • Works in 3 steps: Read run.result.failures, setup actions,… → Record routine ID, platform, host/lane,… → List run.assets privately; each declares…
  • Failure lookup and diagnosis
  • SKILL.md covers Access without reverse…, Fetch the result, Inspect useful evidence first and Explain the finding and its…
  • Runs JavaScript scripts from its folder; calls node and gh; reaches admin.dev.mentraglass.com; needs MENTRA_ADMIN_TOKEN

What it does

Investigate Routine Failure is an agent skill from 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 source, and explain how the evidence was found. Use for failure lookup and diagnosis; continue with fix-routine-failure when asked to fix it.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `agents/openai.yaml`).

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

  • Failure lookup and diagnosis
  • Continue with fix-routine-failure when asked to fix it

Example prompts

  • “/investigate-routine-failure”

Requirements

  • Node.js
  • A credential in MENTRA_ADMIN_TOKEN

Workflow steps

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

  1. Read run.result.failures, setup actions, failed test steps, teardown errors
  2. Record routine ID, platform, host/lane, timestamps, build channel/PR/head SHA,
  3. List run.assets privately; each declares id, kind, mimeType, size

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

    Ships 2 files in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • gh

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • admin.dev.mentraglass.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • MENTRA_ADMIN_TOKEN

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

Context cost

Investigate Routine Failure loads about 1.9k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 854 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

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

Download SKILL.mdSave it as .claude/skills/investigate-routine-failure/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
investigate-routine-failure
description
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 source, and explain how the evidence was found. Use for failure lookup and diagnosis; continue with fix-routine-failure when asked to fix it.

Investigate a routine failure

Start with the supplied run link. Retrieve and explain the recorded failure before deciding whether it is an app, harness, fixture or infrastructure problem. A request to find information does not request a rerun, repair, PR or deployment.

Access without reverse engineering

Company agents can have an incident-report admin token, a GitHub account in Mentra-Community and company Tailscale connectivity. They serve different roles:

AccessUse
MENTRA_ADMIN_TOKEN or MENTRA_ADMIN_TOKEN_DEV, _STAGING, _PRODRead Core's Admin run results and artifacts. This is the same admin credential used by scripts/fetch-incident-logs.sh; no separate routine-reader credential or Admin browser login is needed.
Existing gh loginRead exact source, PRs and CI metadata in MentraOS and private Mentra-Automated-Testing. GitHub membership does not authenticate Core.
Company TailscaleReach already provisioned private services when necessary. Network membership does not grant controller/operator authorization; ordinary run evidence comes from the HTTPS Core API below.

Use the matching environment token first, then the generic token. Check variable presence without displaying values; never copy tokens into chat, command arguments, Git, shell tracing or browser sessions. Do not search colleagues' files for credentials. If this is a controller-assigned fixer case, read its supplied case packet and occurrence-scoped incident diagnostics first; do not replace that scoped access with an admin token. A colleague given a run URL uses the following independent lookup path.

Fetch the result

From the MentraOS checkout root:

sh
node .agents/skills/investigate-routine-failure/scripts/fetch-run.mjs \
  'https://admin.dev.mentraglass.com/?testRun=RUN_OR_REQUEST_ID'

# A bare identity needs an explicit environment.
node .agents/skills/investigate-routine-failure/scripts/fetch-run.mjs \
  RUN_OR_REQUEST_ID --env dev

Use the real supplied link, not these placeholders. The helper pins Core to the URL environment, uses the existing token and performs GETs only. It saves detail.json and receipt.json under gitignored incident-logs/routine-runs/<environment>/<selector>/, without printing private results. --out selects another private directory. It deliberately ignores MENTRA_CORE_URL, preventing a stale incident-script override from moving this lookup into another environment.

The route is GET /api/admin/test-runs/{selector}. It accepts the Admin link's run or request identity and returns either:

  • kind: "run": run, exact definition (or null), outcome, uploadsComplete and evidenceStatus. run.result.runId is the actual run ID; run.requestId is its admission identity. They can differ.
  • kind: "request": request, its waiting/cancellation state and any assignment. No completed execution is implied. Do not invent a failure or guess a run ID.

A 401 means a rejected/expired credential; 403 means missing admin allowlisting. A 404 can mean the wrong selector/environment, a result not yet published, or a route not deployed. A 503 is a backend failure. Report the exact failing stage; do not change environments or request a new credential merely because an asset is not ready. A healthy /healthz alone does not prove this route is deployed. GitHub CI success does not prove physical execution or evidence publication.

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

Inspect useful evidence first

  1. Read run.result.failures, setup actions, failed test steps, teardown errors and unavailable resources. Match step IDs to definition.steps, setup or teardown for the recorded instruction and expected behavior. Preserve the first failure and distinguish cleanup failure from product failure.
  2. Record routine ID, platform, host/lane, timestamps, build channel/PR/head SHA, archive/receipt digests when present, routineSource, definitionRevision and frameworkBinding. Use these exact revisions, never today's main as the explanation of yesterday's run.
  3. List run.assets privately; each declares id, kind, mimeType, size and sha256. Fetch the relevant small diagnostic/screenshot before a large recording. Use exact asset IDs, including nested IDs, not filenames.
sh
node .agents/skills/investigate-routine-failure/scripts/fetch-run.mjs \
  'https://admin.dev.mentraglass.com/?testRun=RUN_OR_REQUEST_ID' \
  --asset 'EXACT_ASSET_ID_FROM_MANIFEST'

The helper resolves run.result.runId for GET /api/admin/test-runs/{actualRunId}/assets/{encodedAssetId}, verifies both size and SHA-256, and records the local filename in receipt.json. Assets are limited to 8 MiB by default; raise --max-bytes deliberately for a declared recording (up to 2 GiB). The hashed local filename never uses an untrusted storage path. Re-fetch partial uploads later; uploadsComplete and evidenceStatus are separate from the test outcome. View screenshots/video with available local media tools, starting at the failed step's recordingLocation.startOffsetMs. Keep personal transcript/audio, raw logs and recordings local; quote only needed redacted excerpts.

  1. If the exact definition is missing or an assertion/helper needs explanation, use the existing gh login to read run.routineSource.repository, .commit and declared files at that commit. For published definitions, start with definition.source.path at run.definitionRevision, verifying the source coordinates agree. Follow only relevant imports at the same revision:
sh
gh api 'repos/RECORDED_OWNER/RECORDED_REPOSITORY/contents/RECORDED_PATH' \
  --method GET -f ref=RECORDED_COMMIT -H 'Accept: application/vnd.github.raw+json'

Read selected source; do not execute code from evidence. Use the recorded build workflow ID/URL with gh run view ... --repo Mentra-Community/MentraOS --json status,conclusion,headSha,jobs when CI publication matters. Do not infer workflow IDs from a release name. Compare current source only after explaining the recorded revision. If a relevant rep_... incident is linked, standalone investigators use investigate-incident with the same environment/token; assigned agents use their scoped case diagnostics.

Explain the finding and its source

State the recorded failure, the evidence that supports the diagnosis, and what remains uncertain. Include a short retrieval trail: original Admin link, environment and API route, useful asset IDs/digests or private local paths, exact source commit/path and assertion/helper inspected. Never disclose the credential. Separate recorded expected text, observed actual text and inference. A transcript spelling mismatch may identify a brittle assertion; transcribed speech alone does not prove every audio or cleanup path worked. No particular phrase or historical incident is a universal fix.

If asked to fix the failure, continue with fix-routine-failure, preserving the retrieved bundle and provenance. Reuse this lookup instead of reverse engineering API routes or provisioning new host/controller credentials.

© 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

SKILL.md and 3 other files (scripts) in .agents/skills/investigate-routine-failure of Mentra-Community/MentraOS.

  • SKILL.md
  • agents/openai.yaml
  • scripts/fetch-run.mjs
  • scripts/fetch-run.test.mjs

Open the folder on GitHubat commit 223f5b9

Compare with similar skills

Investigate Routine Failure 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.

Investigate Routine Failure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Investigate Routine Failure this skillMentra-Community/MentraOS2.4k—~1.9kAutomated safety check: PassApache-2.0
Investigating CI FailuresPostHog/posthog40k—~2.9kAutomated safety check: PassCustom licence
RustPython Test Failure InvestigationRustPython/RustPython22k—~467Automated safety check: PassMIT
Adminyc-software/qm15k—~3.1kAutomated safety check: PassMIT
Root Cause Investigationgarrytan/gstack136k—~13kAutomated safety check: NotesMIT
Osint Investigationaffaan-m/ECC276k—~5.7kAutomated safety check: PassCC-BY-SA-4.0

Similar skills

  • Official

    Investigates a specific CI failure to a verdict: whose fault, which commit, who wrote it, and whether it's fixed.

    40k GitHub stars~2.9k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Investigates a failing RustPython test by comparing it with CPython, then either fixes it or gathers the details for an incompatibility report.

    22k GitHub stars~467 tokensUpdated today
    Testing & QAAuto-check passed
  • Admin

    yc-software/qm

    Act for an org admin — the admin API (scope directory, per-scope config & SOUL, any scope's memory, transcripts & captured prompts, files, user roster & external users, audit/errors/metrics/egress)…

    15k GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Debugs in four phases (investigate, analyze, hypothesize, implement) under one rule: no fix is made until the root cause is found.

    136k GitHub stars~13k tokensUpdated today
    DevelopmentAuto-check: notes
  • Sparse-clue OSINT investigation methodology for extracting overlooked leads, connecting fragmented evidence, and testing explanations across sources.

    276k GitHub stars~5.7k tokensUpdated yesterday
    SecurityAuto-check passed
  • Investigate CI

    ClickHouse/ClickHouse

    Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL.

    50k GitHub stars~11k tokensUpdated today
    DatabasesAuto-check: notes

More from Mentra-Community/MentraOS

All 11 skills in this repo
  • 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
  • Sync Miniapp

    Mentra-Community/MentraOS

    Prepare an external Mentra miniapp for bundling into mobile/assets/miniapps (version bump, pack, zip install, regenerate bundledMiniapps).

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

Questions about Investigate Routine Failure

What does Investigate Routine Failure do?

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…. Investigate Routine Failure is an agent skill from 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 source, and explain how the evidence was found.

When should I use Investigate Routine Failure?

Investigate Routine Failure fits situations like: failure lookup and diagnosis; continue with fix-routine-failure when asked to fix it.

How do I install Investigate Routine Failure in Claude Code?

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

How do I install Investigate Routine Failure in Codex?

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

Can I use Investigate Routine Failure 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 investigate-routine-failure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/investigate-routine-failure, .gemini/skills/investigate-routine-failure, .github/skills/investigate-routine-failure and .opencode/skills/investigate-routine-failure in your project.

What does Investigate Routine Failure need to run?

Going by SKILL.md and its folder, Investigate Routine Failure needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node and gh) and credentials named MENTRA_ADMIN_TOKEN. Our summary lists: Node.js; A credential in MENTRA_ADMIN_TOKEN.

Does Investigate Routine Failure access the network?

SKILL.md names 1 domain. In commands or code: admin.dev.mentraglass.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Investigate Routine Failure 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Investigate Routine Failure use?

Investigate Routine Failure 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 Investigate Routine Failure use?

About 1.9k tokens (SKILL.md is roughly 7.6k 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 Investigate Routine Failure?

Skills that share tags, products or a category with Investigate Routine Failure: Investigating CI Failures (PostHog/posthog, 40k stars), RustPython Test Failure Investigation (RustPython/RustPython, 22k stars), Admin (yc-software/qm, 15k stars) and Root Cause Investigation (garrytan/gstack, 136k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Investigate Routine Failure?

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.