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.
npx skills add mzf11125/midnight_agent_skills --skill midnight-apigit clone --depth 1 https://github.com/mzf11125/midnight_agent_skillsWrote 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.
[](https://agentmods.dev/skills/mzf11125/midnight_agent_skills/midnight-api)<a href="https://agentmods.dev/skills/mzf11125/midnight_agent_skills/midnight-api"><img src="https://agentmods.dev/badge/skills/mzf11125/midnight_agent_skills/midnight-api/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.
<a href="https://agentmods.dev/skills/mzf11125/midnight_agent_skills/midnight-api"><img src="https://agentmods.dev/badge/skills/mzf11125/midnight_agent_skills/midnight-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00104 | $0.03786 |
| Opus 5 | $0.00052 | $0.01893 |
| Sonnet 5 | $0.00021 | $0.00757 |
| Haiku 4.5 | $0.00010 | $0.00379 |
Grade A, and why
midnight-api scanned grade A with 1 finding 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 9d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const state = await LedgerState.fetch(contractAddress); How it starts
The opening of the file, as written. The whole thing — 590 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Midnight API Integration (v8.0+)
Complete guide to integrating Midnight Network APIs for building privacy-preserving decentralized applications.
API Ecosystem Overview
Midnight provides multiple specialized APIs:
| API | Package | Version | Purpose |
|---|---|---|---|
| Midnight.js | @midnight-ntwrk/midnight-js |
4.0.4 | Complete TypeScript SDK |
| Compact Runtime | @midnight-ntwrk/compact-runtime |
0.16.0 | Execute contracts, generate ZK proofs |
| DApp Connector | @midnight-ntwrk/dapp-connector-api |
4.0.1 | Connect to wallets |
| Ledger | @midnight/ledger |
8.0.3 | Blockchain transactions |
| Wallet SDK | @midnight-ntwrk/wallet-sdk-facade |
3.0.0 | Unified wallet operations, key management, transfers |
| Wallet API | Various | Latest | Wallet operations |
Quick Start
Install Dependencies
npm install @midnight-ntwrk/midnight-js
npm install @midnight-ntwrk/dapp-connector-api
npm install @midnight-ntwrk/compact-runtime
npm install @midnight/ledger
npm install @midnight-ntwrk/wallet-sdk-facade
Basic DApp Setup
import { MidnightProvider } from '@midnight-ntwrk/midnight-js';
import { DAppConnector } from '@midnight-ntwrk/dapp-connector-api';
// Connect to Midnight
const connect = async () => {
// Check for injected wallet
if (typeof window !== 'undefined' && window.midnight) {
const provider = new MidnightProvider(window.midnight);
await provider.ready;
return provider;
}
throw new Error('Midnight wallet not found');
};
Core APIs
1. Midnight.js SDK (v4.0.4)
Complete JavaScript/TypeScript SDK for building DApps.
import {
MidnightProvider, // Main provider
Wallet, // Wallet connection
Contract, // Contract instance
Transaction, // Transaction builder
findById, // Indexer queries
} from '@midnight-ntwrk/midnight-js';
// Network configuration (REQUIRED)
const network = 'preprod'; // or 'testnet-02', 'mainnet'
// Initialize provider
const provider = await MidnightProvider.fetch({ network });
// Connect wallet
const wallet = await provider.wallet();
// Or use DApp connector
const connector = new DAppConnector();
await connector.ready;
What ships with it
23 files 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.
- references/address-formats.md 6.5 KB
- references/api-examples.md 14 KB
- references/authentication-patterns.md 12 KB
- references/compact-runtime-api.md 13 KB
- references/contract-deployment.md 11 KB
- references/dapp-connector-api.md 13 KB
- references/error-catalog.md 12 KB
- references/error-codes.md 16 KB
- references/infrastructure.md 3.3 KB
- references/integration-patterns.md 22 KB
- references/ledger-api.md 14 KB
- references/network-configuration.md 9.8 KB
- references/quality-pipeline.md 6.7 KB
- references/testing-guide.md 16 KB
- references/verification-methods.md 6.5 KB
- references/wallet-api.md 6.1 KB
- references/zswap-api.md 13 KB
- scripts/deploy-contract.py 1.2 KB runs code
- scripts/generate-api-client.py 1.5 KB runs code
- scripts/init-dapp-project.py 1.8 KB runs code
- scripts/query-blockchain.py 1.1 KB runs code
- scripts/test-wallet-connection.py 484 B runs code
- skill.json 190 B
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.
- 9d ago First seen · 590 lines · 104 tokens per session scan A b8554eeb5f80
midnight-api is a skill published in the GitHub repository mzf11125/midnight_agent_skills (6 stars, last pushed 2mo ago), licensed MIT. It adds 104 tokens to every session and 3,786 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
subgraph-development-guide
Guide to building blockchain data indexes with The Graph — subgraph architecture, schema design, mapping handlers, deployment, and querying. Covers GraphQL APIs for DEX data, token transfers, and DeFi protocol events. Use when explaining blockchain indexing or building custom data pipelines.
chainlink-oracle-guide
How Chainlink oracle price feeds work — architecture, reading feeds on-chain, available pairs, the aggregator model, and oracle security. Covers how DeFi protocols (Aave, Sperax, Compound) rely on Chainlink for accurate pricing. Use when explaining oracles, price feeds, or DeFi infrastructure.
web3auth-integration-guide
Guide to integrating Web3Auth for social login in Web3 dApps. Covers email, Google, Apple, Discord, and Twitter login flows. MPC key management, session handling, RainbowKit integration, and migration from traditional wallet-only flows. Zero-friction onboarding.
migrate-to-portal
Migrate an existing Squid SDK indexer (EVM or Solana) off the v2 gateway and onto the Portal data source. Covers the package swap (@subsquid/evm-processor → @subsquid/evm-stream + @subsquid/evm-objects + @subsquid/batch-processor for EVM; @subsquid/solana-stream@^0.x → ^1.x for Solana), the API/type shape changes, and…
portal
Query blockchain data across 130+ networks with SQD Portal, including EVM, Solana, Substrate, Bitcoin, Tron, and Hyperliquid, and choose the right execution path: Portal MCP for bounded answers, Portal Stream API/curl for raw exports, or Pipes/Squid for durable pipelines.
quicknode-skill
Quicknode blockchain infrastructure for 80+ chains: Core RPC API, Streams, Webhooks, Blazar WSS, Solana gRPC, HyperCore gRPC, SQL Explorer, Metaplex DAS API, Blockbook, Ordinals & Runes API, Swap API, x402, MPP, Agent Subscriptions, CLI, and MCP. Use for any Quicknode product, blockchain data access, or wallet-paid…