gitwtfhub

wtf is mv3-doctor?

n0liu/mv3-doctor — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TL;DR

A command line tool that checks Chrome extensions for Manifest V3 mistakes and teaches AI coding agents to avoid them.

Mindmap

mindmap
  root((mv3-doctor))
    What it does
      Validates manifest.json
      Checks service worker rules
      Flags unsafe code loading
    Tech stack
      TypeScript
      Node.js
      npm
    Use cases
      Catch MV3 bugs before shipping
      Run checks in CI
      Teach AI agents MV3 rules
    Audience
      Extension developers
      AI coding agents
    License
      MIT permissive

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Scan a built Chrome extension for Manifest V3 mistakes before submitting it to the Web Store.

REASON 2

Add the validator as a CI step so broken service worker code never merges.

REASON 3

Install the accompanying skill file so an AI coding agent learns MV3 rules while writing extension code.

REASON 4

Get machine readable JSON findings for use inside an editor or coding agent.

What's in the stack?

TypeScriptNode.js

How it stacks up

n0liu/mv3-doctor0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

mv3-doctor is a command line tool that checks Chrome browser extensions for mistakes specific to Manifest V3, the newer format Chrome now requires extensions to use. The tool exists because Manifest V3 changed some long standing assumptions that a decade of extension tutorials, and the AI models trained on them, still repeat. A common resulting bug looks fine while you are testing it, then fails once real users load the extension, because the background service worker that was warm during your test is not warm for them. Ordinary linters cannot catch these problems because the same line of code can be a bug in one file and perfectly fine in another. For example, using setInterval inside a service worker is broken, but the same function in a content script is fine. mv3-doctor solves this by first reading the extension's manifest.json to understand what role each script plays, then only applying the relevant rules to each one, so it reports real problems rather than flooding you with false alarms. You run it with npx against your built extension folder, not your source code, since that build output is what Chrome actually loads. It can run in continuous integration pipelines, and it can output plain colored text for humans or machine readable JSON for editors and AI coding agents. The project also ships a written skill file meant to teach an AI coding agent the Manifest V3 rules up front, and instruct it to run the validator before claiming its work is finished, so an agent both learns the rules and checks its own work. The tool includes about a dozen built in rules covering the manifest file, service worker restrictions, and unsafe code loading patterns, each with its own severity level and a documentation page, and individual findings can be suppressed with a comment when needed. It requires Node 20 or newer and is released under the MIT license.

Yoink these prompts

Prompt 1
Help me run mv3-doctor against my extension's build output and fix the errors it reports.
Prompt 2
Explain why setInterval is broken in a service worker but fine in a content script.
Prompt 3
Show me how to add mv3-doctor as a CI check after my extension build step.
Prompt 4
Walk me through installing mv3-doctor's SKILL.md so my coding agent avoids Manifest V3 pitfalls.

Frequently asked questions

wtf is mv3-doctor?

A command line tool that checks Chrome extensions for Manifest V3 mistakes and teaches AI coding agents to avoid them.

What language is mv3-doctor written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js.

What license does mv3-doctor use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is mv3-doctor to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is mv3-doctor for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.