← Corpus / image-gin / reminder
This Is an Obsidian Plugin — Read the Obsidian API Docs
- Path
- reminders/This-is-an-Obsidian-plugin-Read-Obsidian-API-Docs.md
- Authors
- Michael Staton
- Augmented with
- Claude Code on Claude Opus 4.7 (1M context)
The one rule
You are working on an Obsidian plugin. The Obsidian API is the source of truth.
- Canonical types and method signatures: https://github.com/obsidianmd/obsidian-api
- Developer docs: https://docs.obsidian.md/Plugins/Getting+started/Build+a+plugin
- Sample plugin: https://github.com/obsidianmd/obsidian-sample-plugin
Do not invent API shapes. Do not guess. Obsidian runs on Electron with a custom DOM model; browser conventions you reach for from muscle memory often do not apply.
Common review-bot rejection reasons
The community plugin review bot is automated and uncompromising. The most frequent rejection reasons we (and others) hit:
anytypes — banned. Use the actual types from theobsidianpackage.eslint-disableworkarounds are themselves rejection reasons.innerHTML/outerHTML— banned. UsecreateEl,setText,empty(), etc.var— banned.let/constonly.- Direct DOM manipulation outside the plugin’s container. Don’t reach into Obsidian’s UI from your plugin’s code.
console.logleft in shipped code. Flagged.- Missing or incorrect
manifest.jsonfields.id,name,version,minAppVersion,description,author, andisDesktopOnlyare mandatory. - Mobile compatibility. Set
isDesktopOnly: truehonestly if you depend on Node APIs, or write a mobile-safe path.
When in doubt
Read the API. Check the sample plugin. Look at how an existing plugin in this farm solves the same problem — the suite is small enough to grep across via the content-farm pseudomonorepo. If still unsure, write a small test in the dev sandbox before committing to the API call.
This file exists because it is very easy to write code that compiles and runs locally but gets rejected at submission time. The rule was learned the hard way; do not relearn it.