Performs layered retrieval and Q&A from local knowledge base directories. Supports markdown, PDF, Excel files using progressive retrieval (grep, Read, pdfplumber, pandas) and requires reading references before processing special formats.
How this skill is triggered — by the user, by Claude, or both
Slash command
/image-generation-skills:kb-retrieverThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- 知识库存放在一个根目录下,包含多种文件类型(如 `.md`/`.txt`、`.pdf`、`.xlsx` 等),通常按类型或业务用途拆分为多级子目录。
.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])npx claudepluginhub conardli/garden-skills --plugin presentation-skillsConverts raw files (PDF, docx, images, audio, etc.) into a local Markdown vault with retrieval-friendly frontmatter, then answers questions over it with self-monitoring and MOC proposals.
Searches docs/kb/ .md files for keywords, tags, or content. Returns matching files with excerpts, metadata, cross-references, and global learnings via /kb-search.
Structured, cited extraction of insights and context from local documents and project knowledge. Writes a scan plan, parallel-subagent findings, and a cited synthesis report to disk — never inline prose.