Garden Skills is an open-source collection of reusable instructions for AI coding agents such as Claude Code, Cursor, and Codex, covering tasks including web design, image generation, and turning source material into articles or presentations. Developers use the skills to guide agents through these workflows.
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 skills add ConardLi/garden-skills --skill kb-retrievergit clone --depth 1 https://github.com/ConardLi/garden-skillsWrote 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.
[](https://agentmods.dev/skills/conardli/garden-skills/kb-retriever)<a href="https://agentmods.dev/skills/conardli/garden-skills/kb-retriever"><img src="https://agentmods.dev/badge/skills/conardli/garden-skills/kb-retriever/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.
<a href="https://agentmods.dev/skills/conardli/garden-skills/kb-retriever"><img src="https://agentmods.dev/badge/skills/conardli/garden-skills/kb-retriever.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00105 | $0.03737 |
| Opus 5 | $0.00053 | $0.01869 |
| Sonnet 5 | $0.00021 | $0.00747 |
| Haiku 4.5 | $0.00011 | $0.00374 |
Grade A, and why
kb-retriever 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 250 lines — stays where its author put it; the contents beside it link to each section on GitHub.
本地知识库检索 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 文件时的强制检查清单:
- ✅ 已读取对应的 references 文档学习处理方法
- ✅ 已理解推荐的工具和命令
- ✅ 已将文件处理(提取/转换)完成
- ⏭️ 现在可以开始检索
禁止行为:
- ❌ 在未读取 pdf_reading.md 的情况下直接尝试处理 PDF
- ❌ 在未读取 excel_reading.md 的情况下直接尝试处理 Excel
- ❌ 跳过文件处理步骤,直接对原始 PDF/Excel 进行检索
总体流程
-
理解用户需求
- 读用户问题,提取:
- 主题/领域关键词(如“销售报表”“系统架构”“接口文档”)
- 时间或范围限定(如“2023 年 Q1”“最近版本”)
- 需要的输出类型(解释、摘要、具体字段数值等)
- 确定知识库根目录:
- 优先检查用户是否在问题中指定了知识库路径。
- 否则使用默认根目录
knowledge/。 - 若默认根目录不存在或目录结构异常,应向用户询问确认,而不是自行假设。
- 读用户问题,提取:
-
分层查看目录索引
data_structure.md- 使用一个「当前工作目录」的概念:
- 默认从用户指定的知识库根目录开始;如果用户未指定,则使用当前目录。
- 在当前工作目录下,如果存在
data_structure.md:- 使用 Read 读取该文件的前若干行(例如 limit=300),必要时分段继续读取。
- 目标:
- 了解当前目录下有哪些子目录和文件
- 理解每个子目录/文件的用途说明
- 基于用户问题,挑选最相关的若干个子目录或文件,构成候选集合。
- 对于候选子目录:
- 递归进入该子目录,将其作为新的「当前工作目录」,继续查找其中的
data_structure.md并重复上述过程。 - 在递归过程中,避免一次性深入所有分支,优先沿着与问题最相关的路径向下钻取。
- 递归进入该子目录,将其作为新的「当前工作目录」,继续查找其中的
- 对于候选业务文件(md/文本、PDF、Excel 等):
- 在完成必要的目录层级探索后,收集这些文件为最终的检索目标列表。
- 在优先级排序时:
- 优先选择用途说明与问题主题高度匹配的领域目录和文件
- 其次考虑时间/版本等约束(如果索引中有体现)
- 通用说明类文档(如 README.md、总体设计类文档)放在较后优先级
- 使用一个「当前工作目录」的概念:
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 250 lines · 105 tokens per session scan A 9329fac8ad19
kb-retriever is a skill published in the GitHub repository ConardLi/garden-skills (12,324 stars, last pushed 2mo ago), licensed MIT. It adds 105 tokens to every session and 3,737 once invoked, about $0.0005 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
bailian-kb
A command-line manager for Alibaba Cloud Bailian knowledge bases, which are collections of documents prepared for search and question answering. It handles the stored documents, search services, text chunks, and data-centre files rather than everyday searches.
azure-cognitive-search
Expert knowledge for Azure AI Search development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when designing indexes, skillsets, indexers, vector/semantic search, or secure data…
azure-horizondb
Expert knowledge for Azure Horizondb development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using azureai SQL/embeddings, pgvector tuning, Apache AGE graphs, hybrid…
azure-documentdb
Expert knowledge for Azure DocumentDB development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using DocumentDB search (BM25/vector), Data API, MongoDB compatibility, change…
azure-document-intelligence
Expert knowledge for Azure AI Document Intelligence development including troubleshooting, best practices, decision making, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when designing custom models, calling AnalyzeDocument APIs, running containers/offline, or migrating…
azure-content-understanding
Expert knowledge for Azure Content Understanding in Foundry Tools development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, and integrations & coding patterns. Use when designing Content Understanding analyzers, RAG document flows…