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 skills/termio-sh/termio/dia-source-analysisnpx skills add termio-sh/termio --skill dia-source-analysisgit clone --depth 1 https://github.com/termio-sh/termioWrote 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.
[](https://agentmods.dev/skills/termio-sh/termio/dia-source-analysis)<a href="https://agentmods.dev/skills/termio-sh/termio/dia-source-analysis"><img src="https://agentmods.dev/badge/skills/termio-sh/termio/dia-source-analysis.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00125 | $0.02660 |
| Opus 5 | $0.00063 | $0.01330 |
| Sonnet 5 | $0.00025 | $0.00532 |
| Haiku 4.5 | $0.00013 | $0.00266 |
Grade A, and why
dia-source-analysis 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze Dia Browser source
Dia (/Applications/Dia.app, The Browser Company, company.thebrowser.dia) is a
WebKit-based browser (~1.4 GB) that shares ArcCore.framework with Arc. termio uses
it as a reference for how a shipping product drives AI coding agents as sandboxed
child processes (Dia shells to the real Claude Code CLI under Seatbelt) and for its
agent-server / IPC architecture. This skill captures how to dig into it and what's
already known, so analysis doesn't start from scratch each time.
Golden rules
- Read-only, on the user's own machine, for research. This is proprietary code shipped to the user. Use it to understand and learn, never to copy/redistribute verbatim or ship lifted code. State this caveat when sharing recovered source.
- Verify before trusting old findings. The "Established facts" below are version-stamped.
Dia auto-updates (Sparkle); bundle layout, file hashes, runtime versions, and even whether
source maps ship can all change. Always re-read
info.json+CFBundleShortVersionStringfirst and treat mismatches as "re-derive from scratch." - Two recoverability tiers: the Bun/TS agent backend is near-fully recoverable (source maps); the native Swift app is symbols/structure only (no real source).
Established facts (as of Dia 1.34.2 — RE-VERIFY)
Agent-server info.json (1.34.2): version 1.0.0, buildDate 2026-06-10, commit 47de9fbe6c4,
claudeCodeVersion 2.1.131. (Was 1.32.0 / commit 55d9d2e174b / buildDate 2026-05-20.)
- ⚠️ Source maps NO LONGER SHIP as of 1.34.2.
extract-sourcemaps.pyreturns "No .map files found" — the Bun/TS agent-server backend is no longer recoverable as near-original TS (only logic compiled into the Mach-O remains). The native-Swift tier is unchanged: symbols + embedded source paths only. So "the big win" in §1 below is gone on current builds; keep the procedure for older installs / in case they return. - Agent backend = Bun-compiled standalone Mach-O (
agent-server,handler) + the real Claude Code CLI (claude, 206 MB, itself a Bun binary). No separate Node/Bun runtime is installed — each binary embeds Bun. They run as child processes under Seatbelt sandbox (sandbox-exec -f agent.sb/agent-claude-code.sb, params via-D DATA_DIR=…), talking to the native UI over SSE/IPC (transport/sse.ts,ipc-gateway.ts). Per-context workspace atdata/contexts/{contextId}with resumable disk buffers (session/buffer.ts, JSONL). This is the part most relevant to termio — termio runs agents in real PTYs (.exec) instead, but the child-process-under-sandbox + resumable-buffer + IPC design is the directly comparable bit. - Streaming smoothness comes from native rendering +
session/update-batcher.ts: deltas are coalesced and flushed only on ≥256 B OR 250 ms idle OR completion — so the UI updates a few times/sec, not per token. The Bun agent-server is backend orchestration and does NOT touch UI perf. - AI chat ("AssistantPanel") renders NATIVELY, not in a webview. Markdown parsed by
cmark(swift-markdown), code highlighted by Highlightr (CodeAttributedString→ NSAttributedString), math by SwiftMath (MTMathListDisplay, CoreText). UI is AppKitNSViewControllers (source pathsFrameworks/BoostBrowser/Sources/AssistantPanel/*.swift). - The AI input is the native AppKit module
BoostCommandBar(Frameworks/BoostBrowser/ Sources/BoostCommandBar/*): a token/pillTokenTextVieww/SkillPillTokenViewProvider; Skills =SkillsV3;@-mentions (AtMentionKeywords: @Search/@Slack/@Gmail/@Notion) insert context/tool pills. On-devicecmd_t_router(3-label intent) +skillsclassifier rank proactive suggestions. - WKWebView (~45 refs) is for web pages + HTML "artifacts" (reports/slides via
report-kit/slide-kit), NOT for chat bubbles. - On-device ML (
OnDeviceLoRAadaptorsbundle, 152 M): one shared DistilBERT-base encoder (126 M, fp16) + three LoRA adapters + heads —cmd_t_router(input intent),skills(which skill to fire),sensitive_content(privacy gate). Run via MLX (mlx-swift).
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 151 lines · 125 tokens per session scan A dce196a22cb3
dia-source-analysis is a skill published in the GitHub repository termio-sh/termio (395 stars, last pushed today), licensed MIT. It adds 125 tokens to every session and 2,660 once invoked, about $0.0006 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-30.
Other skills, from other repositories
image-lightbox
Click-to-zoom lightbox for chat images, screenshots, and generated visuals. Scroll-wheel zoom (0.5x–5x), drag-to-pan, pinch gesture on mobile, keyboard shortcuts. Zero dependencies — pure CSS + vanilla JS. Use when: (1) Chat contains images the user wants to inspect, (2) Browser screenshots need closer examination…
canvas
Display, present, and render HTML content on connected Otto nodes (Mac app, iOS, Android). Show on device, preview on mobile, push to screen, or navigate to a URL on any connected node. Use for games, visualizations, dashboards, interactive demos, and live-reloading development previews. Supports presenting, hiding…
ios-simulator-browser
Stream an explicit iOS Simulator through pinned serve-sim into the T3 Code in-app browser or another agent browser. Use on Apple Silicon macOS when the user should watch simulator verification live or when browser-visible simulator evidence is needed.
agent-browser
Browser automation via Chrome/Chromium CDP — open, snapshot, click, screenshot. For testing web apps, mobile layouts, and automated interactions without Playwright/Puppeteer.
argent-device-interact
Interact with an iOS simulator, Android emulator, or Chromium (CDP) app using argent MCP tools. Use when tapping UI elements, performing gestures, scrolling/swiping, typing text, pressing hardware buttons, launching apps, opening URLs, taking screenshots, waiting for an element to appear or disappear, or checking…
argent-metro-debugger
Debug a JS runtime via CDP using argent debugger tools. Primary path is React Native via Metro (iOS / Android / Vega); a subset of the tools (debugger-connect, debugger-status, debugger-evaluate, debugger-log-registry) also drive a Chromium (CDP) app's renderer (an Electron app, or any Chromium browser exposing CDP)…