dom

dom is a command for Claude Code from cesarandreslopez/tauri-agent-tools. It costs 0 tokens per session (772 once invoked), scanned A, original, MIT.

A command for showing the structure of a Tauri app's web interface, called the DOM, which is the tree of elements that make up a web page. It can also show the accessibility tree used by assistive technologies.

In plain words
What is it for?
Use it to explore page elements, inspect their computed styles, count or select matches, search for text, and return compact or structured JSON output. It requires an active development bridge.
Why use it?
It lets you inspect what the app actually contains and find elements by selector or text instead of relying only on what is visible in a screenshot.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

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/cesarandreslopez/tauri-agent-tools/dom
Clone the repo
git clone --depth 1 https://github.com/cesarandreslopez/tauri-agent-tools

Made for: Claude Code.

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 dom

README.md
[![agentmods](https://agentmods.dev/badge/commands/cesarandreslopez/tauri-agent-tools/dom.svg)](https://agentmods.dev/commands/cesarandreslopez/tauri-agent-tools/dom)
Your own site
<a href="https://agentmods.dev/commands/cesarandreslopez/tauri-agent-tools/dom"><img src="https://agentmods.dev/badge/commands/cesarandreslopez/tauri-agent-tools/dom.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 772 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.1 $0.00000 $0.00772
Opus 5 $0.00000 $0.00386
Sonnet 5 $0.00000 $0.00154
Haiku 4.5 $0.00000 $0.00077

Measured 6d ago against content hash b673ee16fb00, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

dom 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 6d 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.

docs/commands/dom.md · 125 lines

How it starts

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

dom

Query DOM structure from the Tauri app.

!!! note "Bridge Required" This command requires an active bridge connection.

Usage

tauri-agent-tools dom [selector] [options]

Options

Option Description Default
[selector] Root element to explore (positional argument) body
-s, --selector <css> Root element to explore (flag alternative)
--mode <mode> Output mode: dom or accessibility dom
--depth <number> Max child depth 3
--tree Compact tree view (default)
--styles Include computed styles (display, visibility, opacity, position, overflow)
--text <pattern> Find elements containing this text (case-insensitive)
--count Just output match count
--first Only return first match (depth 0)
--json Full structured JSON output
--port <number> Bridge port (auto-discover if omitted)
--token <string> Bridge token (auto-discover if omitted)

Examples

Explore full page

tauri-agent-tools dom --depth 3
body (1920x1080)
  div#app (1920x1080)
    header.navbar (1920x64)
      nav.nav-links (400x64)
    main.content (1920x1016)
      div.sidebar (300x1016)

Explore a subtree

tauri-agent-tools dom ".sidebar" --depth 2

Count matching elements

tauri-agent-tools dom --count ".list-item"
12

Include computed styles

tauri-agent-tools dom ".toolbar" --styles --json

Accessibility tree

tauri-agent-tools dom --mode accessibility --depth 2
[document]
  [banner]
    [navigation] "Main menu"
      [link] "Home"
      [link] "Settings"
  [main]
    [heading] "Dashboard" (level=1)

Find elements by text

# Find all elements containing "Settings"
tauri-agent-tools dom --text "Settings"

# Find within a specific subtree
tauri-agent-tools dom "#sidebar" --text "Settings"

# Get just the first match
tauri-agent-tools dom --text "Settings" --first

# Count matches
tauri-agent-tools dom --text "Settings" --count

Read the full file on GitHub · 125 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. 6d ago First seen · 125 lines · 0 tokens per session scan A b673ee16fb00

Subscribe to this mod's changes

dom is a command published in the GitHub repository cesarandreslopez/tauri-agent-tools (22 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 772 tokens. 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.