Agent skill · writing content · nousresearch

siyuan

Query and edit a SiYuan knowledge base via its API.

Why this skill is useful

Provides specific API commands and patterns for interacting with the SiYuan knowledge base that the AI wouldn't reliably generate on its own.

What it needs

Requires curl, jq installed locally. Requires siyuan account access. About 5k tokens when loaded. Last updated 2026-08-07. 226,679 stars on the source repository.

What this skill does

SiYuan Note API Use the SiYuan kernel API via curl to search, read, create, update, and delete blocks and documents in a self-hosted knowledge base. No extra tools needed -- just curl and an API token. Prerequisites 1. Install and run SiYuan (desktop or Docker) 2. Get your API token: Settings > About > API token 3. Store it in ${HERMESHOME:-~/.hermes}/.env: SIYUANURL defaults to http://127.0.0.1:6806 if not set. API Basics All SiYuan API calls are POST with JSON body. Every request follows this pattern: Responses are JSON with this structure: code: 0 means success. Any other value is an error -- check msg for details. ID format: SiYuan IDs look like 20210808180117-6v0mkxr (14-digit timestamp + 7 alphanumeric chars). Quick Reference Operation Endpoint ----------- ---------- Full-text search /api/search/fullTextSearchBlock SQL query /api/query/sql Read block /api/block/getBlockKramdown Read children /api/block/getChildBlocks Get path /api/filetree/getHPathByID Get attributes /api/attr/getBlockAttrs List notebooks /api/notebook/lsNotebooks List documents /api/filetree/listDocsByPath Create notebook /api/notebook/createNotebook Create document /api/filetree/createDocWithMd Append block /api/block/appendBlock Update block /api/block/updateBlock Rename document /api/filetree/renameDocByID Set attributes /api/attr/setBlockAttrs Delete block /api/block/deleteBlock Delete document /api/filetree/removeDocByID Export as Markdown /api/export/exportMdContent Common Operations Search (Full-Text) Search (SQL) Query the blocks database directly. Only SELECT statements are safe. Useful columns: id, parentid, rootid, box (notebook ID), path, content, type, subtype, created, updated. Read Block Content Returns block content in Kramdown (Markdown-like) format. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills nousresearch/siyuan

View the source on GitHub

Browse the @skills marketplace