x-retrieval-systems

x-retrieval-systems is a skill for Claude Code from ElemontCapital/x-algorithm-skills. It costs 53 tokens per session (379 once invoked), scanned A, original, Apache-2.0.

A technical reference for how X, formerly Twitter, narrows a very large stream of posts into a smaller set that can be ranked for a user's feed or discovery results. It covers search indexes, machine-learned representations, and approximate nearest-neighbor search.

In plain words
What is it for?
It helps analyze in-network retrieval from followed accounts, out-of-network discovery, Earlybird indexing, Phoenix similarity search, HNSW, and retrieval latency.
Why use it?
It explains the early filtering stage that decides which posts are even eligible for ranking, before later recommendation steps.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the x-algorithm plugin — 8 skills shipped together

Good fit It helps analyze in-network retrieval from followed accounts, out-of-network discovery, Earlybird indexing, Phoenix similarity search, HNSW, and retrieval latency.

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

Made for: Claude Code.

Or install x-algorithm, the plugin that ships this one along with the rest of its 8 skills.

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 x-retrieval-systems

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/elemontcapital/x-algorithm-skills/x-retrieval-systems"><img src="https://agentmods.dev/badge/skills/elemontcapital/x-algorithm-skills/x-retrieval-systems.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 379 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.00053 $0.00379
Opus 5 $0.00026 $0.00189
Sonnet 5 $0.00011 $0.00076
Haiku 4.5 $0.00005 $0.00038

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

Security

Grade A, and why

x-retrieval-systems 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.

plugins/x-algorithm/skills/x-retrieval-systems/SKILL.md · 31 lines

What it actually says

X Retrieval Systems

Expertise in X's multi-stage retrieval architecture, including Earlybird search indexing and Phoenix-based ANN similarity search.

Context

Retrieval at X is split between In-Network (content from people you follow) and Out-of-Network (discovery). In-Network retrieval relies on Earlybird (Lucene-based search), while Out-of-Network retrieval uses Phoenix (Two-Tower embeddings) and ANN (Approximate Nearest Neighbor) algorithms like HNSW.

What it does

  • Decodes In-Network Sourcing: Explains how Earlybird shards the index into Realtime, Protected, and Archive clusters.
  • Explains Discovery Logic: Details how Two-Tower models enable "semantic" search for content you don't follow.
  • Analyzes Latency: Breaks down the single-writer/multi-reader concurrency model that allows for sub-second global retrieval.

Example Trigger Prompts

  • "/find-candidates how Earlybird shards real-time index"
  • "/find-candidates retrieving 1,500 candidates from 500M tweets"
  • "Role of HNSW in embedding-based discovery"
  • "In-Network (Thunder) vs Out-of-Network (Phoenix) retrieval"
  • "Trace 'Discovery' request: User Embedding → Candidate Source"
Files

What ships with it

2 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. 9d ago First seen · 31 lines · 53 tokens per session scan A dc1caac580e8

Subscribe to this mod's changes

x-retrieval-systems is a skill published in the GitHub repository ElemontCapital/x-algorithm-skills (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 53 tokens to every session and 379 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

data-analyzer

Guidance for analyzing structured data, generating statistics and producing data-driven insights. Use when the user asks to analyze data, compute statistics, find patterns, or generate analytical reports.

vixues/LeAgent · 39 tokens

ai-enterprise-ai-usecase-priority-assessment

A business-diagnosis helper for deciding which enterprise AI use cases deserve attention first. It turns supplied information into a summary, findings, recommended actions, and reusable deliverables.

skillsaiagent/aiskills · 79 tokens

spark-environment-setup

Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.

wshobson/agents · 76 tokens

spark-training-gotchas

Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.

wshobson/agents · 63 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

guardrails-ai-setup

Guardrails AI validation framework setup for LLM applications. Implement input/output validation, safety checks, and structured output enforcement.

a5c-ai/babysitter · 30 tokens