midnightntwrk/midnight-expert/quality-init

Claude Code and agent skill by midnightntwrk/midnight-expert

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

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

This skill should be used when the user asks to set up linting, add code quality tooling, configure biome, init project quality, initialize code quality, add CI workflows, add GitHub Actions, set up git hooks, add pre-commit hooks, add testing, add Vitest, add Playwright, or configure formatter for a Midnight Network project.

Install

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

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Initialize Code Quality Tooling

Last verified: 2026-09-17 — scaffolded dependency names/versions checked against npm (@openzeppelin/compact-simulator@0.3.1); compiler installed via the compact toolchain, not npm.
Hard rule: Biome exclusively. Never install ESLint or Prettier alongside Biome.
If either already exists in the project, migrate and remove them before scaffolding anything else.

This skill guides you through setting up all code quality tooling for a Midnight Network project. Follow the 3-step flow below in order: detect the project type, handle any conflicting tools, then scaffold the appropriate configuration.

3-Step Flow

Step 1 — Detect Project Type

Scan the project root to determine what kind of project this is. Detection is not mutually exclusive — a project can be both a Compact project and a frontend DApp.

SignalMeaning
Any .compact file existsCompact contract project → add Vitest with simulator
package.json contains react, next, vue, or svelte depFrontend / DApp → add Playwright E2E
.eslintrc.* or .prettierrc.* (any extension) existsConflict detected → migrate before scaffolding
biome.json already existsPartial setup → extend rather than overwrite

Check all signals before proceeding. Record findings; they drive Step 3.

Step 2 — Detect and Migrate Conflicts

If .eslintrc.* or .prettierrc.* files are present, migrate them before creating any new config.

ESLint migration:

bash
npx @biomejs/biome migrate eslint --write --include-inspired

Prettier migration:

bash
npx @biomejs/biome migrate prettier --write

After migration, remove:

  • All ESLint packages: eslint, @typescript-eslint/*, eslint-plugin-*, eslint-config-*
  • All Prettier packages: prettier, prettier-plugin-*
  • Config files: .eslintrc.*, .eslintignore, .prettierrc.*, .prettierignore
  • Remove scripts referencing eslint or prettier from package.json

Migration limitations — review manually after running:

LimitationAction
YAML config files (.eslintrc.yaml, .eslintrc.yml)Migrate by hand; the CLI does not parse YAML
ESLint rule option gapsSome rules have no Biome equivalent — log them and close the gap with code review
eslint-disable commentsConvert to biome-ignore or remove if the rule no longer applies
Prettier overrides per file globReproduce in biome.json overrides array manually

If no conflicts are found, skip to Step 3.

Step 3 — Scaffold Based on Detection

Always scaffold the following regardless of project type:

ToolPurpose
biome.jsonLinting, formatting, and import sorting — single source of truth
.editorconfigCross-editor baseline (indent size, line endings, charset)
Husky + pre-commit hookFast check on staged files: biome ci --changed
Husky + pre-push hookFull check: biome ci && tsc --noEmit && vitest run
.github/workflows/checks.ymlCI — Biome only, runs on every push and PR
.github/workflows/test.ymlCI — compile + typecheck + tests, runs on PR and main

Scaffold conditionally based on detection:

ConditionAdditional Scaffolding
.compact file detectedVitest + @openzeppelin/compact-simulator for contract unit tests
Frontend / DApp detectedPlaywright (headless only — never interactive) for E2E tests

Biome Configuration

Use the OpenZeppelin compact-contracts biome.json as the reference implementation. Key settings:

  • VCS integration enabled (vcs.enabled: true, vcs.clientKind: "git", vcs.useIgnoreFile: true)
  • Formatter: single quotes, semicolons required, 2-space indent (spaces, not tabs)
  • All rules at "error" level — warnings are not actionable in CI
  • Excludes: managed/ (Compact compiler output), dist/, node_modules/, coverage/

See references/biome-config.md for the full annotated biome.json template.

Husky Hooks

bash
# Install
npm install --save-dev husky
npx husky init
bash
# .husky/pre-commit — fast staged-file check
npx biome ci --changed
bash
# .husky/pre-push — full suite
npx biome ci && npx tsc --noEmit && npx vitest run

The pre-commit hook uses --changed to check only staged files, keeping it under 2 seconds on most projects. The pre-push hook runs the full suite to prevent broken code from reaching the remote.

CI Workflows

Two workflows keep CI fast and targeted:

`checks.yml` — fast, runs on every push and pull_request:

  • Checkout → install → biome ci
  • Fails immediately on any lint or format violation

`test.yml` — thorough, runs on pull_request and push to main:

  • Checkout → install → compact compile (if Compact project) → tsc --noEmit → vitest run
  • Playwright E2E runs as a separate job within this workflow (if DApp)

See references/ci-workflows.md for the full YAML for both workflows.

Not For

  • Running checks on an existing configured project → use midnight-cq:quality-check
  • Writing Compact contract tests from scratch → use midnight-cq:compact-testing
  • Writing DApp E2E tests → use midnight-cq:dapp-testing
  • Debugging a failing CI run → use midnight-tooling:troubleshooting

Reference Files

TopicReference
Annotated biome.json template with all rule settings, .editorconfig, migration procedurereferences/biome-config.md
Vitest config, globalSetup for Compact compilation, simulator dependency setupreferences/vitest-config.md
Playwright config (always headless), browser setup, timeouts for blockchain opsreferences/playwright-config.md
Husky setup, pre-commit and pre-push hook scriptsreferences/husky-hooks.md
Full CI workflow YAML for checks.yml and test.yml, path filteringreferences/ci-workflows.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

7-day trend score
0

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

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-init/badge)](https://verified-skill.com/skills/midnightntwrk/midnight-expert/quality-init)

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