skills/logseq-plugin-dev/SKILL.md
Comprehensive guide and resources for developing Logseq plugins. Use this skill when asked to: (1) Create a new Logseq plugin, (2) Implement features using the Logseq Plugin API (Editor, App, DB, UI), (3) Debug or refactor existing Logseq plugins, (4) Set up a development environment for Logseq plugins.
npx skillsauth add 0xrichardh/agent-skills logseq-plugin-devInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps you build high-quality plugins for Logseq using the @logseq/libs SDK.
Logseq plugins run in a sandboxed iframe and communicate with the main Logseq application via an RPC bridge.
package.json with a logseq field.@logseq/libs to interact with Logseq.logseq.ready(main) to initialize your plugin.assets/template/assets/template-react/npm install @logseq/libs.Settings -> Plugins -> Developer Mode, then Load unpacked plugin and select your plugin directory.Use logseq.Editor.registerSlashCommand or logseq.App.registerCommandPalette.
logseq.Editor.getCurrentPageBlocksTree()logseq.Editor.insertBlock(parentBlockId, content)logseq.DB.datascriptQuery(query)logseq.provideUI to inject HTML or logseq.showMainUI to show a full-screen app.--ls-primary-background-color) for consistency.tools
Load when the user wants to call MCP tools, list MCP servers, manage MCP configuration, or interact with Model Context Protocol servers. Triggers include 'call MCP', 'list MCP servers', 'mcporter', 'MCP tool', 'run MCP', 'configure MCP'. Also load for ad-hoc MCP calls, OAuth setup, or code generation from MCP servers.
development
Load when the user needs web search, code examples, company intel, people lookup, or current information. Use for queries like 'search for', 'look up', 'find', 'what's the latest on', 'research company', 'code examples for'. Does not require a browser.
development
Load when the user wants to create, update, or refactor an agent skill, improve skill routing, split overlong skill instructions, or turn a repeated agent workflow into a reusable skill. Hand off to skill-creator for eval runs, packaging, and trigger-description optimization.
development
Find and inspect past OpenCode conversations stored in the local SQLite database. Use when the user asks to recall, search, find, or review a previous conversation, or asks "what did we talk about", "find that conversation where...", "show me past sessions", or any request to look up prior chat history.