# Debug ingestion

> Debug ingestion is an open-source agent skill for developer tools. Traces haiku.rag ingestion failures and slow stages in Logfire via the Logfire MCP. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ggozad/haiku.rag/tree/main/.claude/skills/debug-ingestion
- **Repository:** https://github.com/ggozad/haiku.rag
- **GitHub stars:** 670
- **License:** MIT
- **Skill name:** debug-ingestion
- **Collection:** https://github.com/ggozad/haiku.rag
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill helps an agent investigate haiku.rag document ingestion using Logfire traces. It guides the agent to query the ingester's spans for failed and retried jobs, circuit-breaker trips, and per-phase timings covering fetch, convert, chunk, embed, items and store. It can follow a single document through its trace and identify which docling-serve instance handled each request, including failover between instances.

The workflow starts from summary queries that show where failures cluster, then drills into exceptions and trace IDs, and finally produces a link to the full trace in Logfire. The skill includes ready-made SQL for these checks, along with guidance on reading embedding batch counts and lock wait times during storage. It is read-only and does not change any data.

Using it requires the Logfire MCP server connected to the haiku project, with the ingester running under the haiku-ingester service name or a custom OTEL service name. It is written for the haiku.rag Python project.

## When your agent uses it

> Debug haiku.rag ingestion in Logfire. Use when asked to look at Logfire for ingestion, find failed or dead ingestion jobs, investigate retries or circuit-breaker events, trace a document through convert/chunk/embed/store, find which docling-serve instance served a request, spot slow conversions, or tell concurrent ingesters apart. Drives the Logfire MCP against the `haiku-ingester` service.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ggozad/haiku.rag/tree/HEAD/.claude/skills/debug-ingestion)
- [License: MIT](https://github.com/ggozad/haiku.rag/tree/HEAD/.claude/skills/debug-ingestion)

## Features

- **Job outcome summaries:** Groups ingestion job results by source and operation to show where failures concentrate.
- **Exception drill-down:** Pulls failed jobs with their exception type, message and trace identifier for inspection.
- **Retry and dead-letter review:** Finds jobs retried on higher attempts or dead-lettered after permanent errors.
- **Document trace walkthrough:** Follows one document through each pipeline phase and shows the docling-serve instance used.
- **Slow stage analysis:** Ranks the slowest conversion, embedding, chunking and storage operations.
- **Circuit breaker monitoring:** Lists events where a source was paused after consecutive transient failures.

## Good for

- Find which documents failed to ingest in the last day
- Show the trace for a specific document that keeps retrying
- Check whether a docling-serve instance is failing over requests
- Find the slowest embedding or conversion steps during ingestion
- See whether a slow store was caused by lock contention

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/debug-ingestion` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ggozad/haiku.rag.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/debug-ingestion &&
cp -R "$tmp/.claude/skills/debug-ingestion" ~/.claude/skills/debug-ingestion &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/debug-ingestion` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/debug-ingestion` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ggozad/haiku.rag.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/debug-ingestion &&
cp -R "$tmp/.claude/skills/debug-ingestion" ~/.agents/skills/debug-ingestion &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/debug-ingestion` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/debug-ingestion` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ggozad/haiku.rag.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/debug-ingestion &&
cp -R "$tmp/.claude/skills/debug-ingestion" ~/.cursor/skills/debug-ingestion &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/debug-ingestion` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ggozad/haiku.rag.git --path .claude/skills/debug-ingestion
```

Or copy the folder to `~/.gemini/skills/debug-ingestion` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/debug-ingestion`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ggozad/haiku.rag.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/debug-ingestion &&
cp -R "$tmp/.claude/skills/debug-ingestion" ~/.copilot/skills/debug-ingestion &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/debug-ingestion` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ggozad/haiku.rag.git
```

Then copy `haiku.rag/.claude/skills/debug-ingestion` into your agent's skills folder as `debug-ingestion`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Debug ingestion need to run?

It drives the Logfire MCP server and queries the haiku project, where the ingester ships its spans under the haiku-ingester service name or a custom OTEL service name.

### Does Debug ingestion change any data or ingestion state?

No, the skill is read-only. It runs queries against Logfire spans and does not alter the ingester or its queue.

### Can Debug ingestion investigate ingests run from the interactive CLI?

Yes, interactive haiku-rag ingests emit the same document spans under the CLI's service name, though they are not under haiku-ingester.

### How far back can Debug ingestion query?

Queries run with a time window of at most 14 days.

### How do I install Debug ingestion in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/debug-ingestion to use it in all your projects, or to .claude/skills/debug-ingestion in one project.

### Does Debug ingestion run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Debug ingestion?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Debug ingestion?

The closest alternatives to Debug ingestion are Debug evals, Trace debugging, Graylog, Agent introspection debugging and Interactive debugging.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Debug evals](https://ai-powered.com/skills/debug-evals): Debug evals is an open-source agent skill for developer tools.
- [Trace debugging](https://ai-powered.com/skills/trace-debugging): Trace debugging is an open-source agent skill for developer tools.
- [Graylog](https://ai-powered.com/skills/graylog): Graylog is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging): Agent introspection debugging is an open-source agent skill for developer tools.
- [Interactive debugging](https://ai-powered.com/skills/interactive-debugging): Interactive debugging is an open-source agent skill for developer tools.
- [Incident triage](https://ai-powered.com/skills/incident-triage): Incident triage is an open-source agent skill for developer tools.
- [Observability gap](https://ai-powered.com/skills/observability-gap): Observability gap is an open-source agent skill for developer tools.
- [Trace architecture](https://ai-powered.com/skills/trace-architecture): Trace architecture is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/debug-ingestion
