reading-logseq-datalisted
Install: claude install-skill aiskillstore/marketplace
# 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
| Operation | Description |
|-----------|-------------|
| `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
```python
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
```python
# 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']} star