agentleFS
VastFutureVastFuture/llm-wiki-skills/skills/wiki-ingest/SKILL.md

wiki-ingest

Skill0 starsChanged 3 months agoMITView on GitHub

摄入资料到 LLM Wiki 知识库。支持三种输入:URL(自动下载并整理)、Markdown 文本(直接保存)、 空参数(汇总当前对话)。保存到 raw/ 后自动触发分析:创建摘要页面、更新概念/实体页面、更新索引和日志。 触发词:摄入、导入、保存资料、整理笔记。

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use wiki-status, wiki-capture and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • nexuschainsSkill

    wiki-status

    Reports the current state of the wiki vault — page counts, category breakdown, hub pages, orphans, stale entries, and a delta showing what has changed since the last ingest. Use this skill when the operator asks "what's the status", "wiki dashboard", "how many pages", "what's stale", "what's been ingested", "show me the delta", or "wiki health overview". Also surfaces structural insights (top hubs, fragmented clusters, bridge pages) when the operator asks "wiki insights", "what's central", or "show me the hubs". Read-only: this skill reports and recommends; it does not modify any files.

    Also in 5 projects that use this

  • jehrhardtSkill

    wiki-capture

    Quickly capture raw thoughts, links, images, or notes to today's Obsidian daily note from anywhere in Pi. Use when the user wants to jot something down for later wiki processing.

    Also in 6 projects that use this

  • Ivy-Chen1999Skill

    wiki-research

    Autonomously research a topic via multi-round web search, synthesize findings, and file structured results into the Obsidian wiki. Use this skill when the user says "/wiki-research [topic]", "research X", "find everything about Y", "do a deep dive on Z", "autonomous research on X", or wants comprehensive, web-sourced knowledge on a topic filed directly into their wiki.

    Also in 5 projects that use this

  • nexuschainsSkill

    cross-linker

    Scans the wiki vault and adds missing [[wikilinks]] between pages that are related but not yet connected. Use this skill when the operator says "link my pages", "find missing links", "cross-reference the wiki", "connect my wiki", "add wikilinks", or after any large ingest to weave new pages into the existing knowledge graph. Also trigger when orphaned pages need connecting or when wiki-lint reports fragmented tag clusters. This is a write-heavy skill — it modifies page files to insert links, unlike wiki-lint which only reports.

    Also in 4 projects that use this

  • Ivy-Chen1999Skill

    wiki-setup

    Initialize a new Obsidian wiki vault with the correct structure, special files, and configuration. Use this skill when the user wants to set up a new wiki from scratch, initialize the vault structure, create the .env file, or says things like "set up my wiki", "initialize obsidian", "create a new vault", "get started with the wiki". Also use when the user needs to reconfigure their existing vault or fix a broken setup.

    Also in 5 projects that use this

  • bozhouDevSkill

    wiki-update

    Use when revising existing wiki pages because knowledge has changed, a new piece of information updates or contradicts existing content, or the user wants to directly edit wiki content with LLM assistance.

    Also in 8 projects that use this

  • +1 more from nexuschains
  • +3 more from Ivy-Chen1999

The file

Files
SKILL.md

/wiki-ingest — 摄入资料

将外部资料摄入 LLM Wiki 知识库。参考 /siyuan-send 的三种输入模式。

输入类型识别

输入格式类型处理方式
https://...URL访问网址 → 分析内容 → 生成结构化大纲 → 保存为 Markdown
整段 Markdown文本直接保存为 .md 文件
无参数对话汇总汇总当前对话历史 → 整理为笔记

执行流程

步骤 0:自动分类(前置步骤)

在执行摄入流程前,先自动执行 /wiki-classify:

  1. 使用 Skill 工具加载 wiki-classify skill
  2. 完整执行其定义的分类流程(扫描 raw/ 根目录、LLM 判定分类、git mv、添加 frontmatter、修复路径)
  3. classify 完成后继续下面的摄入流程
  4. 若 classify 发现无需分类的文件,直接跳过,不影响后续流程

步骤 1:确认 raw 目录与 kbPath

  1. 读取配置文件:
    • 优先项目模式:检查当前目录是否存在 wiki-config.json(scope: "project")
    • 全局模式:~/.config/opencode/wiki-config.json(scope: "global")
  2. 从配置中获取:
    • kbPath — 知识库根目录(wiki/ 所在位置)
    • rawPath — raw 文件存放目录
  3. 若 kbPath 或 rawPath 为空,提示用户先执行 /wiki-init 初始化知识库
  4. 确认目标目录存在(不存在则创建)

步骤 2:处理输入

URL 处理:

  • 访问网址获取网页内容
  • 识别标题层级(H1-H6),生成结构化大纲
  • 提取核心段落和关键信息
  • 笔记标题使用一句全文总结
  • 输出包含:原始 URL、获取时间、结构化大纲

Markdown 文本:

  • 直接保存为 .md 文件
  • 自动提取或生成标题

对话汇总:

  • 汇总当前对话历史
  • 格式化为对话记录
  • 包含时间戳和主题

步骤 3:保存笔记

  • 保存到 rawPath 指定的目录
  • 文件名基于内容自动生成
  • 确保 Markdown 格式正确

步骤 3.5:下载图片资源(如有)

当摄入的资料包含图片时:

  1. 确定对应的 noteFileName(raw 文件名去掉 .md 扩展名)
  2. 创建目录 {kbPath}/assets/${noteFileName}/(与 raw/ 平级)
  3. 下载所有图片到该目录
  4. 图片命名使用语义化名称(如 01-数据翻5倍订单增12倍.jpg)
  5. 在 raw 文件中使用相对路径引用:../assets/${noteFileName}/图片名.jpg

注意:图片不存放在 raw/ 下,而是存放在与 raw/ 平级的 assets/ 目录中。

步骤 4:立即触发摄入分析

保存笔记后,立即执行以下分析流程:

  1. 读取刚保存的笔记内容
  2. 在 wiki/摘要/ 创建对应的摘要页面(核心观点提炼)
  3. 在 wiki/概念/ 创建/更新相关概念页面(方法论、模式等)
  4. 在 wiki/实体/ 创建/更新相关实体页面(人名、公司、工具等)
  5. 更新 wiki/index.md(目录)
  6. 在 wiki/log.md 追加记录

Log 记录格式:## [YYYY-MM-DD] Ingest | 资料标题

步骤 5:分类管理

  • LLM 根据内容自行决定分类(摘要/概念/实体/综合)
  • 可自行创建新分类子目录(如积累大量书摘时创建 wiki/书摘/)

工具使用规则

更新 index.md、log.md 等累积性文件时:

  • 必须先用 Read 读取当前内容
  • 必须用 Edit 工具做增量修改(追加、替换)
  • 禁止用 Write 工具覆盖整个文件

Write 工具仅用于:

  • 创建全新文件
  • 用户明确要求覆盖整个文件

脚本执行优先级

需要执行脚本操作时,按以下顺序选择实现方式:

  1. Python — 检测到 Python 环境则优先使用
  2. Linux — Shell 脚本(bash/sh)
  3. Windows + Git Bash — 用 Git Bash 执行
  4. Windows(无 Git Bash) — PowerShell

语言规则

  • 始终使用简体中文
  • 英文资料先翻译为中文再写入 wiki
  • 保持 Obsidian wikilink 兼容(文件名避免特殊字符)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.