midnight-verify:verify-by-type-check

Verify TypeScript SDK claims by compiling assertion files with Midnight packages.

37|9|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-verify-verify-by-type-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: midnight-verify:verify-by-type-check
Source: https://github.com/devrelaicom/midnight-expert/tree/main/plugins/midnight-verify/skills/verify-by-type-check
Command: npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-verify-verify-by-type-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill verifies TypeScript type-level claims about Midnight SDK exports and user .ts files by compiling targeted assertion files or running lightweight execution scripts, removing ambiguity about exported types and assignability without needing full runtime tests.

Core Features & Use Cases

  • Type-claim verification: Generates type-assertion files that compile only when a claim (e.g., return type, exported type, assignability) is true.
  • File-level checking and stubbing: Copies user .ts files into an isolated job workspace, stubs missing compiled outputs if necessary, and reports precise compiler errors.
  • Ledger behavioral execution mode: For certain ledger-v8 behavioral claims, runs small Node scripts to observe runtime outputs and reports them as execution evidence.
  • Use Case: Validate that deployContract returns DeployedContract, ensure a user's DApp TypeScript file type-checks with Midnight SDK, or confirm a ledger function's observed output.

Quick Start

Run a TypeScript compilation of generated assertion files against the Midnight SDK workspace to confirm the claim.

Frequently Asked Questions about midnight-verify:verify-by-type-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify TypeScript type claims for Midnight SDK exports?

Verify TypeScript type claims by compiling generated assertion files against installed @midnight-ntwrk packages using tsc --noEmit. This approach removes ambiguity about exported types and assignability without requiring full runtime tests.

Can I type-check my own DApp TypeScript files against the Midnight SDK?

Yes, you can type-check custom DApp files by copying them into an isolated job workspace. The Skill stubs missing compiled outputs if necessary and reports precise compiler errors returned by tsc.

How does behavioral execution work for ledger type claims in Midnight?

Behavioral execution for ledger-v8 claims works by running small Node scripts to observe runtime outputs. These outputs are captured and reported as execution evidence to confirm the ledger function's behavior.

What do I need to prepare before validating Midnight SDK type assertions?

You need to prepare an isolated workspace with the required @midnight-ntwrk packages installed. This environment allows the Skill to run tsc --noEmit or execute ledger scripts for behavioral evidence.

Why use type assertion files instead of runtime tests for Midnight SDK verification?

Type assertion files compile only when a specific claim is true, such as a return type matching DeployedContract. This provides precise, file-level type checking without the overhead of full runtime test suites.