面向本地知识库目录的检索和问答助手。核心流程:(1)分层索引导航 (2)遇到PDF/Excel时必须先读取references学习处理方法 (3)处理文件后再检索。按文件类型组合使用 grep、Read、pdfplumber、pandas 进行渐进式检索,避免整文件加载。用户问题涉及"从知识库目录回答问题/检索信息/查资料"时使用。
65
77%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./skills/kb-retriever/SKILL.md.md/.txt、.pdf、.xlsx 等),通常按类型或业务用途拆分为多级子目录。data_structure.md,说明主要的「领域目录」及其用途。data_structure.md,说明该目录下有哪些子目录/文件,以及各自用途。data_structure.md,形成多级索引树。knowledge/ 目录。knowledge/ 不存在或访问失败时,应向用户确认实际的知识库根目录位置,而不是随意猜测。knowledge 根目录./docs、./knowledge-personal),直接用用户提供的路径。knowledge/。
test -d knowledge,或退而求其次使用 ls -d knowledge。Glob "knowledge" in . 这类模式来判断目录是否存在,Glob 只返回文件路径,不返回目录本身,空结果并不能区分“目录不存在”和“目录存在但为空”。test -d 等方式确认存在时,才使用 Glob 在该目录下检索内容,并把目录作为 path,例如:
pattern="**/data_structure.md", path="knowledge"pattern="**/*.md", path="knowledge"knowledge/ 不存在(test -d 失败):不要猜测其他目录,明确告诉用户未找到默认根目录,并让用户指定实际知识库路径。遇到 PDF 或 Excel 文件时的强制检查清单:
禁止行为:
理解用户需求
knowledge/。分层查看目录索引 data_structure.md
data_structure.md:
data_structure.md 并重复上述过程。学习文件处理方法(遇到 PDF/Excel 时强制执行)
按文件类型执行处理和检索
迭代检索
答案组织与溯源
所有文件类型都采用统一的迭代策略:
Glob "knowledge" in . 或任何试图用 Glob 判定目录存在性的调用,目录存在性应通过 shell 命令(如 test -d)检查。候选文件选择
data_structure.md 和文件名、路径判断相关度grep 定位与局部读取
特殊处理
工作流:
首先:读取处理方法指南
选择候选 PDF
data_structure.md 中的描述,选择最相关的 1-3 个文件应用学到的方法提取文本
pdftotext input.pdf output.txt 将文本提取到文件,不要直接输出到 stdout(避免占用大量 token)对提取结果执行检索
工作流:
首先:读取处理方法指南
选择候选 Excel
data_structure.md 和文件/工作表命名,选择最相关的表应用学到的方法探索结构
nrows 参数限制)执行数据检索和分析
df[df['column'] == value])aaf9a82
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.