Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器clawhub未标认证来源可访问clear审计提醒

logseqlogseq 搜索

Agent Skill

logseq 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

112,694

周安装

4,515

GitHub Stars

6

下载量

36,481
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:logseq(logseq 搜索)
来源仓库:https://github.com/juanirm/logseq
安装命令:
openclaw skills install logseq
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install logseq

简介

提供用于通过其插件 API 与本地 Logseq 实例交互的命令。用于在 Logseq 中创建页面、插入块、查询图形数据库、管理任务、检索内容或自动化工作流程。仅适用于启用了 API 的本地运行实例; [$API 可访问技能] 所需的默认端口或设置路径。

SKILL.md

name
logseq
description
Provide commands for interacting with a local Logseq instance through its Plugin API. Use for creating pages, inserting blocks, querying the graph database, managing tasks, retrieving content, or automating workflows in Logseq. Only works with a locally running instance with the API enabled; default port or set path expected for [$API accessible skill].

Logseq Plugin API

Interact with your local Logseq instance through its JavaScript Plugin API. This skill enables reading, writing, querying, and automating workflows in your Logseq graph.

Prerequisites

Logseq must be running locally with a plugin that exposes the API. The standard way is:

  1. Install a bridge plugin that exposes logseq API via HTTP (e.g., via a custom plugin or localhost endpoint)
  2. Alternative: Use Node.js with @logseq/libs package to script against the running Logseq instance

The API is primarily designed for in-browser plugins, so accessing it from external scripts requires a bridge/proxy.

Core API Namespaces

The Logseq Plugin API is organized into these main proxies:

logseq.App

Application-level operations: getting app info, user configs, current graph, commands, UI state, external links.

Key methods:

  • getInfo() - Get app version and info
  • getUserConfigs() - Get user preferences (theme, format, language, etc.)
  • getCurrentGraph() - Get current graph info (name, path, URL)
  • registerCommand(type, opts, action) - Register custom commands
  • pushState(route, params, query) - Navigate to routes

logseq.Editor

Block and page editing operations: creating, updating, moving, querying content.

Key methods:

  • getBlock(uuid) - Get block by UUID
  • getCurrentPage() - Get current page entity
  • getCurrentPageBlocksTree() - Get all blocks on current page
  • getPageBlocksTree(page) - Get all blocks for a specific page
  • insertBlock(target, content, opts) - Insert a new block
  • updateBlock(uuid, content) - Update block content
  • createPage(pageName, properties, opts) - Create a new page
  • deletePage(pageName) - Delete a page
  • getPageLinkedReferences(page) - Get backlinks to a page
  • registerSlashCommand(tag, action) - Add custom slash commands

logseq.DB

Database queries using Datalog.

Key methods:

  • q(query, ...inputs) - Run Datalog query
  • datascriptQuery(query, ...inputs) - Direct Datascript query

logseq.UI

UI operations: messages, dialogs, main UI visibility.

Key methods:

  • showMsg(content, status) - Show toast notification
  • queryElementById(id) - Query DOM elements

logseq.Git

Git operations for the current graph.

Key methods:

  • execCommand(args) - Execute git command

logseq.Assets

Asset management.

Key methods:

  • listFilesOfCurrentGraph(path) - List files in graph

Common Workflows

Read Content

// Get current page
const page = await logseq.Editor.getCurrentPage();

// Get all blocks on a page
const blocks = await logseq.Editor.getPageBlocksTree('Daily Notes');

// Get a specific block
const block = await logseq.Editor.getBlock('block-uuid-here');

// Query with Datalog
const results = await logseq.DB.q(`
  [:find (pull ?b [*])
   :where [?b :block/marker "TODO"]]
`);

Write Content

// Create a new page
await logseq.Editor.createPage('Project Notes', {
  tags: 'project',
  status: 'active'
}, { redirect: false });

// Insert a block
const block = await logseq.Editor.insertBlock(
  'target-block-uuid',
  '- New task item',
  { before: false, sibling: true }
);

// Update a block
await logseq.Editor.updateBlock('block-uuid', 'Updated content');

// Batch insert multiple blocks
const blocks = [
  { content: 'First item' },
  { content: 'Second item', children: [
    { content: 'Nested item' }
  ]}
];
await logseq.Editor.insertBatchBlock('parent-uuid', blocks, { sibling: false });

Task Management

// Find all TODO items
const todos = await logseq.DB.q(`
  [:find (pull ?b [*])
   :where
   [?b :block/marker ?marker]
   [(contains? #{"TODO" "DOING"} ?marker)]]
`);

// Mark task as DONE
await logseq.Editor.updateBlock('task-uuid', 'DONE Task content');

// Get tasks on current page
const page = await logseq.Editor.getCurrentPage();
const blocks = await logseq.Editor.getPageBlocksTree(page.name);
const tasks = blocks.filter(b => b.marker === 'TODO' || b.marker === 'DOING');

Navigation and UI

// Navigate to a page
logseq.App.pushState('page', { name: 'Project Notes' });

// Show notification
logseq.UI.showMsg('✅ Task completed!', 'success');

// Get app config
const configs = await logseq.App.getUserConfigs();
console.log('Theme:', configs.preferredThemeMode);
console.log('Format:', configs.preferredFormat);

Implementation Approaches

Since Logseq's Plugin API is browser-based, you have several options:

Option 1: Bridge Plugin

Create a minimal Logseq plugin that exposes API calls via HTTP:

// In Logseq plugin (index.js)
logseq.ready(() => {
  // Expose API endpoints
  logseq.provideModel({
    async handleAPICall({ method, args }) {
      return await logseq.Editor[method](...args);
    }
  });
});

// Then call from external script via HTTP POST

Option 2: Node.js Script with @logseq/libs

For automation scripts, use the @logseq/libs package:

npm install @logseq/libs

Note: This requires a running Logseq instance and proper connection setup.

Option 3: Direct Plugin Development

Develop a full Logseq plugin following the plugin samples at: https://github.com/logseq/logseq-plugin-samples

API Reference

For complete API documentation, see:

  • API Docs: https://logseq.github.io/plugins/
  • Plugin Samples: https://github.com/logseq/logseq-plugin-samples
  • Type Definitions: references/api-types.md (extracted from @logseq/libs)

Key Data Structures

BlockEntity

{
  id: number,           // Entity ID
  uuid: string,         // Block UUID
  content: string,      // Block content
  format: 'markdown' | 'org',
  page: { id: number }, // Parent page
  parent: { id: number }, // Parent block
  left: { id: number }, // Previous sibling
  properties: {},       // Block properties
  marker?: string,      // TODO/DOING/DONE
  children?: []         // Child blocks
}

PageEntity

{
  id: number,
  uuid: string,
  name: string,              // Page name (lowercase)
  originalName: string,       // Original case
  'journal?': boolean,
  properties: {},
  journalDay?: number,       // YYYYMMDD for journals
}

Tips & Best Practices

  1. Always check for null: API methods may return null if entity doesn't exist
  2. Use UUIDs over IDs: Block UUIDs are stable, entity IDs can change
  3. Batch operations: Use insertBatchBlock for multiple inserts
  4. Query efficiently: Datalog queries are powerful but can be slow on large graphs
  5. Properties are objects: Access with block.properties.propertyName
  6. Format matters: Respect user's preferred format (markdown vs org-mode)
  7. Async all the way: All API calls return Promises

Common Gotchas

  • Page names are lowercase: When querying, use lowercase page names
  • Journal pages: Use journalDay format (YYYYMMDD) not date strings
  • Block hierarchy: Respect parent/child relationships when inserting
  • Format differences: Markdown uses - for bullets, Org uses *
  • Properties syntax: Different between markdown (prop::) and org (:PROPERTIES:)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

94.84%
按下载量换算34,599

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills