Agent skill

Local Knowledge Base Retriever

by ConardLi in ConardLi/rag-skill

Answers questions from a local knowledge base folder by walking hierarchical index files and searching with grep, pdfplumber and pandas instead of loading whole files.

No licenceAuto-check passedKnowledge Management

SKILL.md written in Chinese; this summary is our English description.

Install Local Knowledge Base Retriever

skills CLI
$ npx skills add ConardLi/rag-skill --skill kb-retriever -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ConardLi/rag-skill kb-retriever --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ConardLi/rag-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent/skills/rag-skill .claude/skills/kb-retriever && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kb-retriever
GitHub stars
715
Used in
2 other repos
Token cost
~1.7k tokens
SKILL.md length
457 words
Files
5 (incl. scripts, references)
Skills in repo
1
Repo updated
First seen
Licence
None found

At a glance

Answers questions from a local knowledge base folder by walking hierarchical index files and searching with grep, pdfplumber and pandas instead of loading whole files.

  • Works in 3 steps: Markdown / 文本类文件(.md, .txt, .log 等) → PDF 文件检索策略 → Excel 文件检索策略
  • Answering a question from a folder of Markdown, PDF and Excel files
  • SKILL.md covers 知识库目录说明, 关键原则:先学习,再处理, 总体流程 and 公共检索原则, plus 3 more sections
  • Runs Python scripts from its folder; calls pdftotext

What it does

The knowledge base lives under one root folder, by default `knowledge/` in the project unless you give another path, and the agent asks rather than guesses if the default is missing. Folders carry `data_structure.md` index files at several levels describing their contents and purpose. The agent reads these indexes, around the first 300 lines at a time, picks the most relevant subfolders and files, drills down recursively along the most relevant path and ends with a list of target files to search.

Before touching any PDF or Excel file it must read the matching reference note, learn the extraction method, process the file and only then search; going straight to the raw file is forbidden. Whole large files are never read at once, and grep, partial reads, pdfplumber and pandas are combined by file type. A bundled script converts PDF pages to images, and reference files cover PDF reading, Excel reading and Excel analysis.

When your agent uses it

  • Answering a question from a folder of Markdown, PDF and Excel files
  • Searching a large local knowledge base without loading whole files
  • Extracting figures from spreadsheets and reports stored in a knowledge folder

Example prompts

  • “Answer this question from the knowledge folder: what changed in the latest interface spec?”
  • “My knowledge base is in ./docs; find the Q1 2023 sales figures in the Excel reports.”
  • “Search the knowledge base PDFs for the system architecture overview and summarize it.”

Requirements

  • Python with pdfplumber and pandas for PDF and Excel files

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Markdown / 文本类文件(.md, .txt, .log 等)
  2. PDF 文件检索策略
  3. Excel 文件检索策略

What it can do on your machine

Read from SKILL.md and the folder at commit e759a1d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pdftotext

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Local Knowledge Base Retriever loads about 1.7k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 45 tokens; SKILL.md has 457 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 457 words (~1,736 tokens).

name
kb-retriever

Read the full SKILL.md on GitHub

Files

SKILL.md and 4 other files (scripts, references) in .agent/skills/rag-skill of ConardLi/rag-skill.

  • SKILL.md
  • references/excel_analysis.md
  • references/excel_reading.md
  • references/pdf_reading.md
  • scripts/convert_pdf_to_images.py

Open the folder on GitHubat commit e759a1d

Used in 3 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in ConardLi/rag-skill, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Local Knowledge Base Retriever next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Local Knowledge Base Retriever compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local Knowledge Base Retriever this skillConardLi/rag-skill7152 repos~1.7kAutomated safety check: PassNone
File Format Conversionpipeshub-ai/pipeshub-ai3.8k—~865Automated safety check: PassApache-2.0
Audit Report Checkernigo81/nigo-skills133—~4.3kAutomated safety check: PassMIT
Office ArtifactsPrismer-AI/PrismerCloud1.6k—~2.6kAutomated safety check: PassMIT
Multi Source Data Integration ExtractionDrchronx/ai-agent-research-starter-kit137—~671Automated safety check: PassCustom licence
Streaming Export Safetydoccker/cc-use-exp1.1k—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • File Format Conversion

    pipeshub-ai/pipeshub-ai

    Picks the right library for converting between CSV, XLSX, JSON, images, DOCX and PDF text, and lists the conversions that are not supported so the agent does not attempt them.

    3.8k GitHub stars~865 tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Audit Report Checker

    nigo81/nigo-skills

    Checks audit reports (financial statements and notes) for cross-reference, summation and text errors, with arithmetic done by script and results exported to Excel and Markdown.

    133 GitHub stars~4.3k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Office Artifacts

    Prismer-AI/PrismerCloud

    Generate real DOCX, PPTX, XLSX, PDF, CSV files using python-docx / python-pptx / openpyxl / reportlab by writing them into the dispatch artifacts dir, then explicitly deliver each one with cloud…

    1.6k GitHub stars~2.6k tokensUpdated 9 days ago
    Documents & OfficeAuto-check passed
  • Multi Source Data Integration Extraction

    Drchronx/ai-agent-research-starter-kit

    Automatically merge scattered Excel and CSV files, normalize column names, and extract structured tables from PDF, HTML, TXT, or Markdown documents.

    137 GitHub stars~671 tokensUpdated 4 mo ago
    Documents & OfficeAuto-check passed
  • Streaming Export Safety

    doccker/cc-use-exp

    当代码涉及 Excel/CSV/JSON/PDF 大文件导出、批量序列化、内存里构建大对象时触发。防止 OOM、临时文件残留、同步导出阻塞 HTTP 线程等内存安全陷阱。

    1.1k GitHub stars~1.9k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Markitdown

    aipoch/medical-research-skills

    Convert files and Office documents into clean Markdown when you need LLM-friendly, token-efficient text (e.g., for summarization, search, RAG ingestion, or dataset preparation).

    2k GitHub stars~1.3k tokensUpdated 22 days ago
    Documents & OfficeAuto-check passed

Questions about Local Knowledge Base Retriever

What does Local Knowledge Base Retriever do?

Answers questions from a local knowledge base folder by walking hierarchical index files and searching with grep, pdfplumber and pandas instead of loading whole files. The knowledge base lives under one root folder, by default `knowledge/` in the project unless you give another path, and the agent asks rather than guesses if the default is missing.md` index files at several levels describing their contents and purpose.

When should I use Local Knowledge Base Retriever?

Local Knowledge Base Retriever fits situations like: answering a question from a folder of Markdown, PDF and Excel files; searching a large local knowledge base without loading whole files; extracting figures from spreadsheets and reports stored in a knowledge folder.

How do I install Local Knowledge Base Retriever in Claude Code?

Run `npx skills add ConardLi/rag-skill --skill kb-retriever -a claude-code`. Or copy the skill folder (.agent/skills/rag-skill in ConardLi/rag-skill) into .claude/skills/kb-retriever in your project. Claude Code loads it when a task matches its description.

How do I install Local Knowledge Base Retriever in Codex?

Run `npx skills add ConardLi/rag-skill --skill kb-retriever -a codex`. Or copy the skill folder (.agent/skills/rag-skill in ConardLi/rag-skill) into .agents/skills/kb-retriever in your project. Codex loads it when a task matches its description.

Can I use Local Knowledge Base Retriever in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ConardLi/rag-skill --skill kb-retriever -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kb-retriever, .gemini/skills/kb-retriever, .github/skills/kb-retriever and .opencode/skills/kb-retriever in your project.

What does Local Knowledge Base Retriever need to run?

Going by SKILL.md and its folder, Local Knowledge Base Retriever needs Python for the scripts in its folder and the command-line tools its instructions call (pdftotext). Our summary lists: Python with pdfplumber and pandas for PDF and Excel files.

Does Local Knowledge Base Retriever access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Local Knowledge Base Retriever safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Local Knowledge Base Retriever use?

No licence was found for Local Knowledge Base Retriever or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Local Knowledge Base Retriever use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.

What are the alternatives to Local Knowledge Base Retriever?

Skills that share tags, products or a category with Local Knowledge Base Retriever: File Format Conversion (pipeshub-ai/pipeshub-ai, 3.8k stars), Audit Report Checker (nigo81/nigo-skills, 133 stars), Office Artifacts (Prismer-AI/PrismerCloud, 1.6k stars) and Multi Source Data Integration Extraction (Drchronx/ai-agent-research-starter-kit, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local Knowledge Base Retriever?

ConardLi (a GitHub user) maintains it in ConardLi/rag-skill, which has 715 GitHub stars. The repository was last updated on April 25, 2026.

Source: ConardLi/rag-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.