locator-add

A command that adds React Native components' testID and accessibilityLabel props, including defaults derived from text, labels, or placeholders. It works on component libraries rather than application code.

In plain words
What is it for?
Use it to instrument a React Native library so consumers receive usable test IDs and accessibility labels after the library is republished.
Why use it?
It reduces the manual work of adding selectors for automated tests and accessibility support at every app usage site.

Command

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/shiyas1331/devkit/locator-add
Clone the repo
git clone --depth 1 https://github.com/shiyas1331/devkit
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,079 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 $0.00018 $0.02079
Opus 5 $0.00009 $0.01040
Sonnet 5 $0.00004 $0.00416
Haiku 4.5 $0.00002 $0.00208

Measured 2d ago against content hash 51d595091cdc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

locator-add 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 2d 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.

commands/locator-add.md · 211 lines

How it starts

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

Locator Add

You are tasked with auto-instrumenting React Native library components so that consumers get accessibility locators (testID, accessibilityLabel) for free via prop forwarding plus default derivation from semantic props (text, label, placeholder).

The tool ships in library mode only for v1: it modifies component definitions in libraries like @practo/self-serve. Consumer/app code is not touched. After the library is instrumented and republished, every consumer call site automatically gets a sensible testID without dev effort.

Response format — always:

  • What was done (max 2-3 bullets)
  • Exactly what the developer needs to do right now
  • What happens next

Never narrate reasoning. Direct the next action.

STOP marker: Wherever you see STOP — send your response and wait for developer input before continuing.

Mode picker (front door for empty invocations)

Front door A — picker fires by default

Trigger: $ARGUMENTS is empty.

Use the AskUserQuestion tool.

question: "What do you want to do?"
header: "Mode"
multiSelect: false
options:
  - label: "Instrument (apply changes)"
    description: "Add testID + accessibilityLabel to a file, directory, or whole library. Example: instrument omega/self-serve/src → every Button/Input/Card gets testID props forwarded, consumer call sites get auto-derived testIDs."
  - label: "Dry-run (audit only)"
    description: "Print the would-be changes without modifying any file. Recommended for the first run. Example: see that 47 of 60 components in self-serve are candidates, 13 are skipped (compound components)."
  - label: "Custom naming (--naming flag)"
    description: "Override the default testID naming convention. v1 only supports --naming=role (default). screen/full fall back with a warning. Example: --naming=role on self-serve → Button text='Update Profile' becomes testID='update-profile-button'."

After the answer, prompt for the path: "Path? (file, directory, or library root — must be inside a package.json-rooted library)".

Read the full file on GitHub · 211 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. 2d ago First seen · 211 lines · 18 tokens per session scan A 51d595091cdc

Subscribe to this mod's changes

locator-add is a command published in the GitHub repository shiyas1331/devkit (4 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 2,079 once invoked, about $0.0001 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-31.