logseq-plugin-sdk
Skill by logseq
Guides an AI assistant through building, debugging, or reviewing Logseq plugins with the @logseq/libs SDK. It is for developers writing TypeScript or JavaScript plugins for Logseq.
Install logseq-plugin-sdk
Built from the published package, never by AI.
git clone --depth 1 https://github.com/logseq/logseq /tmp/logseq && mkdir -p ~/.claude/skills && cp -r /tmp/logseq/libs ~/.claude/skills/logseq-plugin-sdkRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/logseq/logseq /tmp/logseq && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/logseq/libs ~/.gemini/antigravity-cli/skills/logseq-plugin-sdkAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The logseq-plugin-sdk skill covers work on the @logseq/libs npm package and its generated ClojureScript facade. It points the assistant to reference guides for namespaces such as App, Editor, DB, UI, Assets and Git, and for topics like settings schema, slash commands, DB-graph properties, and Datascript or DSL queries. It also lists golden rules, such as awaiting logseq.ready before calling APIs and cleaning up listeners in beforeunload.
The skill includes a canonical plugin skeleton, a workflow for new plugins and SDK changes, and a list of common pitfalls. It gives commands for regenerating the CLJS SDK and for building and loading a plugin in Logseq's developer mode. It is aimed at developers writing, upgrading, or debugging Logseq plugins, and at contributors changing the SDK source.
Written from the project's SKILL.md and checked against it.
What it can do
- Plugin entry codeWrites plugin entry code that waits on logseq.ready before calling any API.
- Command and UI registrationCovers registerSlashCommand, registerBlockContextMenuItem, registerCommandPalette and registerUIItem.
- Provide UI and stylesCovers provideUI, provideStyle and provideModel for injecting UI and CSS.
- Settings schemaCovers useSettingsSchema for defining plugin settings.
- DB-graph propertiesGuides use of upsertProperty and upsertBlockProperty for DB graphs.
- QueriesExplains DSL queries through logseq.DB.q and Datascript queries through logseq.DB.datascriptQuery.
- Theme pluginsProvides guidance on custom theme CSS, provideTheme and theme variables.
- CLJS facade regenerationExplains how to regenerate the CLJS SDK with yarn and babashka commands.
What you need
- Logseq desktop app with Developer mode enabled
- Node.js with npm or yarn to build a plugin
- Babashka (bb) to regenerate the CLJS SDK
Try asking
- Write a Logseq plugin that registers a slash command that inserts a date.
- Review my Logseq plugin's beforeunload cleanup for leaked listeners.
- Add a boolean settings schema entry to my Logseq plugin.
Good to know
- Logseq.Experiments APIs are unstable and should be used only when no stable API exists.
- Logseq.Git APIs are for file graphs and desktop only.
- IBatchBlock.properties is not supported for DB graphs.
- block.content is deprecated; use block.title instead.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: libs/SKILL.md, libs/.prettierrc.js, libs/index.d.ts, libs/scripts/extract-sdk-schema.js, libs/src/LSPlugin.caller.ts, libs/src/LSPlugin.core.ts, libs/src/LSPlugin.shadow.ts, libs/src/LSPlugin.ts, libs/src/LSPlugin.types.ts. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
.gitignore5 B -
.npmignore40 B -
.prettierrc.js85 B -
CHANGELOG.md4 KB -
README.md2 KB
Show all 54 files
-
SKILL.md9 KB -
babel.config.json108 B -
cljs-sdk/.gitignore383 B -
cljs-sdk/LICENSE1 KB -
cljs-sdk/bb.edn1 KB -
cljs-sdk/build.clj1 KB -
cljs-sdk/deps.edn550 B -
cljs-sdk/package.json575 B -
cljs-sdk/pnpm-lock.yaml3 KB -
cljs-sdk/src/com/logseq/app.cljs10 KB -
cljs-sdk/src/com/logseq/assets.cljs996 B -
cljs-sdk/src/com/logseq/commands.cljs1 KB -
cljs-sdk/src/com/logseq/core.cljs3 KB -
cljs-sdk/src/com/logseq/db.cljs2 KB -
cljs-sdk/src/com/logseq/editor.cljs15 KB -
cljs-sdk/src/com/logseq/experiments.cljs2 KB -
cljs-sdk/src/com/logseq/git.cljs591 B -
cljs-sdk/src/com/logseq/net.cljs2 KB -
cljs-sdk/src/com/logseq/ui.cljs1 KB -
cljs-sdk/src/com/logseq/util.cljs982 B -
guides/AGENTS.md18 KB -
guides/commands_api_guide.md11 KB -
guides/custom_theme_guide.md25 KB -
guides/db_properties_guide.md8 KB -
guides/db_properties_references.md17 KB
And 24 more files on GitHub.
Alternatives to logseq-plugin-sdk
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
logseq-plugin-sdk: common questions
Does this skill cover DB graphs?
Yes. It covers DB-graph properties, tags, classes and idents. For DB graphs, IBatchBlock.properties is not supported, so the skill points to Editor.upsertBlockProperty or upsertProperty instead.
Can I use experimental APIs with it?
The skill says Logseq.Experiments APIs are unstable. It advises using them only when no stable API exists and documenting the reason.
Which Logseq namespaces does it cover?
It covers App, Editor, DB, UI, Assets, Git and Experiments, along with top-level functions such as provideUI, provideStyle and useSettingsSchema.
How do I install logseq-plugin-sdk?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is logseq-plugin-sdk free?
The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.
Is logseq-plugin-sdk safe to use?
It scores 89 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to logseq-plugin-sdk?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
