composing-semantics-matchers

composing-semantics-matchers is a skill for Claude Code, Codex from skydoves/android-testing-skills. It costs 240 tokens per session (3,282 once invoked), scanned A, original, Apache-2.0.

A guide to combining conditions when finding UI elements in Jetpack Compose tests. A matcher is a rule that describes which nodes in the UI’s semantics tree should be selected.

In plain words
What is it for?
Use it to combine rules such as text, button actions, enabled state, test tags, content descriptions, and relationships between parent, child, ancestor, or sibling nodes.
Why use it?
It helps tests find exactly the intended element and produces one error that explains all required conditions, instead of relying on brittle chains of checks.

Skill for Claude CodeCodex

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

Good fit Use it to combine rules such as text, button actions, enabled state, test tags, content descriptions, and relationships between parent, child, ancestor, or sibling nodes.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/android-testing-skills/composing-semantics-matchers/github.svg)](https://agentmods.dev/skills/skydoves/android-testing-skills/composing-semantics-matchers)
Your own site
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/composing-semantics-matchers"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/composing-semantics-matchers/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for composing-semantics-matchers

Your own site · 80×15
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/composing-semantics-matchers"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/composing-semantics-matchers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 240 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,282 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00240 $0.03282
Opus 5.5 $0.00096 $0.01313
Sonnet 5.5 $0.00048 $0.00656
Haiku 4.5 $0.00024 $0.00328

Measured 3mo ago against content hash dea52b582e69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

composing-semantics-matchers 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 3mo 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/composing-semantics-matchers/SKILL.md · 205 lines

How it starts

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

Composing Semantics Matchers — One Matcher, One Error

A SemanticsMatcher is a description string plus a (SemanticsNode) -> Boolean predicate (SemanticsMatcher.kt:26). Compose ships with a rich filter library and three combinators (and, or, not) that produce a single matcher whose error message lists every clause. This skill picks the right factory, composes precise predicates, and replaces brittle assertion chains.

When to use this skill

  • The developer wants to find "an enabled Button with text Submit" or any node matching multiple constraints.
  • The developer asks how to combine hasText and hasClickAction, or how to negate a matcher with not.
  • The developer needs to filter by a custom SemanticsPropertyKey (e.g. a domain-specific role) using expectValue/keyIsDefined.
  • The developer asks about hierarchical matchers like hasParent, hasAnyAncestor, hasAnyChild, hasAnySibling, hasAnyDescendant.
  • A test chains multiple assertIs* calls and the developer wants a single, declarative predicate.

When NOT to use this skill

  • The query is "find by tag/text/content description only" — use ../finding-nodes-by-tag-text-content/SKILL.md.
  • The right node exists but only as a relative — use ../traversing-the-semantics-tree/SKILL.md.
  • The matcher is fine; only the assertions need rework — see ../../assertions/asserting-node-state-and-text/SKILL.md.

Prerequisites

  • androidx.compose.ui:ui-test on the test classpath. See ../../setup/configuring-test-dependencies/SKILL.md if unresolved.
  • Comfort with Modifier.semantics { … } in production code. Custom keys must be set via Modifier.semantics { customKey = value } to be matchable from tests.

Workflow

  • 1. Build matchers from the prebuilt filter library. Every prebuilt matcher lives in commonMain/.../Filters.kt. Group by signal:

    Signal Matchers File:line
    Enabled / disabled isEnabled(), isNotEnabled() Filters.kt:38-47
    Toggle (Switch, Checkbox) isToggleable(), isOn(), isOff() Filters.kt:54-70
    Selection (Tab, RadioButton) isSelectable(), isSelected(), isNotSelected() Filters.kt:77-93
    Focus isFocusable(), isNotFocusable(), isFocused(), isNotFocused() Filters.kt:100-122
    Click action hasClickAction(), hasNoClickAction() Filters.kt:129-136
    Scroll action hasScrollAction(), hasNoScrollAction(), hasScrollToIndexAction(), hasScrollToKeyAction(), hasScrollToNodeAction() Filters.kt:143-425
    Text actions (TextField) hasSetTextAction(), hasInsertTextAtCursorAction(), hasPerformImeAction(), hasImeAction(ImeAction) Filters.kt:365-392
    Focus action hasRequestFocusAction() Filters.kt:399
    Content description hasContentDescription(value, substring, ignoreCase), hasContentDescriptionExactly(vararg) Filters.kt:165-212
    Text hasText(text, substring, ignoreCase), hasTextExactly(vararg, includeEditableText=true) Filters.kt:229-293
    A11y / state metadata hasStateDescription, hasProgressBarRangeInfo, isHeading, isDialog, isPopup, isHiddenFromAccessibility, isEditable, isRoot Filters.kt:301-439
    Test tag hasTestTag(testTag) Filters.kt:326-327
    Hierarchical hasParent(matcher), hasAnyChild(matcher), hasAnySibling(matcher), hasAnyAncestor(matcher), hasAnyDescendant(matcher) Filters.kt:446-530

Read the full file on GitHub · 205 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. 3mo ago First seen · 205 lines · 240 tokens per session scan A dea52b582e69

Subscribe to this mod's changes

composing-semantics-matchers is a skill published in the GitHub repository skydoves/android-testing-skills (351 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 240 tokens to every session and 3,282 once invoked, about $0.0010 per session on Opus 5.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

composing-semantics-matchers compared with skills from other repositories

composing-semantics-matchers next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
composing-semantics-matchersskydoves/android-testing-skillsSkill3516mo agoApache-2.0A240Claude Code, Codex
android-ui-journey-testingsickn33/agentic-awesome-skillsSkill51ktodayMITA27Claude Code
android_ui_verificationsickn33/agentic-awesome-skillsSkill51ktodayMITA22Claude Code
solopi-aialipay/SoloPiSkill6.8ktodayApache-2.0A82Codex
public-transitchromium/chromiumSkill25ktodayBSD-3-ClauseA53Claude Code, Codex
eas-simulatorexpo/skillsSkill4.3ktodayMITA251Claude Code, Codex
dogfoodcallstack/agent-deviceSkill5.6ktodayMITA55Claude Code