
Kb Retriever
Layered knowledge-base retrieval assistant that reads index files before searching PDFs and Excel sheets.
- CCM score
- 64 of 100
- skills.sh installs
- 5.9K
- GitHub stars
- 15.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the full flow: locate the root, navigate
data_structure.mdindexes, read the matching references, then search and answer with citations - Requires reading
references/pdf_reading.mdbefore any PDF work andreferences/excel_reading.mdplusreferences/excel_analysis.mdbefore any Excel work - Enforces progressive retrieval with grep and partial reads, capped at 5 search rounds, to avoid loading whole files
- Designed for answering questions from a local
knowledge/directory or a user-specified path
Install
$ npx -y skills add conardli/garden-skills --skill kb-retriever -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
本地知识库检索 Skill(kb-retriever)
知识库目录说明
- 知识库存放在一个根目录下,包含多种文件类型(如
.md/.txt、.pdf、.xlsx等),通常按类型或业务用途拆分为多级子目录。 - 采用分层目录索引文件:
- 根目录有一个
data_structure.md,说明主要的「领域目录」及其用途。 - 每个领域目录下可以有自己的
data_structure.md,说明该目录下有哪些子目录/文件,以及各自用途。 - 更深一层的子目录也可以继续有
data_structure.md,形成多级索引树。
- 根目录有一个
- 知识库根目录约定:
- 默认认为知识库位于当前项目根目录下的
knowledge/目录。 - 如果用户在对话中明确指定了其他路径(例如“我的知识库在 /data/kb”或“用 ./docs 这个目录作为知识库”),则以用户指定的路径作为根目录。
- 当默认路径
knowledge/不存在或访问失败时,应向用户确认实际的知识库根目录位置,而不是随意猜测。
- 默认认为知识库位于当前项目根目录下的
- 单个业务文件可能很大:
- 不要直接用 Read 读取整文件
- 对 PDF、Excel 使用对应 Skill 进行结构化处理后,再结合 grep/局部读取做精细检索
定位 knowledge 根目录
- 根目录优先听用户:如果用户给了路径(如
./docs、./knowledge-personal),直接用用户提供的路径。 - 默认根目录:否则约定根目录为当前项目下的
knowledge/。- 使用 shell 显式检查目录是否存在:优先使用
test -d knowledge,或退而求其次使用ls -d knowledge。 - 注意:禁止使用
Glob "knowledge" in .这类模式来判断目录是否存在,Glob只返回文件路径,不返回目录本身,空结果并不能区分“目录不存在”和“目录存在但为空”。
- 使用 shell 显式检查目录是否存在:优先使用
- 只有在根目录已通过
test -d等方式确认存在时,才使用 Glob 在该目录下检索内容,并把目录作为path,例如:- 索引文件:
pattern="**/data_structure.md",path="knowledge" - 所有 Markdown:
pattern="**/*.md",path="knowledge"
- 索引文件:
- 如果默认
knowledge/不存在(test -d失败):不要猜测其他目录,明确告诉用户未找到默认根目录,并让用户指定实际知识库路径。
关键原则:先学习,再处理
遇到 PDF 或 Excel 文件时的强制检查清单:
Details
- Repository
- github.com/conardli/garden-skills
- Categories
- Office Files & Slides, Research & Academic
- First seen
- May 16, 2026
More from conardli/garden-skills
All 5Similar to Kb Retriever
More Office Files & Slides
academic-searchSkillclaude-office-skills/skills6.4K installsStructured search strategies, paper analysis, and literature review templates for finding and synthesizing academic research across disciplines.
Molio Knowledge BaseMCP serverzhuzhaoyun451 starsRead-only access to a local Molio knowledge base: search, read, browse, and AI Q&A.
Google ScholarMCP serverjackkuo666435 starsKeyword and advanced search of Google Scholar papers, plus author profile lookups.
knowledge-retrievalSkillopen-gitagent/opengap3.2K starsSemantic search over ingested documents that returns cited passages from a pre-built knowledge index.
Chat with PDFSkillclaude-office-skills/skills5K installsQuestion-answering, summarization, and extraction over PDF content, with cited answers and confidence levels.
nemo-retrieverSkillnvidia/skills2.5K installsCommand-line search and ingestion for document collections using NeMo Retriever 26.8.1 with local LanceDB or deployed services.