midnightntwrk/midnight-expert/quality-check

Claude Code and agent skill by midnightntwrk/midnight-expert

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

This skill should be used when the user asks to run linting, check code quality, run tests, or needs help with "why is biome failing", "fix lint errors", "CI is failing", "type check errors", "biome error", "vitest failing", "tsc error", "playwright failing", or "e2e tests failing". Also triggered by requests to interpret Biome output, fix tsc errors in Midnight projects, debug vitest failures with simulator stack traces, run the full pre-push suite, or understand why compact compile is failing.

Install

npx vskill@latest install midnightntwrk/midnight-expert/quality-check

SKILL.md

Run and Interpret Quality Checks

Last verified: 2026-09-17 — compact compile CLI usage and package names/versions checked against the installed toolchain (compiler 0.31.1) + npm (@openzeppelin/compact-simulator@0.3.1, runtime 0.16.0).
This skill is for running checks and fixing failures.
To set up quality tooling from scratch, use midnight-cq:quality-init.

Command Quick Reference

CheckCommandScope
Lint + format (changed)biome ci --changedFiles changed vs default branch
Lint + format (all)biome ciEntire project
Lint + format (fix)biome check --writeAuto-fix
Type checktsc --noEmitAll TS files
Contract compilecompact compile --skip-zkAll .compact files
Unit/contract testsvitest runAll test suites
E2E testsnpx playwright testDApp browser tests
Full pre-push suitebiome ci && tsc --noEmit && vitest runEverything

Run commands from the project root. If biome is not on the path, prefix with npx.

How to Read Results

Biome

Each violation uses this format:

path/to/file.ts:line:col rule/name LEVEL description

Example:

src/index.ts:12:5 style/useConst ERROR This variable is never reassigned.
  • `rule/name` — maps directly to a rule at biomejs.dev/linter/rules/<rule-name>. Open the URL for the rationale and suggested fix.
  • `LEVEL` is always ERROR in Midnight projects (no warnings in CI — see biome.json).
  • Format violations say format as the rule and show a unified diff of what Biome expects. Apply with biome check --write.
  • Exit code 1 means at least one violation. Exit code 0 means clean.
tsc --noEmit

Each error uses this format:

path/to/file.ts(line,col): error TS#### description

In Midnight projects, tsc errors frequently originate from:

  1. Stale Compact compiler output — types in managed/ are regenerated by compact compile. If .compact source changed but managed/ was not recompiled, tsc will report phantom type errors. Fix: run compact compile --skip-zk first, then re-run tsc --noEmit.
  2. Missing or wrong imports from `managed/` — the compiler emits named exports; check the generated .d.ts for the exact export name.
  3. Strict null / undefined — common when accessing ledger state that may not be initialised yet. Narrow with an explicit guard.
vitest

A failing test shows:

FAIL src/test/MyContract.test.ts
● transferOwnership › should fail when called by unauthorized
Error: Ownable: caller is not the owner
at ProxyHandler.<anonymous> (node_modules/@openzeppelin/compact-simulator/dist/...)
at ...
at MyContractSimulator.transferOwnership (src/test/simulators/MyContractSimulator.ts:42:5)
at Object.<anonymous> (src/test/MyContract.test.ts:67:7)

Reading the trace:

  • Error message — maps directly to a assert string in the .compact source. Search the contract for the literal message to find the failing assertion.
  • Simulator file + line — shows which user-friendly method triggered the circuit.
  • Test file + line — the exact expect(...) or method call that failed.
  • Ignore the deep ProxyHandler frames in node_modules — they are internal simulator machinery and carry no debugging signal.
  • A test that expected a throw but didn't get one reports Received function did not throw. Check whether the circuit path that should reject was actually reached.

Common Quick Fixes

SymptomFix
Biome format violations across many filesnpx biome check --write — rewrites all auto-fixable issues in one pass
tsc errors about types in managed/compact compile --skip-zk && npx tsc --noEmit — recompile contracts first
vitest test throws unexpected error stringSearch the .compact source for the error message; the assertion path diverged — update the test or the contract
biome ci --changed passes locally but CI failsCI runs biome ci (all files); run npx biome ci locally to reproduce
Playwright tests time out on wallet/transaction stepsIncrease timeout in playwright.config.ts for blockchain-heavy operations; default 30 s is too short for proof generation

Not For

  • Setting up quality tooling from scratch → use midnight-cq:quality-init
  • Writing new Compact contract tests → use midnight-cq:compact-testing
  • Writing new DApp E2E tests → use midnight-cq:dapp-testing

Reference Files

TopicReference
Each Biome rule explained with fix guidancereferences/biome-diagnostics.md
Common simulator errors and how to fix themreferences/test-failures.md
CI-specific debugging guidereferences/ci-troubleshooting.md

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
45
Repository forks
13
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/midnightntwrk/midnight-expert/quality-check/badge)](https://verified-skill.com/skills/midnightntwrk/midnight-expert/quality-check)

Something wrong with this skill or its page? Tell us.