haiku.rag: Skill for Claude Code

.claude/skills/debug-ingestion/SKILL.md

debug-ingestion is a skill for Claude Code from ggozad/haiku.rag. It costs 87 tokens per session (1,914 once invoked), scanned A, original, MIT.

A read-only troubleshooting guide for investigating document-ingestion jobs in Logfire, an observability service that records application traces and errors.

In plain words
What is it for?
Use it to inspect ingestion failures, trace documents, identify the document-conversion server used, and find related exceptions or circuit-breaker events.
Why use it?
It helps locate failed, slow, or repeatedly retried jobs and follow a document through conversion, chunking, embedding, and storage.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is ggozad/haiku.rag's own configuration. It tells Claude Code how to work on haiku.rag 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 haiku.rag configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ggozad/haiku.rag. 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/ggozad/haiku.rag/main/.claude/skills/debug-ingestion/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ggozad/haiku.rag

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 debug-ingestion

README.md
[![agentmods](https://agentmods.dev/badge/skills/ggozad/haiku.rag/debug-ingestion.svg)](https://agentmods.dev/skills/ggozad/haiku.rag/debug-ingestion)
Your own site
<a href="https://agentmods.dev/skills/ggozad/haiku.rag/debug-ingestion"><img src="https://agentmods.dev/badge/skills/ggozad/haiku.rag/debug-ingestion.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,914 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00087 $0.01914
Opus 5 $0.00044 $0.00957
Sonnet 5 $0.00017 $0.00383
Haiku 4.5 $0.00009 $0.00191

Measured 8d ago against content hash 982d2814d688, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

debug-ingestion 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 8d 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/skills/debug-ingestion/SKILL.md · 204 lines

How it starts

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

Debug ingestion in Logfire

The ingester ships spans to Logfire under service_name = 'haiku-ingester' (or a custom OTEL_SERVICE_NAME if set per process). This skill finds failing jobs, traces a document through the pipeline, and pinpoints the docling-serve instance that served a request. Read-only.

How to query

  1. Confirm the current schema with mcp__logfire__query_schema_reference (spans and logs share the records table).
  2. Run SQL with mcp__logfire__query_run (query + project: "haiku" + start_timestamp/end_timestamp, max 14 days). The remote MCP is org-scoped, so project is required; the ingester ships to project haiku. The same SQL works pasted into Logfire's Explore UI.
  3. Read span attributes as JSON: attributes->>'key', cast when needed ((attributes->>'attempt')::int).
  4. Hand back a clickable trace with mcp__logfire__project_logfire_link(trace_id, project="haiku").
  5. For recent exceptions tied to a file, mcp__logfire__query_find_exceptions_in_file accepts client/documents.py, ingester/workers/pool.py, or ingester/pollers/base.py.

Adjust service_name if the operator set OTEL_SERVICE_NAME (e.g. per tenant). Interactive haiku-rag ingests emit the same document.* spans under the CLI's service name (or unknown_service for older runs), not haiku-ingester.

Vocabulary

Span tree (all scope haiku.rag), each level nests under the one above and shares its trace_id:

  • Poller: ingester.poller.sweep | ingester.poller.dry_run | ingester.poller.watch_event.
    • attributes->>'source_id'; watch adds change, uri.
    • sweep sets skipped, skip_reason (pending_work / circuit_open), upsert, delete, unchanged, consecutive_failures. A failed sweep records the exception on the span (exception_type / exception_message).
  • Job: ingester.jobattributes->>'source_id', ->>'uri', ->>'op' (UPSERT/DELETE), (->>'attempt')::int. is_exception=true marks a job that raised.
  • Document pipeline: document.fetch (bytes, content_hash), document.convert, document.chunk (chunks_created), document.embed, document.store (op create/update, document_id).
  • docling-serve: docling_serve.requestattributes->>'name' (operation), ->>'url' (instance), (->>'attempt')::int. A retry emits a new span with a different url, so failover shows as sibling spans.

Read the full file on GitHub · 204 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. 8d ago First seen · 204 lines · 87 tokens per session scan A 982d2814d688

Subscribe to this mod's changes

debug-ingestion is a skill published in the GitHub repository ggozad/haiku.rag (596 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 1,914 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

hybrid-rag

Use when creating, updating, or querying a local Hybrid RAG database from PRISMA JSON metadata or PDF documents in a folder. Triggered by prisma-review (after Fase 4) or educational-pilot-design (to query evidence). Hybrid RAG combines dense vector search (sentence-transformers) and sparse retrieval — native FTS via…

giovannifrontera/academic-research-prisma-wiki-rag · 96 tokens

basemind-documents

Semantic + full-text search over documents and the web via basemind's RAG store — PDFs, Office, HTML, email, images (OCR), plus scraped/crawled web pages, with cross-encoder reranking, keyword and named-entity (NER) filters, and per-document summaries. Reach for it whenever the user asks to "search the docs / PDFs"…

Goldziher/basemind · 107 tokens

orchardcore-ai-documents

Skill for configuring AI Documents in Orchard Core with CrestApps modules. Covers document upload, text extraction, chunking, vector indexing, and Retrieval-Augmented Generation (RAG) for AI chat. Supports PDF, OpenXml (docx, xlsx, pptx), and plain-text formats with file-system or Azure Blob storage and Azure AI…

CrestApps/CrestApps.AgentSkills · 125 tokens

markitdown

Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.

K-Dense-AI/scientific-agent-skills · 61 tokens

llamaindex

Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support. Use for document Q&A, chatbots, knowledge retrieval, or building RAG pipelines. Best for data-centric LLM…

davila7/claude-code-templates · 70 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens