Siyuan Skill logo

Siyuan Skill

Community
dazexcl
siyuan-skill

思源笔记工具,支持笔记本管理、文档操作、内容搜索、块控制。当用户操作思源笔记、管理笔记本、创建/更新/删除文档、搜索内容、管理块时调用。

Overview

Publisherdazexcl
Repositorysiyuan-skill
Skill namesiyuan-skill
Stars
88
Forks
8
Bundled files
95
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 95 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by dazexcl on GitHub. Read the source before you install it.

Installation

Install the Siyuan Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dazexcl/siyuan-skill/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dazexcl/siyuan-skill.git \
  .claude/skills/siyuan-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Siyuan Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Siyuan Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Siyuan Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

运行要求: Node.js >= 14.0.0, 思源笔记 >= 3.6.0 安装: 从 ClawHub 下载

快速开始

bash
node {baseDir}/scripts/<command>.js [options]
node {baseDir}/scripts/<command>.js --help  # 查看命令帮助

场景化快速开始

💡 根据你的任务场景,快速找到对应的命令和工作流

我要...

场景核心命令详细文档
创建新文档create.js文档工作流示例
更新文档内容update.js / block-update.js基础用法示例
搜索内容search.js向量搜索配置
删除文档delete.js删除保护文档 ⚠️
批量操作search.js + 其他命令批量整理文档
使用语义搜索search.js --mode semantic向量搜索文档
遇到权限问题-配置说明
遇到删除问题-删除保护文档
遇到搜索问题-向量搜索配置
写入内容格式错误-格式标准

📋 更多场景:troubleshooting.md

命令列表

笔记本/文档操作

脚本说明示例
notebooks列出笔记本node {baseDir}/scripts/notebooks.js
structure查看文档结构node {baseDir}/scripts/structure.js <notebookId|docId>
content获取文档内容node {baseDir}/scripts/content.js <docId>
info获取文档/块信息node {baseDir}/scripts/info.js <docId> [--raw]
create创建文档node {baseDir}/scripts/create.js <title> --parent-id <id> 或 --path <path>
update更新文档node {baseDir}/scripts/update.js <docId> --content <md>
delete删除文档node {baseDir}/scripts/delete.js <docId>
move移动文档node {baseDir}/scripts/move.js <docId|path> --target <notebookId|path>
rename重命名文档node {baseDir}/scripts/rename.js <docId> <title>
protect保护/取消保护node {baseDir}/scripts/protect.js <docId>
exists检查文档存在node {baseDir}/scripts/exists.js --title <title>
convertID与路径转换node {baseDir}/scripts/convert.js --id <id>
icon设置/获取图标node {baseDir}/scripts/icon.js <id> [emoji] 或 --remove

块操作

脚本说明示例
block-get获取块信息node {baseDir}/scripts/block-get.js <blockId>
block-insert插入块node {baseDir}/scripts/block-insert.js "内容" --parent-id <id>
block-update更新块node {baseDir}/scripts/block-update.js <blockId> --content <md>
block-delete删除块node {baseDir}/scripts/block-delete.js <blockId>
block-move移动块node {baseDir}/scripts/block-move.js <blockId> --parent-id <parentId>
block-fold折叠/展开node {baseDir}/scripts/block-fold.js <blockId> --action fold
block-transfer转移引用node {baseDir}/scripts/block-transfer.js <srcId> <tgtId>
block-attrs块属性node {baseDir}/scripts/block-attrs.js <blockId> --set key=value

搜索/索引

脚本说明示例
search搜索内容node {baseDir}/scripts/search.js <query> --mode keyword
tags标签管理node {baseDir}/scripts/tags.js <docId|blockId> --add tag1,tag2
index索引到向量库node {baseDir}/scripts/index.js --notebook <id>
nlpNLP分析node {baseDir}/scripts/nlp.js <text>

关键规则

ID 区分

  • 文档操作 (update/delete/move/rename) 接受文档 ID(部分命令也支持路径)
  • 块操作 (block-update/block-delete 等) 只接受块 ID
  • 混用会导致错误, 详见 快速参考

删除保护

  • 默认禁止删除文档, 需用户手动在 config.json 中启用
  • 保护层级: 全局安全模式 → 文档保护标记 → 删除确认机制
  • Agent 禁止自动修改删除配置
  • 详见 安全文档

权限验证

  • 支持 permissionMode: all(默认) / whitelist / blacklist
  • 写入操作 (create/update/delete/move 等) 会检查笔记本权限
  • 通过 SIYUAN_NOTEBOOK_LIST 环境变量配置笔记本列表

格式规范(重要)

写入思源笔记时必须遵循以下格式:

场景正确格式错误格式
内部链接((id "锚文本"))[文本](id) ❌
动态锚文本((id '锚文本'))((id 锚文本)) ❌
换行\\n直接换行
段落分隔\\n\\n单个 \n

📋 完整规范:format-standard.md | 快速参考:quick-reference.md

搜索模式

模式说明适用场景
legacySQL LIKE精确关键词
keywordBM25 + N-gram关键词匹配
semantic语义向量同义词、概念
hybrid稠密+稀疏综合搜索

向量搜索需配置 QDRANT_URL + OLLAMA_BASE_URL


标准工作流

创建: exists 检查 → create (或 --force)
修改: content 获取 → 判断范围 → update (全文) 或 block-update (单块)
搜索: search 查询 → content 查看 → update/block-update 修改
删除: protect 检查 → delete

📋 完整工作流示例见 examples/basic-usage.md


参考文档

📋 必读文档

文档用途何时阅读
SKILL.md本文档,核心入口首次使用必读
troubleshooting.md问题解决索引遇到问题时查阅
quick-reference.md快速决策表选择命令时查阅
format-standard.md格式规范写入内容前查阅

🔧 配置与权限

文档用途
配置说明环境变量和 config.json 配置
高级配置完整配置选项

🚀 进阶功能

文档用途
向量搜索语义搜索配置和使用
删除保护删除保护机制说明
最佳实践使用建议和技巧
安全文档安全最佳实践

📖 示例文档

文档用途
基础用法常用命令示例
文档工作流完整任务场景示例
块操作指南块级操作详解

🎯 快速导航


🔧 遇到问题?

如果在使用过程中遇到任何问题,请按以下步骤排查:

1. 查看错误信息

错误信息中通常会包含:

  • 错误原因
  • 解决方案提示
  • 相关文档链接

2. 查阅问题解决索引

📋 troubleshooting.md - 按错误信息和任务场景组织的完整问题索引

3. 查看快速参考

📋 quick-reference.md - 命令决策表和常见错误预防

4. 查看详细文档

问题类型文档
连接/权限配置说明
删除问题删除保护文档
搜索问题向量搜索文档
格式问题格式标准

5. 查看示例


💡 快速链接:规范索引 | 问题解决索引


Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 35 more files.

Frequently asked questions

What does the Siyuan Skill AI skill do?

思源笔记工具,支持笔记本管理、文档操作、内容搜索、块控制。当用户操作思源笔记、管理笔记本、创建/更新/删除文档、搜索内容、管理块时调用。

Why use Siyuan Skill on TypingMind?

Because you install it once and use it with any model. Siyuan Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Siyuan Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dazexcl/siyuan-skill/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Siyuan Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Siyuan Skill?

As many as you like. As long as a model supports skills, you can use Siyuan Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Siyuan Skill AI skill free?

It is published on GitHub by dazexcl. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇