traversing-the-semantics-tree

traversing-the-semantics-tree is a skill for Claude Code, Codex from skydoves/android-testing-skills. It costs 219 tokens per session (3,350 once invoked), scanned A, original, Apache-2.0.

A guide to moving through the relationships between elements in a Jetpack Compose test's semantics tree, such as parents, children, siblings, and ancestors. The semantics tree is the structure Compose exposes to UI tests.

In plain words
What is it for?
Use it to test child order, parent-child relationships, sibling elements, or visible items in lazy lists when direct finders are not enough.
Why use it?
It helps reach an element when a direct tag or text finder cannot identify it. It also explains when structural navigation is fragile and a stable test tag would be better.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to test child order, parent-child relationships, sibling elements, or visible…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skydoves/android-testing-skills/traversing-the-semantics-tree
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.

Any agent
npx skills add skydoves/android-testing-skills --skill traversing-the-semantics-tree
Clone the repo
git clone --depth 1 https://github.com/skydoves/android-testing-skills

Made for: Claude Code, Codex.

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 traversing-the-semantics-tree

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/android-testing-skills/traversing-the-semantics-tree.svg)](https://agentmods.dev/skills/skydoves/android-testing-skills/traversing-the-semantics-tree)
Your own site
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/traversing-the-semantics-tree"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/traversing-the-semantics-tree.svg" alt="Measured on agentmods" height="20"></a>
Per session 219 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,350 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00219 $0.03350
Opus 5 $0.00110 $0.01675
Sonnet 5 $0.00044 $0.00670
Haiku 4.5 $0.00022 $0.00335

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

Security

Grade A, and why

traversing-the-semantics-tree 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 7d 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.

compose/finders/traversing-the-semantics-tree/SKILL.md · 254 lines

How it starts

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

Traversing the Semantics Tree — When a Single Finder Won't Reach the Node

The single-finder shortcuts (onNodeWithTag, etc.) cover ~95% of test queries. The remainder need tree navigation: "the parent of this Text", "the third child of this Row", "any sibling that is enabled". This skill maps those navigation operators, calls out the LazyColumn snapshot caveat, and shows when traversal is the wrong tool.

When to use this skill

  • The target node has no stable testTag and one cannot be added to production (third-party composable, dynamically generated children).
  • The test verifies structural relationships ("the second child of the row is the icon").
  • The developer chains .onChildren()[i].onChildAt(j) and wants to know whether that is the right shape.
  • The developer mentions onChildren, onChild, onParent, onSibling, onSiblings, onAncestors, filterToOne, onFirst, onLast, or [index].
  • A LazyColumn test misses items because they are off-screen.

When NOT to use this skill

  • A Modifier.testTag(...) could be added to the target node — adding a tag is almost always cleaner than a traversal chain. See ../finding-nodes-by-tag-text-content/SKILL.md.
  • The relationship is "anywhere above" / "anywhere below" — prefer the matcher-based hasAnyAncestor / hasAnyDescendant (see ../composing-semantics-matchers/SKILL.md).
  • The query is about a LazyColumn item by key — use performScrollToKey instead (see ../../actions/clicking-and-scrolling/SKILL.md, ../../patterns/testing-lazy-lists/SKILL.md).

Prerequisites

  • A working ComposeTestRule / ComposeUiTest. See ../../setup/configuring-test-dependencies/SKILL.md.
  • Familiarity with the merged vs unmerged tree distinction. See ../finding-nodes-by-tag-text-content/SKILL.md.

Workflow

  • 1. Pick the navigator by relationship type. Each operator returns either a SemanticsNodeInteraction (single — fails on 0 or >1) or a SemanticsNodeInteractionCollection (plural — never fails on 0).

Read the full file on GitHub · 254 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. 7d ago First seen · 254 lines · 219 tokens per session scan A 7dfc4e46e53a

Subscribe to this mod's changes

traversing-the-semantics-tree is a skill published in the GitHub repository skydoves/android-testing-skills (318 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 219 tokens to every session and 3,350 once invoked, about $0.0011 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.

Related

Other skills, from other repositories

android-ui-journey-testing

XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.

sickn33/agentic-awesome-skills · 27 tokens

android_ui_verification

Automated end-to-end UI testing and verification on an Android Emulator using ADB.

sickn33/agentic-awesome-skills · 22 tokens

solopi-ai

A command-line framework for testing Android apps and devices with SoloPi, including on-device or cloud AI decision models. It manages devices, test cases, recorded interactions, replays, performance history, and evidence.

alipay/SoloPi · 127 tokens

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens

eas-simulator

EAS service (paid). Run and control a user's app on a remote iOS/Android simulator hosted on EAS cloud. Read before running any eas simulator: commands - it has the current syntax for this experimental API. Use whenever the user needs a simulator they can't run locally - 'run my app on a cloud simulator', 'use eas…

expo/skills · 249 tokens

flutter-add-integration-test

Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests. Use when adding integration testing to a project, exploring UI components via MCP, or automating user flows with the integrationtest package.

flutter/agent-plugins · 48 tokens