midnightntwrk/midnight-expert/quality-check
Claude Code and agent skill by midnightntwrk/midnight-expert
- community
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-checkSKILL.md
Run and Interpret Quality Checks
Last verified: 2026-09-17 —compact compileCLI 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, usemidnight-cq:quality-init.
Command Quick Reference
| Check | Command | Scope | |
|---|---|---|---|
| Lint + format (changed) | biome ci --changed | Files changed vs default branch | |
| Lint + format (all) | biome ci | Entire project | |
| Lint + format (fix) | biome check --write | Auto-fix | |
| Type check | tsc --noEmit | All TS files | |
| Contract compile | compact compile --skip-zk | All .compact files | |
| Unit/contract tests | vitest run | All test suites | |
| E2E tests | npx playwright test | DApp browser tests | |
| Full pre-push suite | biome ci && tsc --noEmit && vitest run | Everything |
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:
Example:
- `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
ERRORin Midnight projects (no warnings in CI — seebiome.json). - Format violations say
formatas the rule and show a unified diff of what Biome expects. Apply withbiome check --write. - Exit code 1 means at least one violation. Exit code 0 means clean.
tsc --noEmit
Each error uses this format:
In Midnight projects, tsc errors frequently originate from:
- Stale Compact compiler output — types in
managed/are regenerated bycompact compile. If.compactsource changed butmanaged/was not recompiled, tsc will report phantom type errors. Fix: runcompact compile --skip-zkfirst, then re-runtsc --noEmit. - Missing or wrong imports from `managed/` — the compiler emits named exports; check the generated
.d.tsfor the exact export name. - Strict null / undefined — common when accessing ledger state that may not be initialised yet. Narrow with an explicit guard.
vitest
A failing test shows:
Reading the trace:
- Error message — maps directly to a
assertstring in the.compactsource. 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
ProxyHandlerframes innode_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
| Symptom | Fix | |
|---|---|---|
| Biome format violations across many files | npx 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 string | Search the .compact source for the error message; the assertion path diverged — update the test or the contract | |
biome ci --changed passes locally but CI fails | CI runs biome ci (all files); run npx biome ci locally to reproduce | |
| Playwright tests time out on wallet/transaction steps | Increase 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
| Topic | Reference | |
|---|---|---|
| Each Biome rule explained with fix guidance | references/biome-diagnostics.md | |
| Common simulator errors and how to fix them | references/test-failures.md | |
| CI-specific debugging guide | references/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
- SKILL.md in the repositoryCheckingplugins/midnight-cq/skills/quality-check/SKILL.md
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
[](https://verified-skill.com/skills/midnightntwrk/midnight-expert/quality-check)