midnight-sdk-guide

midnight-sdk-guide is a skill for Claude Code, Codex from UvRoxx/midnight-agent-skills. It costs 56 tokens per session (1,761 once invoked), scanned A, original, MIT.

A reference guide for connecting TypeScript applications to Midnight, a platform for building privacy-focused blockchain applications.

In plain words
What is it for?
Use it when building a Midnight frontend, connecting the Lace wallet, deploying or calling contracts, handling SDK errors, or creating transaction flows.
Why use it?
It gives developers the relevant SDK packages, types, and examples in one place instead of requiring them to piece together integration details.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building a Midnight frontend, connecting the Lace wallet, deploying or calling contracts, handling SDK errors, or creating transaction flows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uvroxx/midnight-agent-skills/midnight-sdk-guide
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.

Any agent
npx skills add UvRoxx/midnight-agent-skills --skill midnight-sdk-guide
Clone the repo
git clone --depth 1 https://github.com/UvRoxx/midnight-agent-skills

Made for: Claude Code, Codex.

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 midnight-sdk-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/uvroxx/midnight-agent-skills/midnight-sdk-guide/github.svg)](https://agentmods.dev/skills/uvroxx/midnight-agent-skills/midnight-sdk-guide)
Your own site
<a href="https://agentmods.dev/skills/uvroxx/midnight-agent-skills/midnight-sdk-guide"><img src="https://agentmods.dev/badge/skills/uvroxx/midnight-agent-skills/midnight-sdk-guide/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 midnight-sdk-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/uvroxx/midnight-agent-skills/midnight-sdk-guide"><img src="https://agentmods.dev/badge/skills/uvroxx/midnight-agent-skills/midnight-sdk-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,761 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.00056 $0.01761
Opus 5.5 $0.00022 $0.00704
Sonnet 5.5 $0.00011 $0.00352
Haiku 4.5 $0.00006 $0.00176

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

Security

Grade A, and why

midnight-sdk-guide 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 2mo 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.

skills/midnight-sdk-guide/SKILL.md · 331 lines

How it starts

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

Midnight TypeScript SDK Quick Reference

Guide for integrating Midnight contracts with TypeScript applications.

When to Use

Reference this guide when:

  • Building a frontend for a Midnight dApp
  • Connecting the Lace wallet
  • Deploying or calling contracts from TypeScript
  • Handling errors from the SDK
  • Building transaction flows

Installation

npm install @midnight-ntwrk/midnight-js-contracts

Core Types

Contract Deployment

import { deployContract, ContractDeployment } from '@midnight-ntwrk/midnight-js-contracts';

const deployment: ContractDeployment = await deployContract({
  contract: compiledContract,
  privateState: initialPrivateState,
  args: constructorArgs,
});

const { contractAddress, initialState } = deployment;

Contract Interaction

import { callContract } from '@midnight-ntwrk/midnight-js-contracts';

// Call a circuit
const result = await callContract({
  contractAddress,
  circuitName: 'increment',
  args: [amount],
  privateState: currentPrivateState,
});

// Result contains new state and return value
const { newPrivateState, returnValue, proof } = result;

Providers

import {
  MidnightProvider,
  createMidnightProvider
} from '@midnight-ntwrk/midnight-js-contracts';

const provider = await createMidnightProvider({
  indexer: 'https://indexer.testnet.midnight.network',
  node: 'https://node.testnet.midnight.network',
  proofServer: 'https://prover.testnet.midnight.network',
});

State Management

interface ContractState<T> {
  publicState: PublicState;
  privateState: T;
}

// Subscribe to state changes
provider.subscribeToContract(contractAddress, (state) => {
  console.log('New state:', state);
});

Transaction Building

import { buildTransaction } from '@midnight-ntwrk/midnight-js-contracts';

const tx = await buildTransaction({
  contractAddress,
  circuitName: 'transfer',
  args: [recipient, amount],
  privateState,
});

// Sign and submit
const signedTx = await wallet.signTransaction(tx);
const txHash = await provider.submitTransaction(signedTx);

Read the full file on GitHub · 331 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 331 lines · 56 tokens per session scan A cb5c128f4579

Subscribe to this mod's changes

midnight-sdk-guide is a skill published in the GitHub repository UvRoxx/midnight-agent-skills (9 stars, last pushed 7mo ago), licensed MIT. It adds 56 tokens to every session and 1,761 once invoked, about $0.0002 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-31.

Related

midnight-sdk-guide compared with skills from other repositories

midnight-sdk-guide next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
midnight-sdk-guideUvRoxx/midnight-agent-skillsSkill97mo agoMITA56Claude Code, Codex
midnight-dapp-devmzf11125/midnight_agent_skillsSkill54mo agoMITA374Claude Code, Codex
midnight-compactmzf11125/midnight_agent_skillsSkill54mo agoMITA91Claude Code, Codex
midnight-apimzf11125/midnight_agent_skillsSkill54mo agoMITA104Claude Code, Codex
midnight-conceptsmzf11125/midnight_agent_skillsSkill54mo agoMITA76Claude Code, Codex
midnight-networkmzf11125/midnight_agent_skillsSkill54mo agoMITA80Claude Code, Codex
midnight-walletmzf11125/midnight_agent_skillsSkill54mo agoMITB287Claude Code, Codex