retriever

retriever is an agent for Claude Code from jiutuhky/my-super-capsule. It costs 191 tokens per session (2,606 once invoked), scanned A, original, MIT.

A pipeline agent that selects up to 10 relevant example diagrams or plots from the PaperBananaBench reference dataset. It reads the pipeline's saved task information and records the selected examples for later steps.

In plain words
What is it for?
Use it to retrieve few-shot examples for generating diagrams from methodology text or plots from raw data, with automatic, manual, random, or no retrieval settings.
Why use it?
It removes the manual work of searching a large pool of reference visuals for examples related to a new diagram or plot.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the paper-banana plugin — 1 skill, 1 command, 5 agents shipped together

Good fit Use it to retrieve few-shot examples for generating diagrams from methodology text or plots from raw data, with automatic, manual, random, or no retrieval settings.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jiutuhky/my-super-capsule/retriever
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.

Clone the repo
git clone --depth 1 https://github.com/jiutuhky/my-super-capsule

Made for: Claude Code.

Or install paper-banana, the plugin that ships this one along with the rest of its 1 skill, 1 command, 5 agents.

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 retriever

README.md
[![agentmods](https://agentmods.dev/badge/agents/jiutuhky/my-super-capsule/retriever/github.svg)](https://agentmods.dev/agents/jiutuhky/my-super-capsule/retriever)
Your own site
<a href="https://agentmods.dev/agents/jiutuhky/my-super-capsule/retriever"><img src="https://agentmods.dev/badge/agents/jiutuhky/my-super-capsule/retriever/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 retriever

Your own site · 80×15
<a href="https://agentmods.dev/agents/jiutuhky/my-super-capsule/retriever"><img src="https://agentmods.dev/badge/agents/jiutuhky/my-super-capsule/retriever.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 191 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,606 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.00191 $0.02606
Opus 5 $0.00096 $0.01303
Sonnet 5 $0.00038 $0.00521
Haiku 4.5 $0.00019 $0.00261

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

Security

Grade A, and why

retriever 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 9d 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.

paper-banana/agents/retriever.md · 251 lines

How it starts

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

You are the Retriever Agent in the PaperBanana multi-agent pipeline.

Your Task

Read pipeline_state.json (located inside output_dir), then retrieve relevant reference examples based on the retrieval_setting.

Step-by-Step Instructions

  1. Read pipeline_state.json to get:

    • task_type ("diagram" or "plot")
    • content (methodology section or raw data)
    • visual_intent (figure caption or plot intent)
    • retrieval_setting ("auto", "manual", "random", or "none")
    • output_dir (working directory)
  2. Based on retrieval_setting, perform the appropriate action:

If retrieval_setting is "none":

  • Set top10_references to []
  • Set retrieved_examples to []
  • Write back to pipeline_state.json and finish.

If retrieval_setting is "auto":

  • Check if data/PaperBananaBench/{task_type}/ref.json exists. If not, fall back to "none".
  • Load the candidate pool from ref.json.
  • For diagram tasks, limit to the first 200 candidates. For plot tasks, no limit.
  • Use the appropriate system prompt below to select Top 10 references.
  • Parse the JSON response to extract the list of IDs.
  • Write top10_references (list of IDs) and retrieved_examples (empty list) to pipeline_state.json.

If retrieval_setting is "manual":

  • Check if data/PaperBananaBench/{task_type}/agent_selected_12.json exists. If not, fall back to "none".
  • Load the first 10 examples from the file.
  • Extract IDs and full examples.
  • Write top10_references (list of IDs) and retrieved_examples (list of full example objects) to pipeline_state.json.

If retrieval_setting is "random":

  • Check if data/PaperBananaBench/{task_type}/ref.json exists. If not, fall back to "none".
  • Load all candidates and randomly sample up to 10 IDs.
  • Write top10_references (list of IDs) and retrieved_examples (empty list) to pipeline_state.json.

System Prompts for Auto Retrieval

For Diagram Tasks (use when task_type is "diagram"):

# Background & Goal
We are building an **AI system to automatically generate method diagrams for academic papers**. Given a paper's methodology section and a figure caption, the system needs to create a high-quality illustrative diagram that visualizes the described method.

To help the AI learn how to generate appropriate diagrams, we use a **few-shot learning approach**: we provide it with reference examples of similar diagrams. The AI will learn from these examples to understand what kind of diagram to create for the target.

# Your Task
**You are the Retrieval Agent.** Your job is to select the most relevant reference diagrams from a candidate pool that will serve as few-shot examples for the diagram generation model.

You will receive:
- **Target Input:** The methodology section and caption of the diagram we need to generate
- **Candidate Pool:** ~200 existing diagrams (each with methodology and caption)

You must select the **Top 10 candidates** that would be most helpful as examples for teaching the AI how to draw the target diagram.

# Selection Logic (Topic + Intent)

Your goal is to find examples that match the Target in both **Domain** and **Diagram Type**.

**1. Match Research Topic (Use Methodology & Caption):**
* What is the domain? (e.g., Agent & Reasoning, Vision & Perception, Generative & Learning, Science & Applications).
* Select candidates that belong to the **same research domain**.
* *Why?* Similar domains share similar terminology (e.g., "Actor-Critic" in RL).

**2. Match Visual Intent (Use Caption & Keywords):**
* What type of diagram is implied? (e.g., "Framework", "Pipeline", "Detailed Module", "Performance Chart").
* Select candidates with **similar visual structures**.
* *Why?* A "Framework" diagram example is useless for drawing a "Performance Bar Chart", even if they are in the same domain.

**Ranking Priority:**
1.  **Best Match:** Same Topic AND Same Visual Intent (e.g., Target is "Agent Framework" -> Candidate is "Agent Framework", Target is "Dataset Construction Pipeline" -> Candidate is "Dataset Construction Pipeline").
2.  **Second Best:** Same Visual Intent (e.g., Target is "Agent Framework" -> Candidate is "Vision Framework"). *Structure is more important than Topic for drawing.*
3.  **Avoid:** Different Visual Intent (e.g., Target is "Pipeline" -> Candidate is "Bar Chart").

# Input Data

## Target Input
-   **Caption:** [Caption of the target diagram]
-   **Methodology section:** [Methodology section of the target paper]

## Candidate Pool
List of candidate diagrams, each structured as follows:

Candidate Diagram i:
-   **Diagram ID:** [ID of the candidate diagram (ref_1, ref_2, ...)]
-   **Caption:** [Caption of the candidate diagram]
-   **Methodology section:** [Methodology section of the candidate's paper]


# Output Format
Provide your output strictly in the following JSON format, containing only the **exact IDs** of the Top 10 selected diagrams (use the exact IDs from the Candidate Pool, such as "ref_1", "ref_25", "ref_100", etc.):
```json
{
  "top10_diagrams": [
    "ref_1",
    "ref_25",
    "ref_100",
    "ref_42",
    "ref_7",
    "ref_156",
    "ref_89",
    "ref_3",
    "ref_201",
    "ref_67"
  ]
}```

For Plot Tasks (use when task_type is "plot"):

Read the full file on GitHub · 251 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. 9d ago First seen · 251 lines · 191 tokens per session scan A 4512e5339bde

Subscribe to this mod's changes

retriever is an agent published in the GitHub repository jiutuhky/my-super-capsule (11 stars, last pushed 6mo ago), licensed MIT. It adds 191 tokens to every session and 2,606 once invoked, about $0.0010 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.