maintain

maintain is a command for Claude Code from dork-labs/dorkos. It costs 9 tokens per session (900 once invoked), scanned A, original, MIT.

A command that checks the health of browser tests, which test a website through a real browser, using a tracked test list.

In plain words
What is it for?
Use it to run individual tests, classify them as healthy, stale, broken, or orphaned, and update broken tests when appropriate.
Why use it?
It reveals tests that are missing, failing, or possibly outdated after related code changed.

Command for Claude Code

Part of the flow plugin — 17 skills, 37 commands, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dork-labs/dorkos/maintain
Clone the repo
git clone --depth 1 https://github.com/dork-labs/dorkos

Made for: Claude Code.

Or install flow, the plugin that ships this one along with the rest of its 17 skills, 37 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for maintain

README.md
[![agentmods](https://agentmods.dev/badge/commands/dork-labs/dorkos/maintain.svg)](https://agentmods.dev/commands/dork-labs/dorkos/maintain)
Your own site
<a href="https://agentmods.dev/commands/dork-labs/dorkos/maintain"><img src="https://agentmods.dev/badge/commands/dork-labs/dorkos/maintain.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.00900
Opus 5 $0.00005 $0.00450
Sonnet 5 $0.00002 $0.00180
Haiku 4.5 $0.00001 $0.00090

Measured 3d ago against content hash 4fa5f57d2a83, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

maintain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/browsertest/maintain.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Browser Test Maintenance

Audit the browser test suite health, detect stale and orphaned tests, and auto-update broken tests.

Maintenance Flow

Step 1: Read Manifest

Read apps/e2e/manifest.json to get the list of all tracked tests. If the manifest is empty or has no tests, report that and stop.

Step 2: Audit Each Test

For each test entry in the manifest:

  1. Check existence: Glob for apps/e2e/<specFile> to verify the spec file still exists on disk
  2. Check staleness: If the test has relatedCode entries, check if any were modified since lastRun:
    git log --since="<lastRun>" --oneline -- <relatedCode paths>
    
    If any output, the test is potentially stale.
  3. Run the test: Execute the individual test to check if it passes:
    cd apps/e2e && npx playwright test <specFile> --reporter=json 2>&1
    

Step 3: Categorize Results

Classify each test into one of four categories:

  • Healthy — Test passes AND related code unchanged since last run
  • Stale — Test passes BUT related code was modified since last run (may need updating)
  • Broken — Test fails (selector changed, timing issue, or code regression)
  • Orphaned — Spec file still exists but related source code files have been deleted

Step 4: Auto-Fix Stale Tests

For stale tests:

  1. Use Playwright MCP mcp__plugin_playwright_playwright__browser_navigate to visit the feature at http://localhost:6241
  2. Use mcp__plugin_playwright_playwright__browser_snapshot to capture the current accessibility tree
  3. Compare current selectors/structure with what the test expects
  4. Update POM locators or test assertions if they've drifted
  5. Re-run the test to verify the update works

Step 5: Handle Orphaned Tests

For orphaned tests:

  1. Display the list of orphaned tests to the user
  2. Ask for confirmation using AskUserQuestion before removing anything
  3. If confirmed: delete the spec file and remove the entry from manifest.json
  4. If declined: keep the test but flag it in the report

Read the full file on GitHub · 100 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 100 lines · 9 tokens per session scan A 4fa5f57d2a83

Subscribe to this mod's changes

maintain is a command published in the GitHub repository dork-labs/dorkos (9 stars, last pushed 3d ago), licensed MIT. It adds 9 tokens to every session and 900 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.