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.
npx agentmods add commands/dork-labs/dorkos/session-switch-testgit clone --depth 1 https://github.com/dork-labs/dorkosWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00054 | $0.05455 |
| Opus 5 | $0.00027 | $0.02728 |
| Sonnet 5 | $0.00011 | $0.01091 |
| Haiku 4.5 | $0.00005 | $0.00545 |
Grade E, and why
session-switch-test scanned grade E with 3 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
curl -s "http://localhost:$API_PORT/api/models" | python3 -c "import sys,json;[print(m['value']) for m in json.load(sys.stdin)['models']]" Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
dotenv -- sh -c 'rm -rf /tmp/dorkos-test-mode-4243 && turbo run build --filter=@dorkos/server && pnpm --filter @dorkos/server exec tsx src/index.ts' Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -sf -X PATCH http://localhost:4248/api/config -H 'content-type: application/json' \ How it starts
The opening of the file, as written. The whole thing — 262 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Self-test the DorkOS chat UI under the hardest real-world condition: two sessions of the same agent doing long, tool-heavy work at the same time, while the operator toggles between them in the sidebar. This is the flow where session-scoped live state (streaming, pending permission prompts, queued messages, running subagents, todos) tends to leak or get lost. The command drives the browser, cross-checks the on-disk JSONL transcripts and the server API, and writes an evidence-based report.
This complements /chat:self-test (which exercises a single session in depth). Use this one whenever you touch session switching, the SSE stream lifecycle, useSessionId, the session-chat store, tool-approval rendering, or message queueing.
Argument Parsing
Parse $ARGUMENTS:
- URL — any arg starting with
http. Default (expand$HOMEto the actual home directory;mkdir -pthe dir if missing):http://localhost:6241/session?dir=$HOME/Keep/temp/empty(Extract thedirquery param asTEST_DIRfor JSONL resolution. The empty temp dir keeps file side-effects isolated.) topics:a,b— two unambiguous, distinct topics for sessions A and B. Default:lakes,fruit. Pick concrete nouns (cars, fruit, lakes, clothes) so A and B content is trivially distinguishable on disk and on screen.perm:<mode>— permission mode for both sessions. Default:default.default— prompts on tool use. Use this to reproduce/regress the permission-prompt-on-switch bug (checks #6). The downstream checks (#2–#4) will be blocked if that bug is present, because the agents stall at the first tool gate.bypassPermissions/acceptEdits— no blocking gate. Use this to exercise subagents, queued messages, and file ops end-to-end (checks #2–#4).- Run both variants for full coverage.
model:<id>— defaultclaude-haiku-4-5(fastest, cheapest; this tests UI plumbing, not model capability). Ignored undermode:sandbox, where no model answers.mode:sandbox|live— which stack the run drives (meta/chat-capabilities.md§11).mode:sandbox— the test-mode runtime: throwaway data dir, deterministic, no model spend. Verifies UI plumbing: switching, queueing, stream lifecycle.mode:live— the dev stack with a real runtime. Verifies streaming feel, real tool loops, timing, and permission gates as they actually behave.- If the invocation does not state a mode, ASK the user before spending anything (
AskUserQuestion, offering both, with the cost of each). Never assumelive.
Store as TEST_URL, TOPIC_A, TOPIC_B, PERM_MODE, MODEL, MODE.
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.
- 3d ago First seen · 262 lines · 54 tokens per session scan E 3bcd81d096f9
session-switch-test is a command published in the GitHub repository dork-labs/dorkos (9 stars, last pushed 3d ago), licensed MIT. It adds 54 tokens to every session and 5,455 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it E with 3 findings (downloads and executes remote code, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
dark-factory-behavioral-e2e
Holdout-pattern E2E validator. Drives agent-browser against the running DynaChat app to verify that the PR's user-facing behavior actually matches what the linked issue asked for.
testarch-framework
Initialize production-ready test framework architecture (Playwright or Cypress) with fixtures, helpers, and configuration.
expect
Diff-aware AI browser testing — reads the git diff, maps changes to affected pages via the route map, generates a targeted test plan, and executes it via agent-browser (Rust daemon + CDP, ARIA-tree-first) with pass/fail reporting. Use when testing UI changes, verifying PRs before merge, or running regression checks on…
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
stark-quality-gate
Use this command when a web UI should be maintained, released, compared across runs, or used as public proof. It turns visual QA into a repeatable local/CI gate instead of a one-off screenshot check.
test-run
Run all tests and report coverage to @chief.