Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add SparkElf/deepseek-harness-plus --skill knowledge-basegit clone --depth 1 https://github.com/SparkElf/deepseek-harness-plusWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sparkelf/deepseek-harness-plus/knowledge-base)<a href="https://agentmods.dev/skills/sparkelf/deepseek-harness-plus/knowledge-base"><img src="https://agentmods.dev/badge/skills/sparkelf/deepseek-harness-plus/knowledge-base/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/sparkelf/deepseek-harness-plus/knowledge-base"><img src="https://agentmods.dev/badge/skills/sparkelf/deepseek-harness-plus/knowledge-base.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00100 | $0.04525 |
| Opus 5.5 | $0.00040 | $0.01810 |
| Sonnet 5.5 | $0.00020 | $0.00905 |
| Haiku 4.5 | $0.00010 | $0.00453 |
Grade A, and why
knowledge-base scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.
知识库 — 增删改查
知识库是一个共享文档存储,不是聊天附件、不是临时工作区。用户看到的是他自己的一份视图:/workspace/kb(宿主侧 viewRoot)。这份视图里的三个顶层文件夹决定了文档的可见范围:
| 文件夹 | 谁能看到 | 用来放 |
|---|---|---|
global |
所有人 | 公司制度、通用规范、全员参考 |
department |
本部门的人 | 部门流程、值班表、本部门台账 |
personal |
只有自己 | 草稿、个人笔记、未定稿调研 |
新建文档前先想清楚它属于哪一层。 放错层的后果是可见范围错了,而移动文档需要写权限——用户可能没有那个权限去纠正。
何时用
- 用户问知识库里的某份文档、制度、条款、数据,或要求给出处(先检索,引用只用
citationtoken); - 用户要新建、上传、改名、移动、删除文档,或问某个文件/目录在哪一层;
- 用户要整理归档、生成文档摘要、定向向量化,或读写知识图谱(按下面的参考进入专项流程);
- 用户问权限边界、为什么看不到某个文件,或要求把文档放到另一个可见范围。
按需加载
主文件负责日常检索、增删改查与权限。专项流程只在需要时读取对应参考,不要一次全读:
- 整理 / 归档 / 层索引:references/organize.md
- 显式生成文档摘要:references/summarize.md
- 定向建立/补齐向量索引:references/vectorize.md
- 知识图谱主题卡与关系文档:references/graph.md
一、查(Agentic RAG:先检索,再验证,最后引用)
知识库检索不是“背答案”,也不是一上来 cat 大文件。按下面的顺序工作:
- 先判断问题形态,再选入口:
- 精确事实/单点条款:直接从
kb_search(query, topK=10)开始。FTS5 + BM25 是主召回与排序路径,支持中文/英文,先按调用者身份和可见范围过滤。不要先查“知识库状态/索引状态”,没有kb_status工具;状态只由 UI 使用。 - 广泛/比较/区别/全面/是否类问题(“有什么区别”“全面梳理”“是否允许”“分别有哪些”):先用
kb_outline(docId | citationToken)拿目录(章/节/条)和已有摘要;如果summaryStatus是missing,按需读取 references/summarize.md 生成摘要,再kb_search/kb_chunk_get读相关章节原文。用户点名了文档或给了kb://token 时直接kb_outline;不知道 docId 时先kb_search找到文档,再kb_outline展开,避免只看命中 chunk 就下结论。 - 摘要只是导航,不是引用:
kb_outline的summary、kb_search的sectionSummary/docSummary/relatedSections可能是旧 extractive 或显式生成的 llm 摘要,但都不是引用来源;引用必须使用原文 chunk 的citationtoken。
- 精确事实/单点条款:直接从
- 比较、门槛、比例、金额、日期类问题必须先发 2 个 query 变体,再合并结果(不要只发一条长句):
- 变体 A(精确术语):把问题里的制度术语直接拼起来,例如“普通决议 特别决议 三分之二 过半数”“董事会 表决 通过 比例”。
- 变体 B(实体+动作):例如“董事会 会议 召开 通知 工作日”“三重一大 重大项目 金额 门槛”。
- 数字/单位同时试常见写法:
5万元/50000元、3000元/3千。 - 两个 query 的 hits 按
citation去重合并(不要按path + line);优先保留同时命中两边的 chunk,再按分数取 topK。 - 多词 query 返回 0 时不要放弃:
kb_search会自动 relaxation(按 token 逐词搜、去重合并),结果里的relaxed: true/queries会告诉你实际查了哪些词。 - 如果 relaxation 后仍不足,最多再发 2 轮拆词/同义词(如
普通决议、特别决议、三分之二、过半数);禁止用ls逐目录翻找答案,目录列表只用于确认路径/找.md副本,不是检索手段。 - 2 轮仍无证据就明确说“资料未提供/知识库没有找到”,不能无限换词,也不能凭记忆补答案。
- 这些查询优先(或并行)用
rg在/workspace/kb视图内精确搜索:查询含 regex 元字符、引号字面量、反引号标识符、错误码、路径、file:line,或只有 1–2 个汉字。挂载隔离已保证 agent 只能看到自己的 view,普通rg就是权限内的,不需要额外封装安全工具。 kb_search0 结果、top score 偏低,或 snippet 不足以回答 → 用rg做精确/验证兜底。rg命中很多(>30 行) → 回到kb_search收敛排序,或加--glob/ 更精确 pattern,不要直接读几十个文件。- 引用只用
citationtoken:summary/sectionSummary/docSummary/relatedSections都不是引用来源,只能用来决定“读哪一章”;每条 hit 都带citation: kb://doc/<docId>/chunk/<key>(?terms=只是查看器高亮提示)。回答里原样写kb://doc/<docId>/chunk/<key>这段(写成行内代码,省略?terms=/&highlight=后缀),不要自己写:193、第N块、path:line,也不要写.docx.md/.xlsx.md/.pdf.md这类派生路径。查看器会把 token 渲染成文件名:第N块,点击会打开原文件并定位到该 chunk 的 bbox;正文只需要写条文号(如“第十五条”),位置交给 token。 - 看到
kb://doc/<docId>/chunk/<key>token,必须先调kb_chunk_get:可以传docId+chunkId,也可以直接传citation: "kb://...";chunkId支持数字 id 或 16 位 chunk_key。返回原文path、quote、heading/paragraphText、sheet/cell、page/boxes、chunkOrdinal、snippet。禁止用 bash/sqlite3 查.dataops、kb-index.sqlite或任何内部索引来解析 token;工具不可用就明确说“当前无法解析该引用”,不要逆向内部存储。 - 需要核对原文时用通用
read工具读/workspace/kb/<view相对路径>(例:hitglobal/制度.md→read /workspace/kb/global/制度.md),但引用仍然用 hit 的citationtoken;不要从read输出抄行号再拼path:line。二进制文件用ls -l/stat看大小,不要用read。 - 引用必须选“包含该 claim”的 chunk:引用前逐个核对 citation chunk 是否同时包含 claim 的实体、条款号/数字/单位;不得用同文档但不含该 claim 的相邻 chunk 凑引用。多个候选时选重叠最高且能覆盖 claim 的 chunk;没有任何 chunk 覆盖时,明确说“资料未提供”,不要编引用。PDF/扫描件的低 confidence 框带
approximate:true,回答里说明“近似定位”。 - 整题最多 3 轮检索(含 relaxation):仍无证据就明确说“知识库里没有找到”,不要凭记忆补答案。
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- astcheck.mjs 2.5 KB runs code
- cordis.patch.yml 750 B
- deploy/mineru/docker-compose.yml 2.1 KB
- deploy/mineru/Dockerfile 4.0 KB
- deploy/mineru/README.md 4.7 KB
- i18n/zh.json 895 B
- KB-SUMMARY-SKILL-EVIDENCE.md 6.3 KB
- LICENSE 1.1 KB
- package.json 3.6 KB
- README.md 23 KB
- references/graph.md 12 KB
- references/organize.md 15 KB
- references/summarize.md 7.7 KB
- references/vectorize.md 2.1 KB
- scripts/deploy-mineru.mjs 53 KB runs code
- scripts/memory-guardian.mjs 7.1 KB runs code
- scripts/migrate-graphs.mjs 4.4 KB runs code
- scripts/remap-dataset-chunks.mjs 2.6 KB runs code
- scripts/repair-chunk-key-aliases.mjs 19 KB runs code
- skills/memory-extract/i18n/zh.json 308 B
- skills/memory-guardian/i18n/zh.json 329 B
- skills/memory-sop-evaluate/i18n/zh.json 325 B
- skills/memory/i18n/zh.json 402 B
- skills/memory/references/extract.md 2.7 KB
- skills/memory/references/guardian.md 6.0 KB
- skills/memory/references/sop-evaluate.md 2.7 KB
- skills/memory/SKILL.md 3.5 KB
- src/api.ts 26 KB runs code
- src/client/auditPaging.ts 3.0 KB runs code
- src/client/departmentFolders.ts 3.7 KB runs code
- src/client/deployTarget.ts 1.9 KB runs code
- src/client/dropTargetPath.ts 3.1 KB runs code
- src/client/extractionHistory.ts 2.6 KB runs code
- src/client/graph/KnowledgeGraphTree.module.css 6.2 KB
- src/client/graph/KnowledgeGraphTree.tsx 15 KB
- src/client/graph/KnowledgeGraphView.module.css 3.2 KB
- src/client/graph/KnowledgeGraphView.tsx 17 KB
- src/client/graph/KnowledgeScopeTabs.module.css 1.0 KB
- src/client/graph/KnowledgeScopeTabs.tsx 2.0 KB
- src/client/graph/OriginBadges.module.css 2.0 KB
- src/client/graph/OriginBadges.tsx 4.0 KB
- src/client/graph/useKnowledgeGraph.ts 2.9 KB runs code
- src/client/index.ts 23 KB runs code
- src/client/insertReadiness.ts 2.8 KB runs code
- src/client/KnowledgeAudit.module.css 2.6 KB
- src/client/KnowledgeAudit.tsx 20 KB
- src/client/KnowledgeContextMenu.tsx 25 KB
- src/client/KnowledgeCreateDialog.module.css 10 KB
- src/client/KnowledgeCreateDialog.tsx 34 KB
- src/client/KnowledgeFilePreview.module.css 2.6 KB
- src/client/KnowledgeFilePreview.tsx 6.5 KB
- src/client/KnowledgeFileTree.module.css 1.3 KB
- src/client/KnowledgeFileTree.tsx 46 KB
- src/client/KnowledgeHome.module.css 14 KB
- src/client/KnowledgeHome.tsx 63 KB
- src/client/KnowledgeIndexing.tsx 9.8 KB
- src/client/KnowledgeListing.module.css 12 KB
- src/client/KnowledgeListing.tsx 35 KB
- src/client/KnowledgeLoading.module.css 3.9 KB
- src/client/KnowledgeLoading.tsx 3.8 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 232 lines · 100 tokens per session scan A c3f8e5cbdadb
knowledge-base is a skill published in the GitHub repository SparkElf/deepseek-harness-plus (1 stars, last pushed today), licensed MIT. It adds 100 tokens to every session and 4,525 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-26.
knowledge-base compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| knowledge-baseSparkElf/deepseek-harness-plus | Skill | 1 | today | MIT | A | 100 | Claude Code, Codex |
| dsh-tui-guideccch1mneyyy/dsh-TUI | Skill | 8.4k | today | MIT | A | 41 | Claude Code, Codex |
| office-docxhuiliyi37/Tianshu-harness | Skill | 1.4k | 3d ago | Apache-2.0 | A | 50 | Claude Code, Codex |
| cash-flow-snapshotsandbaseai/sandbase-skills | Skill | 213 | 7d ago | Apache-2.0 | A | 52 | Claude Code |
| excel-generatorsandbaseai/sandbase-skills | Skill | 213 | 7d ago | Apache-2.0 | A | 46 | Claude Code |
| document-parsersandbaseai/sandbase-skills | Skill | 213 | 7d ago | Apache-2.0 | A | 41 | Claude Code |
| write-docs-cnpingfanfan/hello-dsh | Skill | 110 | 2mo ago | MIT | A | 46 | Claude Code, Codex |