starknet.js AGENTS.md

starknet.js AGENTS.md is an instructions file for Codex, OpenCode from starknet-io/starknet.js. It costs 1,748 tokens per session, scanned A, original, MIT.

Repository instructions for starknet.js, a JavaScript and TypeScript software library for building applications on Starknet. They describe setup, the project structure, coding conventions, and how to verify changes with tests and other checks.

In plain words
What is it for?
They help agents install the project, understand its source layout, run unit tests, build and type-check the library, and follow its conventions.
Why use it?
They give coding agents the project-specific information needed to make changes safely and avoid guessing about supported tools or public APIs. They also explain which checks can run without live external services.

Instructions file for CodexOpenCode

About the project

starknet.js is a JavaScript library for interacting with Starknet, a layer-2 blockchain network that uses zero-knowledge technologies and connects with Ethereum. JavaScript developers use it to build applications that work with Starknet. Its catalogue skill provides coding agents with current guidance for using the library.

starknet-io/starknet.js · 1,256 stars · on GitHub

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 instructions/starknet-io/starknet.js/agents-md
Clone the repo
git clone --depth 1 https://github.com/starknet-io/starknet.js

Made for: Codex, OpenCode.

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 starknet.js AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/starknet-io/starknet.js/agents-md.svg)](https://agentmods.dev/instructions/starknet-io/starknet.js/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/starknet-io/starknet.js/agents-md"><img src="https://agentmods.dev/badge/instructions/starknet-io/starknet.js/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,748 This file is loaded in full into every session.
When invoked 1,748 The same file — it is already loaded in full.
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.01748 $0.01748
Opus 5 $0.00874 $0.00874
Sonnet 5 $0.00350 $0.00350
Haiku 4.5 $0.00175 $0.00175

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

Security

Grade A, and why

starknet.js AGENTS.md 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 5d 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.

AGENTS.md · 110 lines

How it starts

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

AGENTS.md

Guidance for AI coding agents (Claude Code, Cursor, Copilot, etc.) working in this repository. Humans: see CONTRIBUTING.md — this file is a condensed, agent-oriented companion to it, not a replacement.

starknet.js is the JavaScript/TypeScript SDK for Starknet. It is a published npm library (starknet), so the public API surface is a contract — treat breaking changes deliberately (see Conventions).

Setup & core commands

  • Node >=22 is required. Install with npm install.
  • npm run build — full build via tsup (CJS + ESM + IIFE + .d.ts). Required before publishing-related tasks; not needed just to run unit tests.
  • npm run lint — ESLint (airbnb + prettier), autofix on.
  • npm run ts:check — type-check only (tsc --noEmit).
  • npm run format — Prettier write.

Verifying your changes (read this before running tests)

There are two kinds of tests, and the default command needs live infrastructure:

  • Unit tests — no infra needed. Use this loop.

    npm run test:unit                              # all pure unit tests (~1400 tests, ~20s)
    npm run test:unit -- __tests__/utils/uint256.test.ts   # a single file
    

    This uses jest.unit.config.ts, which runs the pure suites under __tests__/utils/ and skips the devnet-connecting global setup. Use it to verify changes to src/utils/** and other logic with unit coverage.

  • Integration tests — require a running Starknet devnet or RPC node. npm test, npm run test:coverage, and npm run test:watch run the full suite via jest.config.ts, whose globalSetup throws if it cannot reach a devnet (http://127.0.0.1:5050) and no TEST_ACCOUNT_* env vars are set. The root-level __tests__/*.test.ts suites (account, contract, provider, paymaster, wallet…) exercise real RPC calls. To run them, start a devnet (Docker: shardlabs/starknet-devnet-rs) or point at a node via TEST_RPC_URL + TEST_ACCOUNT_ADDRESS + TEST_ACCOUNT_PRIVATE_KEY (see CONTRIBUTING.md). Two suites under __tests__/utils/ (ethSigner, batch) also need a node and are excluded from test:unit.

Read the full file on GitHub · 110 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. 5d ago First seen · 110 lines · 1,748 tokens per session scan A 1d54ed746150

Subscribe to this mod's changes

starknet.js AGENTS.md is an instructions file published in the GitHub repository starknet-io/starknet.js (1,256 stars, last pushed yesterday), licensed MIT. It adds 1,748 tokens to every session, about $0.0087 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-30.