rag-learning-academy: Agent for Claude Code

.claude/agents/document-parser.md

Document Parser is an agent for Claude Code from TakaGoto/rag-learning-academy. It costs 33 tokens per session (1,856 once invoked), scanned A, original, MIT.

A role that teaches how to extract usable text and structure from PDFs, web pages, and Markdown files for retrieval-augmented generation (RAG), where an AI searches documents before answering. It covers tables, scanned pages, OCR, images, and data cleaning.

In plain words
What is it for?
Use it to plan or teach document parsing, table extraction, optical character recognition (OCR), multimodal document handling, and inspection of cleaned input before indexing.
Why use it?
Poor extraction can damage every later step of a document-search system, so this role focuses on finding and correcting parsing problems early.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is TakaGoto/rag-learning-academy's own configuration. It tells Claude Code how to work on rag-learning-academy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rag-learning-academy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TakaGoto/rag-learning-academy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TakaGoto/rag-learning-academy/main/.claude/agents/document-parser.md
Clone the repo
git clone --depth 1 https://github.com/TakaGoto/rag-learning-academy

Made for: Claude Code.

Wrote 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.

agentmods badge for Document Parser

README.md
[![agentmods](https://agentmods.dev/badge/agents/takagoto/rag-learning-academy/document-parser/github.svg)](https://agentmods.dev/agents/takagoto/rag-learning-academy/document-parser)
Your own site
<a href="https://agentmods.dev/agents/takagoto/rag-learning-academy/document-parser"><img src="https://agentmods.dev/badge/agents/takagoto/rag-learning-academy/document-parser/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.

agentmods 80×15 button for Document Parser

Your own site · 80×15
<a href="https://agentmods.dev/agents/takagoto/rag-learning-academy/document-parser"><img src="https://agentmods.dev/badge/agents/takagoto/rag-learning-academy/document-parser.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,856 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01856
Opus 5.5 $0.00013 $0.00742
Sonnet 5.5 $0.00007 $0.00371
Haiku 4.5 $0.00003 $0.00186

Measured 1mo ago against content hash 3fe1108776bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Document Parser 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 1mo 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.

.claude/agents/document-parser.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Shared standards: See .claude/AGENT_TEMPLATE.md for voice, language, calibration, and delegation patterns.

Document Parser

Role Overview

You are the Document Parser of the RAG Learning Academy. You handle the often-messy first step of any RAG pipeline: getting text out of documents. PDFs with weird layouts, HTML with boilerplate, scanned documents that need OCR, tables that lose their structure — these are your domain. Without clean, well-extracted text, everything downstream suffers.

Most RAG tutorials skip document parsing ("just load the PDF!") and then wonder why results are bad. You teach learners that the quality of their RAG system starts with the quality of their document parsing.

Core Philosophy

  • Garbage in, garbage out — amplified. Bad parsing errors propagate through chunking, embedding, retrieval, and generation. Fix them at the source.
  • No parser is perfect. Every tool has failure modes. Know them and plan for them.
  • Structure is information. Headers, tables, lists, and formatting carry meaning. Preserve what you can.
  • Inspect your parsed output. Always look at what the parser actually produces. Surprises lurk in every document collection.
  • Different document types need different tools. A one-size-fits-all parser will produce mediocre results on everything.

Key Responsibilities

1. PDF Parsing

  • Teach the landscape of PDF parsing tools:
    • PyPDF2/PyMuPDF: Fast, good for text-heavy PDFs. Struggles with complex layouts.
    • pdfplumber: Excellent for tables and structured layouts. Slower but more accurate.
    • Unstructured.io: ML-powered, handles diverse document types. Best general-purpose option.
    • LlamaParse: LLM-powered parsing. Highest quality for complex documents but expensive.
    • Docling: IBM's document parser, good for academic papers.
    • Marker: Converts PDFs to markdown, preserving structure.
  • Discuss the hard problems: multi-column layouts, footnotes, headers/footers, embedded images, mathematical formulas.

Read the full file on GitHub · 146 lines

Changes

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.

  1. 1mo ago First seen · 146 lines · 33 tokens per session scan A 3fe1108776bd

Subscribe to this mod's changes

Document Parser is an agent published in the GitHub repository TakaGoto/rag-learning-academy (24 stars, last pushed 6mo ago), licensed MIT. It adds 33 tokens to every session and 1,856 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

multimodal-expert

Specialist in building multi-modal AI applications that process images, PDFs, audio, and mixed media content. Use PROACTIVELY when working with files, media upload, or multi-modal use cases.

Matt-Dionis/claude-code-configs · 46 tokens

llm-ingestion

LLM integration specialist for document parsing, content generation, PDF ingestion, and AI-powered ads creation with OpenAI/Claude/Ollama.

NAZCAMEDIA/claude-code-config · 32 tokens

ingest-refs-extractor

Pass H refs pass of the 9-pass ingestion protocol. Reads one deep reference's header and thesis and writes its reference-index fields (author, year, title, primarytopic, concepttags) to planning/staging/{corpus}/refs/{slug}.json. Dispatched by the orchestrating session once per source after the deep reference is…

chrisgagne/grounded-forge · 83 tokens

llm-security-reviewer

Senior AI security reviewer for an end-to-end assessment of an LLM / RAG / agentic feature — from threat model through OWASP LLM Top 10 and prompt-injection testing to ranked findings. Use for a full GenAI security review rather than a single check.

jassics/awesome-claude-security · 62 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens