Agent skill

Starknet JS

by starknet-io in starknet-io/starknet.js

A skill your agent uses when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types…

MITAuto-check passedDevelopment

Install Starknet JS

skills CLI
$ npx skills add starknet-io/starknet.js --skill starknet-js -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install starknet-io/starknet.js starknet-js --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/starknet-io/starknet.js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/starknet-js .claude/skills/starknet-js && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
starknet-js
GitHub stars
1.3k
Token cost
~1.2k tokens
SKILL.md length
314 words
Files
3
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types…

  • Debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects
  • SKILL.md covers Reference files, Non-negotiable rules, Quick reference and Top mistakes (from outdated…
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Encoding/decoding Cairo types (felt252

What it does

Starknet JS is an agent skill from starknet-io/starknet.js. Use when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types (felt252, u256, structs, arrays, spans, ByteArray, Option/Result/custom enums), or working with contracts, accounts, providers, transactions, fees, deployment, or events.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `calldata.md` and `interacting.md`).

It sits in Development. It works with JavaScript, TypeScript and Ethereum. The repository describes itself as: JavaScript library for Starknet. The licence is MIT.

When your agent uses it

  • Debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects
  • Encoding/decoding Cairo types (felt252
  • Option/Result/custom enums)
  • Working with contracts

Example prompts

  • “/starknet-js”

What it can do on your machine

Read from SKILL.md and the folder at commit dbe69e9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Starknet JS loads about 1.2k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 314 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from starknet-io/starknet.js at commit dbe69e9, republished under its MIT licence (© starknet-io). 314 words, ~1,229 tokens.

Download SKILL.mdSave it as .claude/skills/starknet-js/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
starknet-js
description
Use when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types (felt252, u256, structs, arrays, spans, ByteArray, Option/Result/custom enums), or working with contracts, accounts, providers, transactions, fees, deployment, or events.

starknet.js

Official JS/TS SDK for Starknet. Skill verified against starknet.js 10.8.0.

Do not trust training-data memory of starknet.js: it is typically outdated and wrong. Constructors take option objects, only V3 transactions exist (STRK fees, no maxFee). When this skill and memory disagree, the skill wins.

Layer model: Account (signs & submits) wraps RpcProvider (parses, retries) wraps RpcChannel (raw JSON-RPC).

Reference files

  • calldata.md — REQUIRED reading before encoding or decoding anything: Call/calldata construction, wire format of every Cairo type, enums (Option/Result/custom), ByteArray, string auto-detection traps, response parsing, decodeParameters.
  • interacting.md — providers, accounts, contracts, multicall, fees/tips, declare/deploy, receipts, events, RPC-version compatibility.

Non-negotiable rules

  • Only V3 transactions (INVOKE/DECLARE/DEPLOY_ACCOUNT); fees paid in STRK via resourceBounds + tip. Never suggest maxFee or V1/V2.
  • Constructors take an options object: new Account({ provider, address, signer }), new Contract({ abi, address, providerOrAccount }), new RpcProvider({ nodeUrl }).
  • Never prepend an array length to calldata arrays — the library adds it.

Quick reference

TaskAPI
Connect to nodenew RpcProvider({ nodeUrl }) — or await RpcProvider.create({ nodeUrl }) to auto-detect RPC version
Accountnew Account({ provider, address, signer: privateKey })
Contractnew Contract({ abi, address, providerOrAccount })
Readawait myContract.my_view_fn(arg1, arg2) → parsed JS value
Writeconst { transaction_hash } = await myContract.my_fn(args) then await provider.waitForTransaction(transaction_hash)
Build a CallmyContract.populate('fn', { ...args }) → { contractAddress, entrypoint, calldata }
Compile calldata (ABI)myContract.compile('fn', args) or new CallData(abi).compile('fn', args)
Compile calldata (no ABI)CallData.compile(args) — several traps, see calldata.md
Multicallawait account.execute([call1, call2])
Decode raw feltsnew CallData(abi).decodeParameters('core::…::Type', feltArray)
EventsmyContract.parseEvents(receipt), provider.getEvents({ ... })
Deployawait Contract.factory({ contract, casm, account, constructorCalldata })

Top mistakes (from outdated model knowledge)

MistakeFix
new Account(provider, address, pk) positionalOptions object (see above)
maxFee, V1/V2 transactions, ETH feesV3 only; resourceBounds from estimateInvokeFee, tip
Manually prepending array_lenNever — automatic
CallData.compile([myU256Bigint]) gives 1 feltUse cairo.uint256(n) without ABI; a plain bigint is fine only with ABI
new CairoCustomEnum({ OnlyActive: v }) without ABIWithout ABI, list ALL variants (undefined for inactive)
Expecting .res-style result objectsCairo 1 returns the value directly (bigint, object, array, enum class)

© starknet-io, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/starknet-js of starknet-io/starknet.js.

  • SKILL.md
  • calldata.md
  • interacting.md

Open the folder on GitHubat commit dbe69e9

Compare with similar skills

Starknet JS next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Starknet JS compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Starknet JS this skillstarknet-io/starknet.js1.3k—~1.2kAutomated safety check: PassMIT
Release Roundethereumjs/ethereumjs-monorepo2.8k—~2kAutomated safety check: PassNone
Update Est Fixturesethereumjs/ethereumjs-monorepo2.8k—~3.3kAutomated safety check: PassNone
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k—~2.2kAutomated safety check: PassMIT
Generate Release Notesteambit/bit18k—~2.2kAutomated safety check: PassCustom licence

Similar skills

  • Release Round

    ethereumjs/ethereumjs-monorepo

    Runs a coordinated EthereumJS npm release round in six human-gated phases — intent and readiness, CHANGELOG, version bump, publish (human executes), post-publish verification, and announcements.

    2.8k GitHub stars~2k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Update Est Fixtures

    ethereumjs/ethereumjs-monorepo

    Updates EthereumJS execution-spec test fixtures from an ethereum/execution-specs release, then (after a human merge) points the monorepo submodule, updates VM npm scripts, reports a first test run…

    2.8k GitHub stars~3.3k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub stars~2.2k tokensUpdated 29 days ago
    DevelopmentAuto-check passed
  • Generate comprehensive release notes for Bit from git commits and pull requests.

    18k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 8 days ago
    DevelopmentAuto-check passed

Categories

Questions about Starknet JS

What does Starknet JS do?

A skill your agent uses when writing or debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects or calldata, encoding/decoding Cairo types…. js.js SDK — building Call objects or calldata, encoding/decoding Cairo types (felt252, u256, structs, arrays, spans, ByteArray, Option/Result/custom enums), or working with contracts, accounts, providers, transactions, fees, deployment, or events.

When should I use Starknet JS?

Starknet JS fits situations like: debugging JavaScript/TypeScript that interacts with Starknet through the starknet.js SDK — building Call objects; encoding/decoding Cairo types (felt252; option/Result/custom enums); working with contracts.

How do I install Starknet JS in Claude Code?

Run `npx skills add starknet-io/starknet.js --skill starknet-js -a claude-code`. Or copy the skill folder (skills/starknet-js in starknet-io/starknet.js) into .claude/skills/starknet-js in your project. Claude Code loads it when a task matches its description.

How do I install Starknet JS in Codex?

Run `npx skills add starknet-io/starknet.js --skill starknet-js -a codex`. Or copy the skill folder (skills/starknet-js in starknet-io/starknet.js) into .agents/skills/starknet-js in your project. Codex loads it when a task matches its description.

Can I use Starknet JS in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add starknet-io/starknet.js --skill starknet-js -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/starknet-js, .gemini/skills/starknet-js, .github/skills/starknet-js and .opencode/skills/starknet-js in your project.

What does Starknet JS need to run?

SKILL.md names no scripts, command-line tools or credentials: Starknet JS is instructions for the agent only.

Does Starknet JS access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Starknet JS safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Starknet JS use?

Starknet JS is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Starknet JS use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Starknet JS?

Skills that share tags, products or a category with Starknet JS: Release Round (ethereumjs/ethereumjs-monorepo, 2.8k stars), Update Est Fixtures (ethereumjs/ethereumjs-monorepo, 2.8k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars) and Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Starknet JS?

starknet-io (a GitHub organization) maintains it in starknet-io/starknet.js, which has 1,253 GitHub stars. The repository was last updated on October 9, 2026.

Source: starknet-io/starknet.js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.