---
name: obsidian-plugin-dev-release
description: Develop, build, version, release and submit an Obsidian community plugin. This skill should be used when the user asks to create a new Obsidian plugin, modify or debug an existing one, publish a new version, or submit a plugin to the Obsidian community marketplace. Covers the TypeScript plus esbuild project layout, manifest.json compliance rules, the Windows process-spawn pitfalls (exit code 9009, missing PATHEXT), GitHub Actions release automation, and the current marketplace submission flow.
agent_created: true
title: obsidian-plugin-dev-release
canonical_url: https://skilld.dev/gh/steelan9199/wechat-publisher/obsidian-plugin-dev-release
last_updated: 2026-10-07T07:20:50.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [assets/AGENTS-template.md](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/AGENTS-template.md), [assets/templates/dot-gitignore](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/templates/dot-gitignore), [assets/templates/esbuild.config.mjs](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/templates/esbuild.config.mjs), [assets/templates/manifest.json](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/templates/manifest.json), [assets/templates/package.json](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/templates/package.json), [assets/templates/src/main.ts](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/templates/src/main.ts), [assets/templates/tsconfig.json](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/templates/tsconfig.json), [assets/workflows/ci.yml](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/workflows/ci.yml), [assets/workflows/release.yml](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/assets/workflows/release.yml), [references/plugin-dev-guide.md](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/references/plugin-dev-guide.md), [references/publish-and-review.md](https://skilld.dev/api/skills-raw/steelan9199/wechat-publisher/obsidian-plugin-dev-release/references/publish-and-review.md).
>
> If the user asked to install this Skill, run `npx skilld install steelan9199/wechat-publisher/obsidian-plugin-dev-release`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/obsidian-plugin-dev-release`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/steelan9199/wechat-publisher/obsidian-plugin-dev-release) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/obsidian-plugin-dev-release`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/obsidian-plugin-dev-release --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/obsidian-plugin-dev-release --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Obsidian plugin: develop, release, submit

## Purpose

Take an Obsidian plugin from source to a published community release without rediscovering the
rules each time. The valuable parts are the non-obvious ones: what `manifest.json` must contain to
pass review, why spawning an external program fails on Windows, how a release must be tagged, and
where plugins are actually submitted today.

## When to use

- Building a new Obsidian plugin from scratch
- Modifying, refactoring or debugging an existing plugin repository
- Publishing a new version (bump manifest, tag, release)
- Submitting to the Obsidian community marketplace, or responding to review feedback
- Writing or updating an `AGENTS.md` handbook for a plugin repository

## Pick the entry point

| Situation | Do this |
| --- | --- |
| New plugin | Scaffold from `assets/templates/`, then read `references/plugin-dev-guide.md` |
| Existing plugin repo | Read the repo's `AGENTS.md` first if present, then `references/plugin-dev-guide.md` |
| Something is broken | Go to the troubleshooting table in `references/plugin-dev-guide.md` |
| Publishing | Follow "Release a new version" below, then `references/publish-and-review.md` |
| Submission or review feedback | `references/publish-and-review.md` |

## Hard rules

1. **`manifest.json` version is the only version users see.** No bump means no update, even if the
   GitHub release exists.
2. **`manifest.json` and `package.json` carry the same version**, and the git tag matches both.
3. **`main.js` is a build artifact** — gitignored and untracked. If already tracked, run
   `git rm --cached main.js`; ignore rules do not apply to tracked files.
4. **`id` must not contain "obsidian"; `name` must not start with "Obsidian".**
5. **`description` ≤ 250 characters, ends with a period, written in English.**
6. **No `versions.json`** for new plugins — the marketplace flags it as an extra unsupported file.
7. **`isDesktopOnly: true` when Node built-ins are used** (`fs`, `path`, `os`, `child_process`).
8. **Never spawn a bare command name** — resolve to an absolute path first.

## Scaffold a new plugin

Copy `assets/templates/` (manifest.json, package.json, tsconfig.json, esbuild.config.mjs,
src/main.ts, .gitignore) and adjust the id, name and description. esbuild keeps `format: "cjs"` so
Obsidian can load the bundle. Verify the plugin id is not already taken before committing to it —
short ids like `open-in-vscode` are frequently occupied.

## Start an external program correctly

The most common failure mode. Obsidian runs on Electron, and the environment Electron hands to a
child shell on Windows is incomplete — `PATHEXT` is missing. Consequences:

- `spawn("code ...", { shell: true })` fails with **exit code 9009** even though `code` is on `PATH`
- `where code` still succeeds, because `where` resolves extensions itself and does not need
  `PATHEXT` — a successful `where` proves nothing about whether the spawn works

Resolve first, then spawn:

```ts
// absolute path -> fs.existsSync
// bare name     -> `where` (win32) / `command -v` (posix), prefer a .cmd/.bat hit
// then spawn the resolved path, never the bare name
const child = spawn(commandLine, {
  shell: true, detached: true, stdio: "ignore", windowsHide: true,
});
child.unref();
```

On Windows prefer the CLI entry point (`bin\code.cmd`) over the main executable (`Code.exe`) — only
the CLI entry point reliably accepts flags such as `-r`. When a user points at the `.exe`, silently
switch to a sibling `bin\*.cmd` or `resources\app\bin\*.cmd` when one exists, and never replace
their input with a file that does not exist.

## Release a new version

1. Confirm `npm run build` passes (typecheck + bundle).
2. Update `README.md` for anything user visible.
3. Bump `version` in **both** `manifest.json` and `package.json`. SemVer: fix = patch,
   backward-compatible feature = minor, breaking = major. Removing a command users may have
   hotkeyed counts as breaking.
4. Commit and push to the default branch.
5. Push a tag named exactly like the manifest version: `git tag 2.0.0 && git push origin 2.0.0`.
6. Wait for the workflow; verify with `gh run list --limit 3` and `gh release view <tag>`.
7. Confirm `main.js` and `manifest.json` are attached.

A tag/manifest mismatch fails the workflow before any release is created — that is deliberate. Fix
the version rather than deleting and re-pushing the tag.

## Set up CI/CD

Copy `assets/workflows/release.yml` (tag-triggered publish with provenance attestation) and
`assets/workflows/ci.yml` (build check on push/PR plus a guard that `main.js` stays untracked). The
release workflow needs `permissions: contents: write, id-token: write, attestations: write`.

## Bundled resources

- `references/plugin-dev-guide.md` — layout, API notes, settings tab, Windows pitfalls,
  troubleshooting table
- `references/publish-and-review.md` — submission flow, review feedback, CI/CD details, SemVer
- `assets/templates/` — manifest, package.json, tsconfig, esbuild config, plugin skeleton, gitignore
- `assets/workflows/` — release.yml, ci.yml
- `assets/AGENTS-template.md` — starting point for a per-repository AI handbook

## Working style

Read the reference files instead of improvising on the submission flow or manifest rules — both have
changed in ways that are easy to get wrong. When a plugin misbehaves, add a debug toggle that logs
the resolved command line and the child's exit code before changing anything else; the exit code
usually identifies the cause immediately.
