npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

obsidian-plugin-dev-kit

v0.6.0

Published

Build, lint, release, test and film Obsidian plugins from one shared dev dependency.

Readme

obsidian-plugin-dev-kit

npm CI License: MIT

Build, lint, release, test and film Obsidian plugins from one dev dependency.

Status: released. It installs from npm or by git tag (see Install); the newest vX.Y.Z tag is the current release. The code was moved here from three plugins that each kept their own copy: Snipsy, Dashy and Garmy. The roadmap below shows what is done and what is planned.

Why

Every Obsidian plugin needs the same tooling around its code: a bundle that also runs on phones, a lint setup that matches the community plugin scanner, a release workflow, end-to-end tests in a real Obsidian, and a demo GIF for the README. Copying it between plugins works until the copies drift. In the three plugins above, a fix for the mobile build reached two of them and not the third. This kit keeps that tooling in one place and versions it.

What it includes

| Module | What it does | |---|---| | Build | esbuild for the browser platform, so the bundle works on mobile, plus a check that fails if Node-only code gets into main.js; CSS build; copy into a dev vault in watch mode | | Scanner and lint | opdk scan runs the community plugin scanner's ESLint configuration and its CSS, source and manifest checks before you release, with eslint-plugin-obsidianmd pinned in one place; obsidianPlugin() gives your own eslint.config.mjs the same base | | Release | opdk release check for CI and before a tag: versions in package.json, manifest.json, package-lock.json and versions.json, the manifest rules of the official Obsidian action, a CHANGELOG section, one kit release in package.json, the lockfile and the workflow pins, a production build built twice (working tree and committed tree) and compared, and the minAppVersion against the API the code calls. opdk release patch (or minor, major, X.Y.Z) refuses commits that origin has not seen, runs the plugin's npm test, bumps the files, moves the [Unreleased] notes under the new version, commits and tags, pushes only the tag, waits for the kit's reusable GitHub workflow, verifies its draft release (files, bytes against a local build of the tag, notes, build provenance), publishes it and only then pushes the branch. Release notes come from the CHANGELOG, and no zip is made unless asked | | Reusable CI | plugin-ci.yml, a reusable GitHub workflow: lint, typecheck, tests, opdk scan, opdk release check, build and bundle upload, with a read-only token, actions pinned to commit SHAs and a pinned runner | | Unit tests | defineUnitConfig(), a Vitest config with v8 coverage and a 90/80 gate, an obsidian alias, and a split that runs only the files that need a DOM in jsdom; plus the DOM helpers Obsidian adds (createEl, createDiv, setText, addClass, activeDocument and more) for jsdom | | End-to-end tests | Playwright in a real Obsidian through Electron: an isolated vault per test, the trust dialog never shown, readiness by plugin state instead of sleeps, a check of which Obsidian version ran, a trace and a video of the Obsidian window for failures, and helpers for settings, commands, the editor, IME composition, the mobile layout and fakes. Launch over CDP and a mode for recording tests by hand with the Playwright Inspector are planned | | Demo films | Films of stills from the real Obsidian: a frozen UI, a visible cursor or tap dot, captions, slow typing, light and dark themes, and a privacy guard that refuses to film a vault that is not the plugin's own; opdk demo encodes them to MP4, GIF and poster with ffmpeg, can put a phone film beside its captions, and copies stills (shot at a fixed density) for the README and listings. No audio | | Agent skills | One Claude Code skill per module, so a coding agent working in your plugin knows how to use the kit |

Your plugin keeps only what is its own: specs, the seed vault and demo scenes.

Install

npm install -D -E obsidian-plugin-dev-kit
npx opdk --help

From v0.3.2 the kit is on npm (-E pins the exact version). Versions from 0.3.3 on are published by a GitHub workflow and carry npm provenance; 0.3.2 was published by hand. A git tag works too: npm install -D "github:Dimagious/obsidian-plugin-dev-kit#v0.6.0". opdk kit upgrade (below) moves either install and, for both, sets the commit and the # vX.Y.Z comment in each uses: line of the kit's workflows. opdk release check compares those comments with the installed version; it cannot check the commit of an npm install, so move the version and the workflow lines together, with that command.

Install size, measured on 2026-11-16: the package is 396 KB packed and 1.3 MB unpacked. In an empty project it brings about 100 MB with its required dependencies, mostly TypeScript, esbuild and the ESLint stack a plugin usually has already. Electron, Playwright, Vitest, @vitest/coverage-v8 and jsdom are not dependencies of the kit at all: the plugin installs them for end-to-end tests, demo films and unit tests, and the kit checks their versions when it runs and fails with the install command. ESLint and TypeScript 6 are the only peer dependencies; opdk scan fails on an older TypeScript, because the community scanner type-checks with 6.

Build

opdk build builds your plugin's CSS, bundles it with esbuild for the browser platform, and then checks main.js for code that only exists under Node. A plugin whose build passed --platform=node failed on every phone: esbuild took the node branch of the yaml package and bundled code that reads process.env. Desktop Obsidian has process, so only mobile showed it. The platform is fixed here, and the check fails the build if Node-only code gets in anyway.

Terminal: opdk build prints the CSS step, the bundle size and "free of Node-only references", then ls shows main.js and styles.css

When Node-only code gets into the bundle, the build fails:

Terminal: opdk build bundles main.js, then prints "cannot run on mobile" with the offending process reference, and the exit code is 1

Quick start: npx opdk build. Details: docs/build.md.

Scanner

opdk scan runs the community plugin scanner's own ESLint configuration (published upstream), a CSS check and a few source checks that reproduce findings seen on plugin listings, over the files git tracks. It fails when a step has a finding; the scanner's ESLint warnings count as findings, advisory ! lines do not. It type-checks with the plugin's TypeScript, which must be 6, as the scanner's is, and reads every tracked stylesheet; there is no way to ignore a file the scorecard shows. A plugin lost three points of its public score to a joined domain string that no local check saw; this catches that kind of thing before the tag.

Terminal: opdk scan prints lint, css, code and meta with 0 findings each, then the summary and exit code 0

Quick start: npx opdk scan. Details: docs/scanner.md.

End-to-end tests

obsidian-plugin-dev-kit/e2e runs Playwright specs in the real Obsidian: every test gets its own Obsidian process, a copy of your seed vault and a fresh user-data folder, with your built plugin installed and trusted before the window opens. Obsidian 1.13 moved Settings into a second window and took down five specs of one plugin at once, and harnesses that pressed Escape on the trust dialog and slept to let plugins load raced a slow start. The kit keeps Settings in the main window, sets the trust flag before the vault loads and waits for every plugin's onload() to finish, and a failed test leaves a trace and a video of the Obsidian window.

Obsidian driven by the kit: in a note, text is typed key by key, the command palette finds a command, a notice appears, and the plugin's settings tab opens

Quick start: createObsidianTest({ seedVault }) in e2e/fixtures.ts, defineObsidianConfig() in playwright.config.ts, then npx playwright test. Beyond the basics: test.use({ seed }) puts notes and settings into one test's vault, obsidian.checkLayout() lists overflow, small touch targets and missing focus rings, and AppWithInternals types Obsidian's internal app. Details: docs/e2e.md.

Demo films

The demo fixture records your plugin in the real Obsidian as a film of stills: each shot freezes the UI and takes a sharp picture at 2x, with a hold and a caption, and opdk demo turns the film into an MP4, a GIF and a poster. Recording the Obsidian window as video caught every stutter of the machine, and the script that finished the job needed Python; a retake that appended frames to the old film made a longer film, and a reel script that only warned when ffmpeg failed let a run that made no GIF end green. Here the timing is the script's, a retake replaces the frames, a failed encode fails the film, and a film of a vault that is not the plugin's own is refused.

A phone film made by the kit: a note opens, a heading and a line of text are typed in three stages, the command palette finds "Show notice" and a notice appears, and the plugin's settings tab opens, while the list of steps beside the phone lights the current one

Quick start: demo.film({ kind: "phone", captions }) and film.shot({ hold }) in a gated spec, then npx opdk demo. For captions beside the phone, set layout: "phone-captions" in the demo section of opdk.config.mjs. A still can go to its own folder (demo.still(name, { out: "listing" }) with demo.outputs) or stay out of the output ({ publish: false }). Details: docs/demo.md.

Releases

opdk release checks a commit, bumps the version everywhere, tags it and publishes the GitHub release, pushing the branch last so the manifest on the default branch moves only after the release is public. Pushing the branch and the tag together lets the directory read a new manifest.json before the release workflow had finished, and a hand-written CHANGELOG never reached the release page. Here only the tag is pushed first, the kit's reusable workflow builds, attests and creates a draft with the CHANGELOG section as notes, and opdk release checks the draft byte for byte against a build of the tag on your machine before it publishes. The incidents behind this, in docs/release.md.

Quick start: a tag workflow in the plugin that calls the kit's, pinned to a full commit SHA of the kit,

# .github/workflows/release.yml
name: Release
on:
  push:
    tags: ['*.*.*']
permissions:
  contents: write
  id-token: write
  attestations: write
jobs:
  release:
    uses: Dimagious/obsidian-plugin-dev-kit/.github/workflows/release.yml@<full commit SHA of the kit>

then npx opdk release check to see what would stop a release, and npx opdk release patch to cut one (it needs the GitHub CLI signed in with write access, and scripts.build must run opdk build). Details, every stop and how to resume: docs/release.md.

Continuous integration

.github/workflows/plugin-ci.yml is a reusable workflow that checks a plugin on every push and pull request: lint, typecheck, unit tests, opdk scan, opdk release check, the build, and an upload of the bundle as <plugin id>-bundle. Three plugins each kept a hand-written ci.yml of 45 to 75 lines, and they had drifted (one never ran its lint script). Here the job has a read-only token, every action is pinned to a commit SHA, the runner is pinned to ubuntu-24.04 instead of ubuntu-latest, and the inputs are switches, never commands. Steps that belong to one plugin stay in a second job of its own ci.yml.

Quick start: call it from the plugin's ci.yml, pinned to a full commit SHA of the kit,

# .github/workflows/ci.yml
name: ci
on:
  push:
    branches: [main]
  pull_request:
permissions:
  contents: read
jobs:
  kit:
    uses: Dimagious/obsidian-plugin-dev-kit/.github/workflows/plugin-ci.yml@<full commit SHA of the kit>

If your default branch is not main, use its name in branches. Inputs (all optional): node-version, runs-on, and a boolean per step (lint, typecheck, test, scan, release-check, build, upload-bundle, coverage-artifact). Inputs, what each step runs, how to add plugin-specific steps and how to move an existing ci.yml: docs/ci.md.

Updating the kit

A plugin pins the kit in three places: the tag in package.json, the commit in the lockfile, and the commit in each uses: line of the kit's workflows. They have to name one release, and opdk release check (so CI) fails when they do not. opdk kit upgrade moves them together:

npx opdk kit upgrade --dry-run   # what would change, and the kit's CHANGELOG since your version
npx opdk kit upgrade             # latest release; or: npx opdk kit upgrade v0.6.0

It works for a kit installed from a git tag (github:owner/obsidian-plugin-dev-kit#vX.Y.Z) and from npm (0.3.3 or ^0.3.3 in package.json; the command installs the exact version). On v0.1.0, which has no kit command, run it once as npx -y -p github:Dimagious/obsidian-plugin-dev-kit#v0.6.0 opdk kit upgrade v0.6.0. It needs a clean git tree, never commits or pushes, and puts package.json and the lockfile back if npm install fails (run npm ci if node_modules looks off). Review the diff and open a pull request. Configure Dependabot to ignore the kit (a lone bump of one pin breaks the check; the ignore entries are in the docs) and watch the kit's releases on GitHub. Details: docs/ci.md.

Unit tests

defineUnitConfig() from obsidian-plugin-dev-kit/vitest is a Vitest config for Obsidian plugins: tests in src/**/*.test.ts, v8 coverage with a gate of 90 percent (80 for branches), an obsidian alias, and a list of the test files that need a DOM. Those files run in jsdom with Obsidian's DOM helpers (createDiv, setText, addClass, activeDocument and the rest) installed; every other file runs in node. Without a shared config, the same vitest.config.ts gets copied between plugins and drifts. Hand-written copies of the DOM helpers drift from the app too: a fragment passed to setText became a string, where Obsidian appends it. Booting jsdom for every test file is slow: on a plugin with 3,271 tests in 85 files, 32 of which need a DOM, the run went from 30 s to 15 s. coverage.include is required, because Vitest 4 and later leave out files no test imports, and an untested file would escape the gate.

Quick start: a vitest.config.ts with the vitest, @vitest/coverage-v8, jsdom and vite@^8 dev dependencies,

import { defineUnitConfig } from "obsidian-plugin-dev-kit/vitest";

export default defineUnitConfig({
    rootDir: import.meta.dirname,
    obsidian: "./src/test/stubs/obsidian.ts",
    dom: ["src/ui/**/*.test.ts"],
    coverage: { include: ["src/**/*.ts"], exclude: ["src/main.ts"] },
});

then npx vitest run --coverage. Options, finding the files that need a DOM, the helper list and migration notes: docs/unit.md.

Agent skills

The repository is also a Claude Code plugin, opdk, with one skill per module so a coding agent working in your plugin knows the commands, the options and the traps of that module, plus /opdk:audit for a plugin that is already on the kit:

| Skill | Use it for | | --- | --- | | /opdk:build | opdk build, opdk build-css, opdk assert-bundle, opdk build --vault, mobile-only bundle failures | | /opdk:scanner | opdk scan, community plugin scorecard warnings, obsidianPlugin() in eslint.config.mjs | | /opdk:e2e | Playwright specs in the real Obsidian, readiness and timeout failures, helpers | | /opdk:demo | demo films, GIFs, MP4s, posters and README screenshots, opdk demo messages | | /opdk:unit | defineUnitConfig(), coverage gate failures, createDiv is not defined, the DOM helpers for jsdom, moving a plugin's Vitest config | | /opdk:release | opdk release check, cutting and publishing a release, a stopped release, the reusable release workflow | | /opdk:audit | a plugin already on the kit: what it still does by hand, pictures nothing can retake, code outside the coverage gate, tests that pass only in parallel, gaps in the kit; reads and measures first, changes only what you pick |

Claude picks a skill by its description, so you can also just ask ("film a demo GIF of my plugin"). Install from inside Claude Code:

/plugin marketplace add Dimagious/obsidian-plugin-dev-kit
/plugin install opdk@obsidian-plugin-dev-kit

The plugin version follows the kit version, and installed copies update when it changes (/plugin marketplace update obsidian-plugin-dev-kit, then update the plugin). A fresh install takes main as it is then, which can be ahead of the latest tag. The plugin files live in plugins/opdk/. A copy of the skills matching the kit version you installed is in node_modules/obsidian-plugin-dev-kit/plugins/opdk/skills/; Claude Code loads them only through the plugin.

Rules for Claude Code

Skills load when a task asks for them. The scorecard rules are needed on every edit, so the kit also ships them as Claude Code rules in claude/rules/, each scoped to the files it is about:

| File | Loads when Claude reads or writes | What it says | | --- | --- | --- | | source.md | src/**/*.{ts,mts,cts,js,mjs,cjs} | activeDocument, timers on window, createDiv/createSpan instead of createElement, URLs as one literal, Node modules behind Platform.isDesktop, no any | | css.md | **/*.css | no !important, no :has(), Chrome 142 features only, edit src/styles/ when styles.css is built | | manifest.md | manifest.json, versions.json, package.json, package-lock.json | description without the plugin name, versions belong to opdk release, minAppVersion | | lint-config.md | eslint.config.*, tsconfig*.json, e2e/**/* | eslint.config.mjs, a root tsconfig.e2e.json, TypeScript 6 |

Link them into your plugin once:

mkdir -p .claude/rules
ln -s ../../node_modules/obsidian-plugin-dev-kit/claude/rules .claude/rules/opdk

The link points into node_modules, so the rules follow the kit version the plugin pins. Commit the link if you commit .claude/; on a fresh clone it works after npm install. The rules only tell the agent what opdk scan reports; the scan is still the check.

Maker and checker agents

claude/agents/ holds two Claude Code subagents for a maker/checker workflow, the same in every plugin:

  • maker implements an agreed task, runs the gates and reports; it never commits, pushes or edits versions.
  • checker reviews the working-tree diff read-only: it runs npm run typecheck, npm run lint, npm test, opdk scan and opdk release check itself, checks for scanner drift, and returns APPROVE, NEEDS CHANGES or REJECT with findings.

What differs between plugins goes into the plugin's CLAUDE.md, under a heading ## Maker and checker: its layering and conventions, extra gates (a generated file that must stay in sync, say), and review lenses (a security invariant, translations that must stay in step). Keep the section short and point it to files where the details are long, such as the plugin's own path-scoped rules in .claude/rules/: subagents load CLAUDE.md and those rules like the main session does, and both agents treat the files the section names as binding. Link the agents next to the rules:

mkdir -p .claude/agents
ln -s ../../node_modules/obsidian-plugin-dev-kit/claude/agents .claude/agents/opdk

A plugin that has its own maker.md or checker.md in .claude/agents/ should move what is specific in them into CLAUDE.md and remove them in the same change as the link: with two agents of one name, Claude Code ran the linked one in every try, so the local one stops running without any message.

Roadmap

  • [ ] Wave 1: build, scanner and lint, end-to-end harness, demo films
    • [x] Build: opdk build, opdk build-css, opdk assert-bundle, dev-vault watch
    • [x] Scanner and lint: opdk scan, obsidianPlugin()
    • [ ] End-to-end harness: launch, isolation, readiness, trace and video, and the helpers are done; CDP mode is pending
    • [x] Demo films: films of stills, phone layout, stills presets, opdk demo (no audio)
  • [x] Wave 2: release, unit-test preset and reusable CI
    • [x] Release: opdk release check, opdk release <bump>, opdk release publish, opdk release notes, the reusable release.yml
    • [x] Unit-test preset: defineUnitConfig(), the DOM helpers for jsdom
    • [x] Reusable CI: plugin-ci.yml
  • Wave 3, an integration tests preset, is not planned: only one of the three plugins runs integration tests, and it keeps its own setup
  • [ ] Wave 4: CDP launch mode, if a plugin needs the shipped Obsidian binary
  • [x] Agent skills for build, scanner, e2e, demo, release and unit, installable as a Claude Code plugin
  • [x] An audit skill for plugins already on the kit
  • [ ] Agent skills for the modules that are still to come, written along with them

Development

Requires Node 22.13 or newer, or Node 24 or newer.

npm ci
npm run typecheck   # tsc over src, bin, tests and config files
npm run lint        # eslint, zero warnings allowed
npm test            # vitest with coverage thresholds (90% lines, functions and statements, 80% branches)
npm run build       # cleans dist/ and compiles src/ with tsc
npm run smoke       # builds, packs, installs the tarball into a temp project, runs opdk --help, --version, `opdk build` and `opdk scan` on a fixture, imports defineConfig and `obsidian-plugin-dev-kit/eslint`
npm run docs:media  # re-records the GIFs in docs/media with VHS (needs `vhs` and `ffmpeg`); run `npm run build` first
npm run docs:media:e2e  # re-records docs/media/e2e.gif from a real Obsidian window (needs Obsidian and `ffmpeg`)
npm run docs:media:demo  # re-records docs/media/demo.gif: the docs-film spec in a real Obsidian, then `opdk demo` (needs Obsidian and `ffmpeg`; run `npm run build` first)
npm run e2e:smoke  # the kit's own e2e specs against a real Obsidian; by hand before a release, not in CI

dist/ is not committed. npm install from a git tag runs prepare, which builds it, so a broken build breaks every plugin install. CI runs the same checks plus the smoke on every pull request.

Releasing: bump version in package.json, move the [Unreleased] entries in CHANGELOG.md under the new version, merge, then the owner tags vX.Y.Z and pushes the tag. A workflow fails the tag if it differs from package.json, and another publishes that version to npm with provenance. Plugins pin the version, for example [email protected] from npm or github:Dimagious/obsidian-plugin-dev-kit#v0.6.0.

Credits

The kit's code is moved from the owner's plugins: Snipsy, Dashy and Garmy.

Where each module came from:

  • Build, bundle check, scanner and the vault copy: Dashy's build, assert-bundle, build-css, build-vault and scorecard-check scripts and its scanner ESLint configuration.
  • End-to-end fixture: Snipsy's e2e/fixtures.ts, obsidian-version.ts and remove-dir.ts and Garmy's e2e-setup.sh.
  • End-to-end helpers: Snipsy's UI helpers (settings, command palette, editor typing, text and clear, IME composition) and Garmy's settings and reading-view helpers; the theme, metadata-cache, notice, properties and scroll helpers and the mobile block come from Dashy's and Garmy's capture and film specs; the sidebar collapse from Dashy and Garmy; the fake swap (replace) from Garmy's fake.
  • Demo: Snipsy's cursor and caption overlays, Dashy's tap dot and phone film, and Garmy's reels.

License

MIT