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.5 | $0.00042 | $0.01514 |
| Sonnet 5.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 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.
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.
- 2mo 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 (5 stars, last pushed 4mo ago), licensed MIT. It adds 104 tokens to every session and 3,786 once invoked, about $0.0004 per session on Opus 5.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.
midnight-api compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| midnight-apimzf11125/midnight_agent_skills | Skill | 5 | 4mo ago | MIT | A | 104 | Claude Code, Codex |
| portalsubsquid-labs/portal-mcp-server | Skill | 2 | 1mo ago | MIT | A | 64 | Claude Code |
| migrate-to-portalsubsquid-labs/portal-mcp-server | Skill | 2 | 1mo ago | MIT | A | 200 | Claude Code |
| quicknode-skillquiknode-labs/blockchain-skills | Skill | 19 | 2mo ago | MIT | B | 93 | Claude Code, Codex |
| solana-rpcVo1ganin/crypto-claude-skills | Skill | 1 | 1mo ago | MIT | A | 195 | Claude Code, Codex |
| emblem-aiEmblemCompany/Agent-skills | Skill | 12 | 5mo ago | MIT | A | 100 | Claude Code |
| Développer une interface Web complète pour Ganache (Full-stack)ECNU-ICALK/AutoSkill | Skill | 610 | 6mo ago | none | A | 80 | Claude Code, Codex |