Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

reading-logseq-data读取 logseq 数据

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

259

周安装

11

GitHub Stars

3

下载量

91
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:reading-logseq-data(读取 logseq 数据)
来源仓库:https://github.com/c0ntr0lledcha0s/claude-code-plugin-automations
仓库路径:skills/reading-logseq-data
安装命令:
npx skills add https://github.com/c0ntr0lledcha0s/claude-code-plugin-automations --skill reading-logseq-data
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/c0ntr0lledcha0s/claude-code-plugin-automations --skill reading-logseq-data

简介

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。

  • 适合清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。
  • 使用时需确认数据来源、字段含义和时间范围,避免把样本数据当全量事实。
  • 涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。
  • 可结合原始 README 和仓库路径进一步核验具体用法和功能边界。

SKILL.md

Reading Logseq Data

When to Use This Skill

This skill auto-invokes when:

  • User wants to read pages or blocks from their Logseq graph
  • Fetching properties or metadata from Logseq entities
  • Executing Datalog queries against the graph
  • Searching for content in Logseq
  • Finding backlinks or references
  • User mentions "get from logseq", "fetch page", "query logseq"

Client Library: See {baseDir}/scripts/logseq-client.py for the unified API.

Available Operations

OperationDescription
get_page(title)Get page content and properties
get_block(uuid)Get block with children
search(query)Full-text search across graph
datalog_query(query)Execute Datalog query
list_pages()List all pages
get_backlinks(title)Find pages linking to this one
get_graph_info()Get current graph metadata

Quick Examples

Get a Page

from logseq_client import LogseqClient

client = LogseqClient()
page = client.get_page("My Page")
print(f"Title: {page['title']}")
print(f"Properties: {page['properties']}")

Execute Datalog Query

# Find all books with rating >= 4
results = client.datalog_query('''
    [:find (pull ?b [:block/title :user.property/rating])
     :where
     [?b :block/tags ?t]
     [?t :block/title "Book"]
     [?b :user.property/rating ?r]
     [(>= ?r 4)]]
''')

for book in results:
    print(f"{book['block/title']}: {book['user.property/rating']} stars")

Search Content

# Search for mentions of "project"
results = client.search("project")
for block in results:
    print(f"Found in: {block['page']}")
    print(f"Content: {block['content'][:100]}...")

Datalog Query Patterns

Find All Pages

[:find (pull ?p [:block/title])
 :where
 [?p :block/tags ?t]
 [?t :db/ident :logseq.class/Page]]

Find Blocks with Tag

[:find (pull ?b [*])
 :where
 [?b :block/tags ?t]
 [?t :block/title "Book"]]

Find by Property

[:find ?title ?author
 :where
 [?b :block/title ?title]
 [?b :user.property/author ?author]
 [?b :block/tags ?t]
 [?t :block/title "Book"]]

Find Tasks by Status

[:find (pull ?t [:block/title :logseq.property/status])
 :where
 [?t :block/tags ?tag]
 [?tag :db/ident :logseq.class/Task]
 [?t :logseq.property/status ?s]
 [?s :block/title "In Progress"]]

Find Backlinks

[:find (pull ?b [:block/title {:block/page [:block/title]}])
 :in $ ?page-title
 :where
 [?p :block/title ?page-title]
 [?b :block/refs ?p]]

Aggregations

;; Count books per author
[:find ?author (count ?b)
 :where
 [?b :block/tags ?t]
 [?t :block/title "Book"]
 [?b :user.property/author ?author]]

Using the Client Library

Initialization

from logseq_client import LogseqClient

# Auto-detect backend
client = LogseqClient()

# Force specific backend
client = LogseqClient(backend="http")

# Custom URL/token
client = LogseqClient(
    url="http://localhost:12315",
    token="your-token"
)

Error Handling

try:
    page = client.get_page("Nonexistent Page")
except client.NotFoundError:
    print("Page doesn't exist")
except client.ConnectionError:
    print("Cannot connect to Logseq")
except client.AuthError:
    print("Invalid token")

Batch Operations

# Get multiple pages efficiently
pages = ["Page1", "Page2", "Page3"]
results = [client.get_page(p) for p in pages]

# Or use a single query
query = '''
    [:find (pull ?p [*])
     :in $ [?titles ...]
     :where
     [?p :block/title ?titles]]
'''
results = client.datalog_query(query, [pages])

Performance Tips

  1. Use specific queries - Don't fetch more than needed
  2. Prefer pull syntax - (pull?e [:needed:fields]) vs [*]
  3. Put selective clauses first - Filter early in query
  4. Use parameters - Pass values via :in clause
  5. Batch when possible - Multiple items in one query

CLI Fallback

If HTTP API unavailable, the client falls back to CLI:

# CLI mode (automatic if HTTP fails)
client = LogseqClient(backend="cli", graph_path="/path/to/graph")

# Query still works the same way
results = client.datalog_query("[:find ?title :where [?p :block/title ?title]]")

Output Formats

Raw (default)

Returns Python dicts/lists directly from API.

Normalized

# Get normalized output
page = client.get_page("My Page", normalize=True)
# Returns: {"title": "...", "uuid": "...", "properties": {...}, "blocks": [...]}

Reference Materials

  • See {baseDir}/references/read-operations.md for all operations
  • See {baseDir}/templates/query-template.edn for query patterns

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.4%
按下载量换算31

Claude

28.12%
按下载量换算26

Cursor

19.37%
按下载量换算18

Gemini CLI

9.13%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills