haystack

haystack is a skill for Claude Code, Codex from magnus919/agent-skills. It costs 65 tokens per session (1,435 once invoked), scanned A, original, MIT.

A skill for building search and natural-language processing pipelines with Haystack, a framework from deepset. It helps connect document stores, search components, prompt construction, text generation, evaluation, and deployment into a directed pipeline.

In plain words
What is it for?
Use it when building document search, retrieval-augmented generation, question-answering, prompt, evaluation, or Hayhooks deployment workflows with Haystack.
Why use it?
It provides framework-specific guidance for designing and debugging Haystack pipelines instead of treating them like unrelated code components.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building document search, retrieval-augmented generation, question-answering, prompt, evaluation, or Hayhooks deployment workflows with Haystack.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/haystack
Install

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.

Any agent
npx skills add magnus919/agent-skills --skill haystack
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin haystack — /plugin install haystack after adding the marketplace above.

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 haystack

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/haystack/github.svg)](https://agentmods.dev/skills/magnus919/agent-skills/haystack)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/haystack"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/haystack/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 haystack

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnus919/agent-skills/haystack"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/haystack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,435 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.00065 $0.01435
Opus 5.5 $0.00026 $0.00574
Sonnet 5.5 $0.00013 $0.00287
Haiku 4.5 $0.00006 $0.00144

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

Security

Grade A, and why

haystack 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 2mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/check-setup.py, templates/hybrid-rag.py, templates/indexing-pipeline.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

haystack/SKILL.md · 117 lines

How it starts

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

Haystack Expert Skill

Haystack (by deepset) is a production-oriented framework for building search and NLP pipelines. Its core abstraction is the Pipeline — a directed acyclic graph of typed components with explicit connections. Unlike LangChain's LCEL (pipe operator) or LlamaIndex's query engines, Haystack pipelines are declared upfront with add_component and connect, giving validated, debuggable DAGs.

Core Paradigm

from haystack import Pipeline
from haystack.components.embedders import SentenceTransformersTextEmbedder
from haystack.components.retrievers.in_memory import InMemoryEmbeddingRetriever
from haystack.components.builders import PromptBuilder
from haystack.components.generators import OpenAIGenerator
from haystack.document_stores.in_memory import InMemoryDocumentStore

# Build a pipeline
document_store = InMemoryDocumentStore()
pipeline = Pipeline()
pipeline.add_component("embedder", SentenceTransformersTextEmbedder())
pipeline.add_component("retriever", InMemoryEmbeddingRetriever(document_store=document_store))
pipeline.add_component("prompt_builder", PromptBuilder(template="Answer using: {{documents}}\n\nQuestion: {{question}}"))
pipeline.add_component("generator", OpenAIGenerator())

# Connect components
pipeline.connect("embedder.embedding", "retriever.query_embedding")
pipeline.connect("retriever.documents", "prompt_builder.documents")
pipeline.connect("prompt_builder", "generator")

# Run
result = pipeline.run({"embedder": {"text": "What is Haystack?"}, "prompt_builder": {"question": "What is Haystack?"}})

Core Principles

  1. Pipelines are validated DAGs. add_component + connect. Pipeline validation catches errors BEFORE execution — leverage this during development.
  2. Components are typed. Each component has input/output slots. Connections must match types. This prevents runtime errors.
  3. PromptBuilder uses Jinja2. Templates are Jinja2 strings, not f-strings. {{documents}}, {{query}}, {{question}} are variable placeholders.
  4. Indexing and query are separate pipelines. One pipeline loads/cleans/embeds/writes documents. Another retrieves/generates answers. They share the DocumentStore.
  5. Evaluation is a pipeline too. Add evaluator components to measure faithfulness, relevancy, or custom metrics.

Read the full file on GitHub · 117 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. 2mo ago Changed · +10 tokens per session dd90bffa8d85
  2. 2mo ago First seen · 117 lines · 55 tokens per session scan A 2afdfe7b6748

Subscribe to this mod's changes

haystack is a skill published in the GitHub repository magnus919/agent-skills (166 stars, last pushed 2d ago), licensed MIT. It adds 65 tokens to every session and 1,435 once invoked, about $0.0003 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

haystack compared with skills from other repositories

haystack next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
haystackmagnus919/agent-skillsSkill1662d agoMITA65Claude Code, Codex
chromaNousResearch/hermes-agentSkill261kyesterdayMITA12Claude Code, Codex
ai-engineering-toolkitsickn33/agentic-awesome-skillsSkill49kyesterdayMITA47Claude Code
memory-rag-poisoning-detectionTencent/AI-Infra-GuardSkill7.4k2d agoApache-2.0A48Claude Code
autorag-setupMarker-Inc-Korea/AutoRAGSkill5.3kyesterdayApache-2.0A75Claude Code, Codex
autorag-lite-setupMarker-Inc-Korea/AutoRAGSkill5.3kyesterdayApache-2.0A65Claude Code, Codex
generate-rag-datasetlangwatch/langwatchSkill5.0kyesterdayApache-2.0A51Claude Code, Codex