Skip to content
Back to skills

Logseq Plugin Dev

ASecurity

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.

  • 225 stars
  • 0 votes
  • 0 copies
  • 10 views
  • Added September 4, 2026
developmentgoreactapi

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill logseq-plugin-dev --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Logseq Plugin Dev?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Logseq Plugin Dev
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-logseq-plugin-dev/badge)](https://www.skillsdirectory.com/skills/neversight-logseq-plugin-dev)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: logseq-plugin-dev
description: "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."
---

# Logseq Plugin Development

This skill helps you build high-quality plugins for Logseq using the `@logseq/libs` SDK.

## Core Concepts

Logseq plugins run in a sandboxed `iframe` and communicate with the main Logseq application via an RPC bridge.

- **Manifest**: Every plugin needs a `package.json` with a `logseq` field.
- **SDK**: Use `@logseq/libs` to interact with Logseq.
- **Lifecycle**: Use `logseq.ready(main)` to initialize your plugin.

## Getting Started

1. **Scaffold**: 
   - Basic TS: `assets/template/`
   - React + Vite: `assets/template-react/`
2. **Install Dependencies**: `npm install @logseq/libs`.
3. **Build**: Use Vite or a similar bundler to package your JS/TS code.
4. **Load**: In Logseq, go to `Settings -> Plugins -> Developer Mode`, then `Load unpacked plugin` and select your plugin directory.

## Common Workflows

### 1. Registering Commands
Use `logseq.Editor.registerSlashCommand` or `logseq.App.registerCommandPalette`.

### 2. Interacting with Content
- **Read**: `logseq.Editor.getCurrentPageBlocksTree()`
- **Write**: `logseq.Editor.insertBlock(parentBlockId, content)`
- **Query**: `logseq.DB.datascriptQuery(query)`

### 3. UI and Theming
- **UI**: Use `logseq.provideUI` to inject HTML or `logseq.showMainUI` to show a full-screen app.
- **Theming**: Use Logseq CSS variables (e.g., `--ls-primary-background-color`) for consistency.

## Resources

- **API Reference**: See [references/api.md](references/api.md) for a detailed list of available methods and examples.
- **Boilerplates**: 
  - [assets/template/](assets/template/) (Vanilla TS)
  - [assets/template-react/](assets/template-react/) (React + Vite)
- **Examples**: See [references/examples.md](references/examples.md) for common patterns like mind maps and slash commands.

Files in this skill

  • SKILL.md2.1 KB
  • description_ar.txt547 B
  • description_cn.txt315 B
  • description_de.txt390 B
  • description_en.txt305 B
  • description_es.txt415 B
  • description_fr.txt433 B
  • description_it.txt388 B
  • description_ja.txt450 B
  • description_ko.txt367 B
  • description_ru.txt644 B
  • description_tw.txt315 B
  • stats.json66 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.