[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GWH4550MN88YYD82Z7CYA7":3,"skill-same:01M6GWH4550MN88YYD82Z7CYA7":106},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":85,"commitSha":86,"skillDirectory":87,"forksCount":14,"repositoryHtmlUrl":88,"repositoryHomepageUrl":89,"ownerHtmlUrl":90,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":91,"install":92,"resources":105},"01M6GWH4550MN88YYD82Z7CYA7","siyuan",null,"SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.","ibragimov-oasis\u002Fname-navigator","ibragimov-oasis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F240665573?v=4","01M6DF78Y45R8228FHAZ7G6JXM","IBRAGIMOV MUKHAMMADJON","01M6DF792RGGYNSN2BMSED45SJ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fskills-hermes\u002Fhermes\u002Foptional\u002Fproductivity\u002Fsiyuan\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[5,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"desktop app","reading","URL","remote","app","token","knowledge base","self","artifact","notion","instances","default","self-hosted","pkm","knowledge","api","notes","documents","obsidian","2026-11-10 10:12:30",false,"---\nname: siyuan\ndescription: SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.\nversion: 1.0.0\nauthor: FEUAZUR\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [SiYuan, Notes, Knowledge Base, PKM, API]\n    related_skills: [obsidian, notion]\n    homepage: https:\u002F\u002Fgithub.com\u002Fsiyuan-note\u002Fsiyuan\nprerequisites:\n  env_vars: [SIYUAN_TOKEN]\n  commands: [curl, jq]\nrequired_environment_variables:\n  - name: SIYUAN_TOKEN\n    prompt: SiYuan API token\n    help: \"Settings > About in SiYuan desktop app\"\n  - name: SIYUAN_URL\n\n  - domain\u002Fskills\n  - artifact\u002Fskill\n  - source\u002Fskills-hermes    prompt: SiYuan instance URL (default http:\u002F\u002F127.0.0.1:6806)\n    required_for: remote instances\n---\n\n# SiYuan Note API\n\nUse the [SiYuan](https:\u002F\u002Fgithub.com\u002Fsiyuan-note\u002Fsiyuan) 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.\n\n## Prerequisites\n\n1. Install and run SiYuan (desktop or Docker)\n2. Get your API token: **Settings > About > API token**\n3. Store it in `~\u002F.hermes\u002F.env`:\n   ```\n   SIYUAN_TOKEN=your_token_here\n   SIYUAN_URL=http:\u002F\u002F127.0.0.1:6806\n   ```\n   `SIYUAN_URL` defaults to `http:\u002F\u002F127.0.0.1:6806` if not set.\n\n## API Basics\n\nAll SiYuan API calls are **POST with JSON body**. Every request follows this pattern:\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002F...\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"param\": \"value\"}'\n```\n\nResponses are JSON with this structure:\n```json\n{\"code\": 0, \"msg\": \"\", \"data\": { ... }}\n```\n`code: 0` means success. Any other value is an error -- check `msg` for details.\n\n**ID format:** SiYuan IDs look like `20210808180117-6v0mkxr` (14-digit timestamp + 7 alphanumeric chars).\n\n## Quick Reference\n\n| Operation | Endpoint |\n|-----------|----------|\n| Full-text search | `\u002Fapi\u002Fsearch\u002FfullTextSearchBlock` |\n| SQL query | `\u002Fapi\u002Fquery\u002Fsql` |\n| Read block | `\u002Fapi\u002Fblock\u002FgetBlockKramdown` |\n| Read children | `\u002Fapi\u002Fblock\u002FgetChildBlocks` |\n| Get path | `\u002Fapi\u002Ffiletree\u002FgetHPathByID` |\n| Get attributes | `\u002Fapi\u002Fattr\u002FgetBlockAttrs` |\n| List notebooks | `\u002Fapi\u002Fnotebook\u002FlsNotebooks` |\n| List documents | `\u002Fapi\u002Ffiletree\u002FlistDocsByPath` |\n| Create notebook | `\u002Fapi\u002Fnotebook\u002FcreateNotebook` |\n| Create document | `\u002Fapi\u002Ffiletree\u002FcreateDocWithMd` |\n| Append block | `\u002Fapi\u002Fblock\u002FappendBlock` |\n| Update block | `\u002Fapi\u002Fblock\u002FupdateBlock` |\n| Rename document | `\u002Fapi\u002Ffiletree\u002FrenameDocByID` |\n| Set attributes | `\u002Fapi\u002Fattr\u002FsetBlockAttrs` |\n| Delete block | `\u002Fapi\u002Fblock\u002FdeleteBlock` |\n| Delete document | `\u002Fapi\u002Ffiletree\u002FremoveDocByID` |\n| Export as Markdown | `\u002Fapi\u002Fexport\u002FexportMdContent` |\n\n## Common Operations\n\n### Search (Full-Text)\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fsearch\u002FfullTextSearchBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"query\": \"meeting notes\", \"page\": 0}' | jq '.data.blocks[:5]'\n```\n\n### Search (SQL)\n\nQuery the blocks database directly. Only SELECT statements are safe.\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fquery\u002Fsql\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"stmt\": \"SELECT id, content, type, box FROM blocks WHERE content LIKE '\\''%keyword%'\\'' AND type='\\''p'\\'' LIMIT 20\"}' | jq '.data'\n```\n\nUseful columns: `id`, `parent_id`, `root_id`, `box` (notebook ID), `path`, `content`, `type`, `subtype`, `created`, `updated`.\n\n### Read Block Content\n\nReturns block content in Kramdown (Markdown-like) format.\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FgetBlockKramdown\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data.kramdown'\n```\n\n### Read Child Blocks\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FgetChildBlocks\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data'\n```\n\n### Get Human-Readable Path\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FgetHPathByID\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data'\n```\n\n### Get Block Attributes\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fattr\u002FgetBlockAttrs\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data'\n```\n\n### List Notebooks\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fnotebook\u002FlsNotebooks\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}' | jq '.data.notebooks[] | {id, name, closed}'\n```\n\n### List Documents in a Notebook\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FlistDocsByPath\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"notebook\": \"NOTEBOOK_ID\", \"path\": \"\u002F\"}' | jq '.data.files[] | {id, name}'\n```\n\n### Create a Document\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FcreateDocWithMd\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"notebook\": \"NOTEBOOK_ID\",\n    \"path\": \"\u002FMeeting Notes\u002F2026-03-22\",\n    \"markdown\": \"# Meeting Notes\\n\\n- Discussed project timeline\\n- Assigned tasks\"\n  }' | jq '.data'\n```\n\n### Create a Notebook\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fnotebook\u002FcreateNotebook\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\": \"My New Notebook\"}' | jq '.data.notebook.id'\n```\n\n### Append Block to Document\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FappendBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"parentID\": \"DOCUMENT_OR_BLOCK_ID\",\n    \"data\": \"New paragraph added at the end.\",\n    \"dataType\": \"markdown\"\n  }' | jq '.data'\n```\n\nAlso available: `\u002Fapi\u002Fblock\u002FprependBlock` (same params, inserts at the beginning) and `\u002Fapi\u002Fblock\u002FinsertBlock` (uses `previousID` instead of `parentID` to insert after a specific block).\n\n### Update Block Content\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FupdateBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"id\": \"BLOCK_ID\",\n    \"data\": \"Updated content here.\",\n    \"dataType\": \"markdown\"\n  }' | jq '.data'\n```\n\n### Rename a Document\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FrenameDocByID\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"DOCUMENT_ID\", \"title\": \"New Title\"}'\n```\n\n### Set Block Attributes\n\nCustom attributes must be prefixed with `custom-`:\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fattr\u002FsetBlockAttrs\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"id\": \"BLOCK_ID\",\n    \"attrs\": {\n      \"custom-status\": \"reviewed\",\n      \"custom-priority\": \"high\"\n    }\n  }'\n```\n\n### Delete a Block\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FdeleteBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"BLOCK_ID\"}'\n```\n\nTo delete a whole document: use `\u002Fapi\u002Ffiletree\u002FremoveDocByID` with `{\"id\": \"DOC_ID\"}`.\nTo delete a notebook: use `\u002Fapi\u002Fnotebook\u002FremoveNotebook` with `{\"notebook\": \"NOTEBOOK_ID\"}`.\n\n### Export Document as Markdown\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fexport\u002FexportMdContent\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"DOCUMENT_ID\"}' | jq -r '.data.content'\n```\n\n## Block Types\n\nCommon `type` values in SQL queries:\n\n| Type | Description |\n|------|-------------|\n| `d` | Document (root block) |\n| `p` | Paragraph |\n| `h` | Heading |\n| `l` | List |\n| `i` | List item |\n| `c` | Code block |\n| `m` | Math block |\n| `t` | Table |\n| `b` | Blockquote |\n| `s` | Super block |\n| `html` | HTML block |\n\n## Pitfalls\n\n- **All endpoints are POST** -- even read-only operations. Do not use GET.\n- **SQL safety**: only use SELECT queries. INSERT\u002FUPDATE\u002FDELETE\u002FDROP are dangerous and should never be sent.\n- **ID validation**: IDs match the pattern `YYYYMMDDHHmmss-xxxxxxx`. Reject anything else.\n- **Error responses**: always check `code != 0` in responses before processing `data`.\n- **Large documents**: block content and export results can be very large. Use `LIMIT` in SQL and pipe through `jq` to extract only what you need.\n- **Notebook IDs**: when working with a specific notebook, get its ID first via `lsNotebooks`.\n\n## Alternative: MCP Server\n\nIf you prefer a native integration instead of curl, install the SiYuan MCP server:\n\n```yaml\n# In ~\u002F.hermes\u002Fconfig.yaml under mcp_servers:\nmcp_servers:\n  siyuan:\n    command: npx\n    args: [\"-y\", \"@porkll\u002Fsiyuan-mcp\"]\n    env:\n      SIYUAN_TOKEN: \"your_token\"\n      SIYUAN_URL: \"http:\u002F\u002F127.0.0.1:6806\"\n```\n\n## ? Связи\n\n- [[MOC - Skills]] — Skills library\n- [[skills\u002Fskills-hermes]] — Category: skills-hermes\n\n","# SiYuan Note API\n\nUse the [SiYuan](https:\u002F\u002Fgithub.com\u002Fsiyuan-note\u002Fsiyuan) 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.\n\n## Prerequisites\n\n1. Install and run SiYuan (desktop or Docker)\n2. Get your API token: **Settings > About > API token**\n3. Store it in `~\u002F.hermes\u002F.env`:\n   ```\n   SIYUAN_TOKEN=your_token_here\n   SIYUAN_URL=http:\u002F\u002F127.0.0.1:6806\n   ```\n   `SIYUAN_URL` defaults to `http:\u002F\u002F127.0.0.1:6806` if not set.\n\n## API Basics\n\nAll SiYuan API calls are **POST with JSON body**. Every request follows this pattern:\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002F...\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"param\": \"value\"}'\n```\n\nResponses are JSON with this structure:\n```json\n{\"code\": 0, \"msg\": \"\", \"data\": { ... }}\n```\n`code: 0` means success. Any other value is an error -- check `msg` for details.\n\n**ID format:** SiYuan IDs look like `20210808180117-6v0mkxr` (14-digit timestamp + 7 alphanumeric chars).\n\n## Quick Reference\n\n| Operation | Endpoint |\n|-----------|----------|\n| Full-text search | `\u002Fapi\u002Fsearch\u002FfullTextSearchBlock` |\n| SQL query | `\u002Fapi\u002Fquery\u002Fsql` |\n| Read block | `\u002Fapi\u002Fblock\u002FgetBlockKramdown` |\n| Read children | `\u002Fapi\u002Fblock\u002FgetChildBlocks` |\n| Get path | `\u002Fapi\u002Ffiletree\u002FgetHPathByID` |\n| Get attributes | `\u002Fapi\u002Fattr\u002FgetBlockAttrs` |\n| List notebooks | `\u002Fapi\u002Fnotebook\u002FlsNotebooks` |\n| List documents | `\u002Fapi\u002Ffiletree\u002FlistDocsByPath` |\n| Create notebook | `\u002Fapi\u002Fnotebook\u002FcreateNotebook` |\n| Create document | `\u002Fapi\u002Ffiletree\u002FcreateDocWithMd` |\n| Append block | `\u002Fapi\u002Fblock\u002FappendBlock` |\n| Update block | `\u002Fapi\u002Fblock\u002FupdateBlock` |\n| Rename document | `\u002Fapi\u002Ffiletree\u002FrenameDocByID` |\n| Set attributes | `\u002Fapi\u002Fattr\u002FsetBlockAttrs` |\n| Delete block | `\u002Fapi\u002Fblock\u002FdeleteBlock` |\n| Delete document | `\u002Fapi\u002Ffiletree\u002FremoveDocByID` |\n| Export as Markdown | `\u002Fapi\u002Fexport\u002FexportMdContent` |\n\n## Common Operations\n\n### Search (Full-Text)\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fsearch\u002FfullTextSearchBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"query\": \"meeting notes\", \"page\": 0}' | jq '.data.blocks[:5]'\n```\n\n### Search (SQL)\n\nQuery the blocks database directly. Only SELECT statements are safe.\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fquery\u002Fsql\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"stmt\": \"SELECT id, content, type, box FROM blocks WHERE content LIKE '\\''%keyword%'\\'' AND type='\\''p'\\'' LIMIT 20\"}' | jq '.data'\n```\n\nUseful columns: `id`, `parent_id`, `root_id`, `box` (notebook ID), `path`, `content`, `type`, `subtype`, `created`, `updated`.\n\n### Read Block Content\n\nReturns block content in Kramdown (Markdown-like) format.\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FgetBlockKramdown\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data.kramdown'\n```\n\n### Read Child Blocks\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FgetChildBlocks\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data'\n```\n\n### Get Human-Readable Path\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FgetHPathByID\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data'\n```\n\n### Get Block Attributes\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fattr\u002FgetBlockAttrs\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"20210808180117-6v0mkxr\"}' | jq '.data'\n```\n\n### List Notebooks\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fnotebook\u002FlsNotebooks\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}' | jq '.data.notebooks[] | {id, name, closed}'\n```\n\n### List Documents in a Notebook\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FlistDocsByPath\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"notebook\": \"NOTEBOOK_ID\", \"path\": \"\u002F\"}' | jq '.data.files[] | {id, name}'\n```\n\n### Create a Document\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FcreateDocWithMd\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"notebook\": \"NOTEBOOK_ID\",\n    \"path\": \"\u002FMeeting Notes\u002F2026-03-22\",\n    \"markdown\": \"# Meeting Notes\\n\\n- Discussed project timeline\\n- Assigned tasks\"\n  }' | jq '.data'\n```\n\n### Create a Notebook\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fnotebook\u002FcreateNotebook\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\": \"My New Notebook\"}' | jq '.data.notebook.id'\n```\n\n### Append Block to Document\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FappendBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"parentID\": \"DOCUMENT_OR_BLOCK_ID\",\n    \"data\": \"New paragraph added at the end.\",\n    \"dataType\": \"markdown\"\n  }' | jq '.data'\n```\n\nAlso available: `\u002Fapi\u002Fblock\u002FprependBlock` (same params, inserts at the beginning) and `\u002Fapi\u002Fblock\u002FinsertBlock` (uses `previousID` instead of `parentID` to insert after a specific block).\n\n### Update Block Content\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FupdateBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"id\": \"BLOCK_ID\",\n    \"data\": \"Updated content here.\",\n    \"dataType\": \"markdown\"\n  }' | jq '.data'\n```\n\n### Rename a Document\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Ffiletree\u002FrenameDocByID\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"DOCUMENT_ID\", \"title\": \"New Title\"}'\n```\n\n### Set Block Attributes\n\nCustom attributes must be prefixed with `custom-`:\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fattr\u002FsetBlockAttrs\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"id\": \"BLOCK_ID\",\n    \"attrs\": {\n      \"custom-status\": \"reviewed\",\n      \"custom-priority\": \"high\"\n    }\n  }'\n```\n\n### Delete a Block\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fblock\u002FdeleteBlock\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"BLOCK_ID\"}'\n```\n\nTo delete a whole document: use `\u002Fapi\u002Ffiletree\u002FremoveDocByID` with `{\"id\": \"DOC_ID\"}`.\nTo delete a notebook: use `\u002Fapi\u002Fnotebook\u002FremoveNotebook` with `{\"notebook\": \"NOTEBOOK_ID\"}`.\n\n### Export Document as Markdown\n\n```bash\ncurl -s -X POST \"${SIYUAN_URL:-http:\u002F\u002F127.0.0.1:6806}\u002Fapi\u002Fexport\u002FexportMdContent\" \\\n  -H \"Authorization: Token $SIYUAN_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"id\": \"DOCUMENT_ID\"}' | jq -r '.data.content'\n```\n\n## Block Types\n\nCommon `type` values in SQL queries:\n\n| Type | Description |\n|------|-------------|\n| `d` | Document (root block) |\n| `p` | Paragraph |\n| `h` | Heading |\n| `l` | List |\n| `i` | List item |\n| `c` | Code block |\n| `m` | Math block |\n| `t` | Table |\n| `b` | Blockquote |\n| `s` | Super block |\n| `html` | HTML block |\n\n## Pitfalls\n\n- **All endpoints are POST** -- even read-only operations. Do not use GET.\n- **SQL safety**: only use SELECT queries. INSERT\u002FUPDATE\u002FDELETE\u002FDROP are dangerous and should never be sent.\n- **ID validation**: IDs match the pattern `YYYYMMDDHHmmss-xxxxxxx`. Reject anything else.\n- **Error responses**: always check `code != 0` in responses before processing `data`.\n- **Large documents**: block content and export results can be very large. Use `LIMIT` in SQL and pipe through `jq` to extract only what you need.\n- **Notebook IDs**: when working with a specific notebook, get its ID first via `lsNotebooks`.\n\n## Alternative: MCP Server\n\nIf you prefer a native integration instead of curl, install the SiYuan MCP server:\n\n```yaml\n# In ~\u002F.hermes\u002Fconfig.yaml under mcp_servers:\nmcp_servers:\n  siyuan:\n    command: npx\n    args: [\"-y\", \"@porkll\u002Fsiyuan-mcp\"]\n    env:\n      SIYUAN_TOKEN: \"your_token\"\n      SIYUAN_URL: \"http:\u002F\u002F127.0.0.1:6806\"\n```\n\n## ? Связи\n\n- [[MOC - Skills]] — Skills library\n- [[skills\u002Fskills-hermes]] — Category: skills-hermes\n\n",{"name":5,"author":56,"license":15,"version":57,"metadata":58,"description":7,"prerequisites":68,"required_environment_variables":74},"FEUAZUR","1.0.0",{"hermes":59},{"tags":60,"homepage":66,"related_skills":67},[61,62,63,64,65],"SiYuan","Notes","Knowledge Base","PKM","API","https:\u002F\u002Fgithub.com\u002Fsiyuan-note\u002Fsiyuan",[50,41],{"commands":69,"env_vars":72},[70,71],"curl","jq",[73],"SIYUAN_TOKEN",[75,78,80,81,82],{"help":76,"name":73,"prompt":77},"Settings > About in SiYuan desktop app","SiYuan API token",{"name":79},"SIYUAN_URL","domain\u002Fskills","artifact\u002Fskill",{"required_for":83,"source\u002Fskills-hermes    prompt":84},"remote instances","SiYuan instance URL (default http:\u002F\u002F127.0.0.1:6806)","main","3a0e8170d69effdc8a555eee4b80b943f47fe6b2",".claude\u002Fskills\u002Fskills-hermes\u002Fhermes\u002Foptional\u002Fproductivity\u002Fsiyuan","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator","https:\u002F\u002Fname-navigator.vercel.app","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis","2026-11-03 18:37:11",{"source":8,"skillName":5,"commands":93,"prompt":103,"zipAvailable":104},[94,97,100],{"tool":95,"command":96},"npx","npx skills add ibragimov-oasis\u002Fname-navigator --skill siyuan",{"tool":98,"command":99},"bunx","bunx skills add ibragimov-oasis\u002Fname-navigator --skill siyuan",{"tool":101,"command":102},"pnpm","pnpm dlx skills add ibragimov-oasis\u002Fname-navigator --skill siyuan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fskills-hermes\u002Fhermes\u002Foptional\u002Fproductivity\u002Fsiyuan\u002FSKILL.md",true,[],[107,136,164,192,213,234],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":117,"publishedAt":51},"01M6H16XFT30RK9RWGFB4M9KGG","transloadit-media-processing","Process media files (video, audio, images, documents) using Transloadit. Use when asked to encode video to HLS\u002FMP4, generate thumbnails, resize or watermark images, extract audio, concatenate clips, add subtitles, OCR documents, or run any media processing pipeline. Covers 86+ processing robots for file transformation at scale.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftransloadit-media-processing\u002FSKILL.md",[113,116],{"categoryNo":114,"categoryName":115,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[118,119,120,121,122,123,124,125,49,126,127,128,129,130,131,132,133,134,40,135],"transloadit media processing","Media","media processing","processing","MCP","cli","mcp server","copilot","generate","server","pipeline","ocr","Video","Audio","images","files","thumbnails","free",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":145,"publishedAt":51},"01M6H16MZ628556VXNEG9PRDK2","terraform-azurerm-set-diff-analyzer","Analyze Terraform plan JSON output for AzureRM Provider to distinguish between false-positive diffs (order-only changes in Set-type attributes) and actual resource changes. Use when reviewing terraform plan output for Azure resources like Application Gateway, Load Balancer, Firewall, Front Door, NSG, and other resources with Set-type attributes that cause spurious diffs due to internal ordering changes.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fterraform-azurerm-set-diff-analyzer\u002FSKILL.md",[142],{"categoryNo":143,"categoryName":144,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",[146,147,148,149,150,151,125,152,153,154,155,156,157,40,158,159,160,161,162,163],"terraform","SET","terraform azurerm set diff analyzer","diff","analyzer","diffs","JSON Output","firewall","false-positive","plan","analyze","only","false","resources","load balancer","attributes","source\u002Fskills-copilot","source",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":176,"publishedAt":51},"01M6H12YWM6E909XH6JN4428RN","refactor","Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Frefactor\u002FSKILL.md",[170,173],{"categoryNo":171,"categoryName":172,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":174,"categoryName":175,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",[166,177,125,178,179,180,181,182,183,184,185,186,187,188,40,189,190,191,162,163],"design","code","Type Safety","Safety","improve","refactoring","repo","use","design patterns","code refactoring","patterns","domain","extracting","Variables","for",{"skillNo":193,"name":194,"nameZh":6,"description":195,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":196,"categories":197,"keywords":201,"publishedAt":51},"01M6H11GN772CMEJ2R70TXG7SS","prd","Generate high-quality Product Requirements Documents (PRDs) for software systems and AI-powered features. Includes executive summaries, user stories, technical specifications, and risk analysis.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fprd\u002FSKILL.md",[198],{"categoryNo":199,"categoryName":200,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000031","产品经理",[194,125,49,126,202,203,204,205,188,40,206,207,208,209,210,211,191,162,163,212],"product","risk","analysis","technical","requirements","software","Product Requirements","user stories","high","domain\u002Fagents","summaries",{"skillNo":214,"name":215,"nameZh":6,"description":216,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":217,"categories":218,"keywords":219,"publishedAt":51},"01M6H0ZF4BS1GC60K8WCCVCH6G","plantuml-ascii","Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or mentions plantuml ascii, text diagram, ascii art diagram. Supports: Converting PlantUML diagrams to ASCII art, Creating sequence diagrams, class diagrams, flowcharts in ASCII format, Generating Unicode-enhanced ASCII art with -utxt flag","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fplantuml-ascii\u002FSKILL.md",[],[220,221,222,223,125,224,225,126,226,227,228,229,230,231,188,40,232,233,162,163],"plantuml","plantuml ascii","ascii","terminal","diagram","create","Bash","text","read","write","diagrams","Art","Unicode","mode",{"skillNo":235,"name":236,"nameZh":6,"description":237,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":238,"categories":239,"keywords":243,"publishedAt":51},"01M6H0X7BMJD69GTGE6DDZCYF8","msstore-cli","Microsoft Store Developer CLI (msstore) for publishing Windows applications to the Microsoft Store. Use when asked to configure Store credentials, list Store apps, check submission status, publish submissions, manage package flights, set up CI\u002FCD for Store publishing, or integrate with Partner Center. Supports Windows App SDK\u002FWinUI, UWP, .NET MAUI, Flutter, Electron, React Native, and PWA applications.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fname-navigator\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmsstore-cli\u002FSKILL.md",[240,241,242],{"categoryNo":143,"categoryName":144,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[123,244,245,246,125,247,248,249,147,250,251,252,253,254,255,40,36,256,257,258],"msstore cli","react","status","uwp","ci","publish","credentials","configure","pwa","react native","integrate","up","apps","native","CI\u002FCD"]