test-ts

test-ts is a command for Claude Code from solanabr/solana-ai-kit. It costs 17 tokens per session (960 once invoked), scanned A, original, MIT.

A command for running TypeScript tests for Solana applications and Anchor programs. Anchor is a framework for building and testing Solana smart contracts.

In plain words
What is it for?
Use it to detect common test setups, build and test Anchor programs, run selected test files, skip rebuilds, or enable detailed test logs.
Why use it?
It helps developers choose and run the relevant tests for their project, including frontend, integration, and blockchain-program tests.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to detect common test setups, build and test Anchor programs, run selected test files, skip rebuilds, or enable detailed test logs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/solanabr/solana-ai-kit/test-ts
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.

Clone the repo
git clone --depth 1 https://github.com/solanabr/solana-ai-kit

Made for: Claude Code.

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 test-ts

README.md
[![agentmods](https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/test-ts/github.svg)](https://agentmods.dev/commands/solanabr/solana-ai-kit/test-ts)
Your own site
<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/test-ts"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/test-ts/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 test-ts

Your own site · 80×15
<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/test-ts"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/test-ts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 960 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.00017 $0.00960
Opus 5.5 $0.00007 $0.00384
Sonnet 5.5 $0.00003 $0.00192
Haiku 4.5 $0.00002 $0.00096

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

Security

Grade A, and why

test-ts 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 25d 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.

.claude/commands/test-ts.md · 31 lines

How it starts

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

Run the project's TypeScript suites and report each failure with its cause. $ARGUMENTS narrows the run (a file, test name pattern, or workspace package); empty means everything.

Harness setup (Kit LiteSVM plugin, embedded Surfpool under vitest): testing.md. Client and wallet patterns: frontend.md.

Steps

  1. If program code changed, rebuild it (NO_DNA=1 anchor build); if instructions or accounts changed, regenerate the client with /generate-idl-client. A stale IDL or client fails as discriminator or account-count errors.
  2. Run the suite that fits:
    • Anchor TS tests (tests/*.ts). Anchor 1.x scaffolds them only with anchor init --test-template mocha; its default template is Rust LiteSVM (see /test-rust). NO_DNA=1 anchor test builds, starts Surfpool, deploys, and runs [scripts] test from Anchor.toml.
    • One test at a time: keep a surfnet up (anchor test --detach or anchor localnet), then anchor run test -- --grep <pattern> (-t for jest; keep the pattern free of spaces). anchor run exports the ANCHOR_PROVIDER_URL and ANCHOR_WALLET that AnchorProvider.env() reads. Typing the wallet path yourself trips the kit's secrets hook, which blocks commands naming ~/.config/solana/id.json.
    • The Anchor TS package is @anchor-lang/core. Imports from @coral-xyz/anchor, including deep dist/cjs/idl imports, are pre-1.0 and need updating.
    • Kit program tests: @solana/kit-plugin-litesvm for in-process tests, @solana/surfpool/kit for an embedded surfnet per suite with client.cheatcodes. Run Surfpool-backed files serially (vitest fileParallelism: false or a separate config).
    • Frontend: the package's test script (vitest or jest). E2E: npx playwright test, or drive the running app through the Playwright MCP if it is configured (/setup-mcp adds it). Wallet extensions do not load in headless browsers; register a test Wallet Standard wallet backed by a local keypair behind a test-only flag, against localnet or devnet.
  3. Rerun only the failing file or test name.

Read the full file on GitHub · 31 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. 25d ago Changed · -374 lines · +5 tokens per session d52af3638aac
  2. 26d ago Changed 065d19e7ccfc
  3. 1mo ago First seen · 405 lines · 12 tokens per session scan A b33d18c46ea4

Subscribe to this mod's changes

test-ts is a command published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 26d ago), licensed MIT. It adds 17 tokens to every session and 960 once invoked, about $0.0001 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.