designmatch

A setup command for adding designmatch checks to a React Native app from a Claude Design link or local design files. React Native is a framework for building mobile apps with JavaScript and native components.

In plain words
What is it for?
Checking that a new mobile screen matches its design, copying the visual-check helper, saving the reference source, and preparing the next command to run.
Why use it?
It prepares the project files and settings needed to compare an app screen with its design reference.

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/randomittin/heimdall/designmatch
Clone the repo
git clone --depth 1 https://github.com/randomittin/heimdall
Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,252 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.00079 $0.01252
Opus 5 $0.00039 $0.00626
Sonnet 5 $0.00016 $0.00250
Haiku 4.5 $0.00008 $0.00125

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

Security

Grade A, and why

designmatch 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/designmatch.md · 98 lines

How it starts

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

/hmd:designmatch — bootstrap designmatch in an RN app

What this command does

Auto-runs designmatch init <canonical-source> --app-dir <pwd>:

  1. Validates the current directory looks like a React Native app (package.json with react-native dep).
  2. Copies skills/designmatch/assets/visual-qa.ts into the app at a sensible path (src/lib/visual-qa.ts, falling back to src/utils/, src/, app/, or root).
  3. Writes default .designmatch/state.vqa.json (seeds user/recipient/bonus/transfer per the skill spec).
  4. Registers the canonical source in .designmatch/config.json:
    • HTTPS URL → stored for lazy Playwright fetch
    • Local dir → copied wholesale to .designmatch/canonical/
    • Local HTML file → copied as the canonical entry (with sibling jsx/css/png/svg)
  5. Updates .gitignore (idempotent) to exclude regenerated artifacts (.designmatch/canonical/, .designmatch/screens/).
  6. Prints the wiring snippet for App.tsx and the next-step command.

How to invoke

The user types:

/hmd:designmatch <claude-design-url-or-path>

Examples:

/hmd:designmatch https://api.anthropic.com/v1/design/h/BwHAOZU59KCkBa9UQk015Q?open_file=Wallet+Web.html
/hmd:designmatch ./design-bundle/
/hmd:designmatch ./App.html

Optional flags after the source:

  • --app-dir <path> — RN project root (default: cwd)
  • --target <rel> — explicit destination for visual-qa.ts (default: auto-detect)
  • --force — overwrite existing files
  • --no-fetch — skip auto-fetching URL canonicals (default: auto-fetch on)
  • --no-port-all — skip the bulk port step (default: port-all on)
  • --headed — launch Chromium visibly for interactive auth when fetching

What the orchestrator should do

URL in, ready-to-translate out. The default one-shot is:

designmatch init "<source>" --app-dir "$PWD" --port-all

This runs the full pipeline:

  1. App-side: copies visual-qa.ts (→ src/lib/visual-qa.ts by default), writes .designmatch/state.vqa.json, updates .gitignore.
  2. Fetch (if URL): Playwright downloads the bundle to .designmatch/canonical/ and flips config from urllocal-dir.
  3. Port-all: discovers screen-*.jsx|tsx / *Screen.jsx|tsx in the bundle, emits each to src/screens/<Name>.tsx preceded by the TRANSLATION GUIDE.
  4. Wiring snippet: printed for App.tsx.

Read the full file on GitHub · 98 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 · 98 lines · 79 tokens per session scan A 2cd365d957e0

Subscribe to this mod's changes

designmatch is a command published in the GitHub repository randomittin/heimdall (5 stars, last pushed 11d ago), licensed MIT. It adds 79 tokens to every session and 1,252 once invoked, about $0.0004 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.