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 agentmods add skills/xerrors/yuxi/knowledge-basenpx skills add xerrors/Yuxi --skill knowledge-basegit clone --depth 1 https://github.com/xerrors/YuxiWhat 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 | $0.00054 | $0.00658 |
| Opus 5 | $0.00027 | $0.00329 |
| Sonnet 5 | $0.00011 | $0.00132 |
| Haiku 4.5 | $0.00005 | $0.00066 |
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 yesterday.
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.
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只返回文本切片,无法满足需要文件对象的场景。
操作流程
- 需要先确认当前会话有哪些知识库可用;不确定时调用
list_kbs。 - 针对用户问题选择最相关的知识库,使用
query_kb检索。 - 如果检索片段不足以回答,使用返回的
file_id调用open_kb_document查看上下文。 - 如果用户要求定位术语、指标、章节或原文证据,使用
find_kb_document在候选文档内查找。 - 当用户关心知识库结构、文件分类或知识框架时,使用
get_mindmap。
关键约束
- 只能访问当前会话配置和用户权限允许的知识库。
- 不要编造
kb_id或file_id;优先从list_kbs和query_kb的返回结果中获取。 - 回答需要可追溯时,应说明依据来自哪个知识库、文件或检索片段。
- Dify 等外部只读知识库可能只支持检索,不一定支持打开全文或文档内查找;遇到工具返回限制说明时,应如实告知用户。
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.
- yesterday First seen · 35 lines · 54 tokens per session scan A 0823987574e2
knowledge-base is a skill published in the GitHub repository xerrors/Yuxi (6,591 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 658 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
background-task
Add or modify work that runs outside the request/response cycle — emails, document ingestion, webhooks, cleanups, scheduled jobs. Use when something is slow or fire-and-forget, or when adding a periodic/cron task. This project's queue is {{ cookiecutter.backgroundtasks }}.
agent-tool
Add a new tool/function the AI agent can call (e.g. look something up, hit an external API, perform an action). Use when extending the assistant's capabilities, wiring a new function into the agent, or when the model needs a new action. This project uses {{ cookiecutter.aiframework }}.
frontend-feature
Build a new page, view, or data-driven feature in the Next.js frontend. Use when adding a route under the dashboard/marketing area, wiring UI to a backend endpoint, adding client state, or creating a localized page. Covers App Router, data fetching, Zustand stores, and i18n.
rag-knowledge
Work with the RAG knowledge base — ingest documents, run semantic search, manage collections, or add a sync source/connector (Google Drive, S3). Use when populating or debugging the knowledge base, tuning retrieval, or adding a new document source. This project uses {{ cookiecutter.vectorstore }} + {{…
alembic-migration
Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.
channel-bot
Work with messaging-channel bots (Telegram / Slack) — register a bot, route inbound messages through the AI agent, handle webhooks vs polling, or add a new channel adapter. Use when wiring chat into a messaging platform or debugging bot delivery.