castorini-serve

castorini-serve is a skill for Codex from castorini/castorini-skills. It costs 81 tokens per session (771 once invoked), scanned A, original, Apache-2.0.

A guide for running Anserini and related Castorini information-retrieval services as local HTTP services. Information retrieval means finding relevant passages for a search query; other services can rerank results, generate answers, judge relevance, or create evaluation data.

In plain words
What is it for?
Use it to run retrieval alone or combine retrieval with reranking, answer generation, relevance judging, nugget creation, and answer evaluation.
Why use it?
It helps choose the right services, local ports, request flow, and payload handling for the retrieval task you need.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to run retrieval alone or combine retrieval with reranking, answer generation, relevance judging, nugget creation, and answer evaluation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/castorini/castorini-skills/castorini-serve
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 castorini/castorini-skills --skill castorini-serve
Clone the repo
git clone --depth 1 https://github.com/castorini/castorini-skills

Made for: Codex.

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 castorini-serve

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/castorini/castorini-skills/castorini-serve"><img src="https://agentmods.dev/badge/skills/castorini/castorini-skills/castorini-serve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 771 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00081 $0.00771
Opus 5 $0.00041 $0.00385
Sonnet 5 $0.00016 $0.00154
Haiku 4.5 $0.00008 $0.00077

Measured 12d ago against content hash 2cce85b59811, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

castorini-serve scanned grade A with 1 finding 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 12d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Use when serving Anserini retrieval together with any subset of rank_llm, ragnarok, nuggetizer, or umbrela over HTTP, especially for local port planning, direct request payload compatibility, curl or jq pipe
skills/castorini-serve/SKILL.md · 48 lines

How it starts

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

Castorini Serve

Serve the Castorini stack as cooperating local HTTP services.

Treat Anserini retrieval as the entry point, then add only the downstream services the user actually needs. Prefer gpt-4o as the default OpenAI-backed model for rank_llm, ragnarok, nuggetizer, and umbrela unless the user explicitly asks for a different model.

Default Stack

Use this local port layout unless the user asks for different ports:

  • 8081 — Anserini RestServer
  • 8082rank_llm serve http
  • 8083ragnarok serve
  • 8084umbrela serve
  • 8085nuggetizer serve

Service Selection

  • Retrieval only: serve Anserini through io.anserini.api.RestServer.
  • Retrieval + rerank: add rank_llm.
  • Retrieval + answer generation: use Anserini -> ragnarok, or Anserini -> rank_llm -> ragnarok.
  • Retrieval + relevance judgment: use Anserini -> umbrela, or Anserini -> rank_llm -> umbrela.
  • Retrieval + nugget creation: use Anserini -> nuggetizer create, or Anserini -> rank_llm -> nuggetizer create.
  • Full answer-evaluation flow: keep the original retrieval or rerank payload for nuggetizer create, generate answers with ragnarok, then join the two envelopes for nuggetizer assign.

Reference Files

  • references/service-recipes.md — startup commands, port conventions, and per-service defaults
  • references/curl-pipelines.md — direct curl, pipe, jq, and full multi-step examples

Gotchas

  • rank_llm serves HTTP as rank-llm serve http ..., not plain rank-llm serve ....
  • The Anserini fatjar skill documents standalone RestServer on 8080, but the shared Castorini HTTP stack uses 8081 by convention so the other services can stay on 8082 through 8085.
  • ragnarok, nuggetizer create, and umbrela can accept raw Anserini search payloads directly because they normalize {query, candidates} inputs.
  • ragnarok, nuggetizer create, and umbrela can also accept the castorini.cli.v1 envelope returned by rank_llm, so a raw pipe from rank_llm usually works.
  • nuggetizer create must consume the retrieval pool, not ragnarok answer output.
  • nuggetizer assign does not consume a bare ragnarok envelope by itself; wrap answer_envelope plus nugget_envelope, or answers_envelope plus nugget_envelope, with jq.
  • umbrela judges passage relevance, not answer quality. For answer quality, use the ragnarok plus nuggetizer path instead.

Read the full file on GitHub · 48 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 48 lines · 81 tokens per session scan A 2cce85b59811

Subscribe to this mod's changes

castorini-serve is a skill published in the GitHub repository castorini/castorini-skills (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 81 tokens to every session and 771 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

azure-search-documents-ts

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Use when creating/managing indexes, implementing vector/hybrid search, semantic ranking, or building agentic retrieval with knowledge bases.

microsoft/skills · 48 tokens

convex-agent

Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.

openclaw/clawhub · 25 tokens

wegent-knowledge

Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.

wecode-ai/Wegent · 51 tokens

langchain4j-spring-boot-integration

Provides integration patterns for LangChain4j with Spring Boot. Configures AI model beans, sets up chat memory with Spring context, integrates RAG pipelines with Spring Data, and handles auto-configuration, dependency injection, and Spring ecosystem integration. Use when embedding LangChain4j into Spring Boot…

giuseppe-trisciuoglio/developer-kit · 88 tokens

azure-search-documents-py

Full-text, vector, and hybrid search with AI enrichment capabilities.

benjaminasterA/antigravity-awesome-skills · 0 tokens