nds-test

A test command for the KantoReborn Pokémon game running in a Nintendo DS emulator. It follows verified game-specific instructions before using emulator tools.

In plain words
What is it for?
Use it to detect the game state, run built-in or custom tests, inspect flags and memory, and save state before risky actions.
Why use it?
It reduces the risk of using wrong memory addresses, touch positions, or game actions during testing.

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/intellegix/intellegix-code-agent-toolkit/nds-test
Clone the repo
git clone --depth 1 https://github.com/intellegix/intellegix-code-agent-toolkit
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 1,816 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.00000 $0.01816
Opus 5 $0.00000 $0.00908
Sonnet 5 $0.00000 $0.00363
Haiku 4.5 $0.00000 $0.00182

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

Security

Grade A, and why

nds-test 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/nds-test.md · 140 lines

How it starts

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

/nds-test -- NDS Emulator Test Runner for HGSS KantoReborn

MANDATORY FIRST STEP

Read the knowledge base BEFORE any MCP tool call:

Read file: C:\dev\desmume-mcp-server\docs\HGSS_KNOWLEDGE.md

This contains verified memory addresses, frame budgets, touch blacklist, and known limitations. Every claim in that file is verified against ROM source and E2E tests.

6 ANTI-HALLUCINATION RULES

  1. ALWAYS call nds_detect_state before any action -- never assume the game state
  2. NEVER guess touch coordinates -- only use coordinates from HGSS_KNOWLEDGE.md
  3. NEVER navigate the intro manually -- always use hgss_new_game_to_overworld
  4. PREFER memory reads over screenshots -- hgss_verify_flags, nds_read_memory are faster and more reliable
  5. USE structured test plans for repeatable scenarios -- nds_run_builtin_test or nds_run_test
  6. SAVE STATE before risky actions -- nds_save_state before battles or transitions

TOOL HIERARCHY (prefer higher-level tools)

Priority Tool When to Use
1 (best) nds_run_builtin_test Run a named test suite: boot, new_game_intro, flag_readwrite, full_kanto, full_kanto_real
2 nds_run_test Run a custom JSON test plan
3 hgss_run_recipe Run a named battle recipe (BROCK, MISTY, etc.) -- handles full lifecycle
3 hgss_real_battle State-aware battle with BATTLE detection + win_flag reading
3 hgss_new_game_to_overworld Start fresh game and reach overworld (story_state >= 3)
3 hgss_advance_dialogue Press A through dialogue until script ends
3 hgss_walk Walk N steps in a direction (requires OVERWORLD state)
3 hgss_interact Press A to interact with NPC/object (requires OVERWORLD)
3 hgss_battle_spam A-spam through a battle (any state, frame-count timeout, legacy)
3 hgss_battle_with_verify Composite: buff -> walk -> battle -> verify (supports real_battle mode)
3 hgss_buff_party Discover party, inject 999 stats for automated battle testing
3 hgss_verify_flags Batch flag verification (returns PASS/FAIL per flag)
3 hgss_read_map_id Read current map ID via FieldSystem discovery
3 hgss_read_location Read full Location (mapId, x, y, direction)
3 hgss_save_checkpoint / hgss_load_checkpoint Named save states for test checkpoints
4 nds_detect_state Check current game state (OVERWORLD, DIALOGUE, BATTLE, PRE_INIT)
5 (last) nds_press_button, nds_advance_frames, nds_touch_screen Raw inputs -- LAST RESORT only

Read the full file on GitHub · 140 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 · 140 lines · 0 tokens per session scan A 0aae40f1f945

Subscribe to this mod's changes

nds-test is a command published in the GitHub repository intellegix/intellegix-code-agent-toolkit (57 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,816 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.