knowledge-base

knowledge-base is a skill for Claude Code, Codex from xerrors/Yuxi. It costs 54 tokens per session (769 once invoked), scanned A, original, MIT.

A tool for searching and reading documents stored in a configured knowledge base. It can find relevant passages, open documents, locate terms, and show the knowledge base’s mind map.

In plain words
What is it for?
Searching project materials, checking facts against source documents, finding specific sections, browsing files, and understanding how the knowledge base is organized.
Why use it?
It helps answer questions from internal or uploaded documents instead of relying on memory or unsupported guesses.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Searching project materials, checking facts against source documents, finding specific sections, browsing files, and understanding how the knowledge base is organized.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xerrors/yuxi/knowledge-base
About the project

Yuxi is a self-hosted, multi-tenant knowledge-agent platform that combines document retrieval, knowledge graphs, multi-agent workflows, tools, sandboxes, and access controls in one workspace. Teams use it to build source-backed question answering and multi-step agents while managing their data, models, and permissions. The catalogue entries provide agents, skills, and instructions for Yuxi workflows.

xerrors/Yuxi · 7,405 stars · on GitHub · xerrors.github.io

Install

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.

Any agent
npx skills add xerrors/Yuxi --skill knowledge-base
Clone the repo
git clone --depth 1 https://github.com/xerrors/Yuxi

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for knowledge-base

README.md
[![agentmods](https://agentmods.dev/badge/skills/xerrors/yuxi/knowledge-base/github.svg)](https://agentmods.dev/skills/xerrors/yuxi/knowledge-base)
Your own site
<a href="https://agentmods.dev/skills/xerrors/yuxi/knowledge-base"><img src="https://agentmods.dev/badge/skills/xerrors/yuxi/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.

agentmods 80×15 button for knowledge-base

Your own site · 80×15
<a href="https://agentmods.dev/skills/xerrors/yuxi/knowledge-base"><img src="https://agentmods.dev/badge/skills/xerrors/yuxi/knowledge-base.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.00769
Opus 5.5 $0.00022 $0.00308
Sonnet 5.5 $0.00011 $0.00154
Haiku 4.5 $0.00005 $0.00077

Measured 22d ago against content hash 987d96bc180e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 22d 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.

backend/package/yuxi/agents/skills/buildin/knowledge-base/SKILL.md · 37 lines

What it actually says

知识库技能

当用户要求基于项目知识库、内部资料、上传入库文档或知识图谱相关内容回答问题时,使用此技能。

可用工具

  • list_kbs:列出当前会话可访问且已启用的知识库。
  • query_kb:按 kb_id 在指定知识库中检索内容,返回 file_id 和相关片段。
  • open_kb_document:按 kb_id 和 file_id 打开文档原文窗口,适合查看更完整上下文。
  • find_kb_document:在已知文档内用关键词或正则定位段落。
  • get_mindmap:查看知识库思维导图结构。
  • search_file:按文件名关键词搜索知识库中的文件,支持指定知识库或跨知识库,返回文件列表与分页信息。
  • download_kb_file:按 kb_id 和 file_id 下载知识库原始二进制(pdf/docx/xlsx 等)到沙盒 outputs 目录,返回沙盒内可见的 virtual_path。当后续需要用代码读取原始文件结构(如 openpyxl 读 xlsx 单元格、pdfplumber 重新解析版面)时使用;query_kb/open_kb_document 只返回文本切片,无法满足需要文件对象的场景。

操作流程

  1. 需要先确认当前会话有哪些知识库可用;不确定时调用 list_kbs。
  2. 针对用户问题选择最相关的知识库,使用 query_kb 检索。
  3. 检索结果的 metadata.chunk_count == 1 表示文件只有一个分片;除非需要原文行号或额外上下文,否则无需打开。大于 1 且当前片段不足以回答时,使用返回的 file_id 调用 open_kb_document 查看上下文。字段缺失或为 0 表示未知,不据此判断文档完整。
  4. 如果用户要求定位术语、指标、章节或原文证据,使用 find_kb_document 在候选文档内查找。
  5. 当用户关心知识库结构、文件分类或知识框架时,使用 get_mindmap。

关键约束

  • 只能访问当前会话配置和用户权限允许的知识库。
  • 不要编造 kb_id 或 file_id;优先从 list_kbs 和 query_kb 的返回结果中获取。
  • 回答需要可追溯时,应说明依据来自哪个知识库、文件或检索片段。
  • Dify 等外部只读知识库可能只支持检索,不一定支持打开全文或文档内查找;遇到工具返回限制说明时,应如实告知用户。
Changes

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.

  1. 22d ago Changed 987d96bc180e
  2. 28d ago Changed · +2 lines f731c45e8418
  3. 1mo ago First seen · 35 lines · 54 tokens per session scan A 0823987574e2

Subscribe to this mod's changes

knowledge-base is a skill published in the GitHub repository xerrors/Yuxi (7,405 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 769 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

scope-creep-detector

Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad pull requests, changes that grew beyond a fix, dependency additions, public API renames, config or CI edits, oversized hunks, and formatting-only files. Use when the user asks whether a change grew beyond the fix, a PR is too…

Shubhamsaboo/awesome-llm-apps · 98 tokens

reviewing-blogs

Reviews and critiques blog posts in src/content/blog/posts/ against Appwrite's established standards for voice, tone, structure, SEO, formatting, and accuracy. Use when the user asks to review, audit, critique, or improve an existing blog post.

appwrite/appwrite · 55 tokens

first-reader

Beta readers for any draft, run by simulating how a real reader experiences it, moment by moment. A skim gate, a no-lookahead timed read producing an attention transcript with quit points, a recall test of what a reader remembers the next day, and a trust ledger of the implied author. Use when the user asks for a beta…

Shubhamsaboo/awesome-llm-apps · 174 tokens

mcp-apps-builder

MANDATORY for ALL MCP server work - mcp-use framework best practices and patterns. READ THIS FIRST before any MCP server work, including: Creating new MCP servers Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) Debugging MCP server issues or errors Reviewing MCP server code for…

Shubhamsaboo/awesome-llm-apps · 139 tokens

project-graveyard

Scans the developer's machine for dead side projects, autopsies each one from its git history (died at the payments wall, killed by a newer project, finished but never shipped), surfaces their personal death patterns, and picks the corpse most worth resurrecting — then helps ship it. Use when the user mentions…

Shubhamsaboo/awesome-llm-apps · 127 tokens

status

Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken.

mem0ai/mem0 · 54 tokens