2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill logseq- _meta.json265 B
- SKILL.md7.4 KB
Overview
This skill provides commands to interact with a local Logseq instance through the Plugin API. It enables creating and updating pages and blocks, running Datalog queries, managing tasks, and automating common workflows against a running Logseq graph. It requires a locally running Logseq instance with the API exposed (bridge plugin, @logseq/libs, or direct plugin).
How this skill works
The skill calls core Plugin API namespaces (App, Editor, DB, UI, Git, Assets) to read and write the graph. It issues Editor operations to create/update blocks and pages, uses DB.q for Datalog queries, and leverages App/UI for navigation and notifications. External scripts must connect via a bridge or use @logseq/libs to proxy calls into the running Logseq process.
When to use it
- Automate daily notes creation or prefill templates
- Bulk import, update, or reorganize blocks and pages
- Run graph-wide Datalog queries to find tasks, links, or metadata
- Build custom task workflows and mark TODO/DONE programmatically
- Integrate Logseq with external tools via a bridge or script
Best practices
- Ensure Logseq is running locally and the API is exposed before calling endpoints
- Prefer block UUIDs over numeric IDs for stable references
- Check for null returns from API calls and handle missing entities gracefully
- Use batch insert operations when adding many blocks to reduce overhead
- Respect user format (markdown vs org-mode) and journalDay conventions
Example use cases
- Create a project page, add nested task blocks, and tag metadata automatically
- Query all TODO and DOING markers across the graph for a status report
- Insert daily note template into today's journal page with prefilled tasks and links
- Export list of pages or assets, or trigger a git commit via the Git proxy
- Build a slash command that inserts canned content or runs a custom Datalog query
FAQ
Yes. The skill only works against a locally running Logseq instance with the API accessible via a bridge, plugin, or @logseq/libs connection.
Which API methods are used for queries and edits?
Use logseq.DB.q for Datalog queries and logseq.Editor methods (insertBlock, updateBlock, getPageBlocksTree, createPage) for reading and writing content.
How do I reference a block reliably?
Use the block UUID property; numeric entity IDs may change over time and across exports.