ctxd-retrieval

ctxd-retrieval is a skill for Codex from ctxd-dev/ctxd. It costs 44 tokens per session (497 once invoked), scanned A, original, MIT.

A guide for searching and checking evidence in ctxd, a tool that retrieves information from tracked documents. It explains how to search, read source context, handle pages of results, and resolve conflicting or outdated material.

In plain words
What is it for?
Use it when answering questions from managed documents through the ctxd command-line tool or MCP connection.
Why use it?
It reduces the risk of answering from search previews, incomplete results, or documents that are drafts or no longer current.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when answering questions from managed documents through the ctxd command-line tool or MCP connection.

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

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 ctxd-retrieval

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ctxd-dev/ctxd/ctxd-retrieval"><img src="https://agentmods.dev/badge/skills/ctxd-dev/ctxd/ctxd-retrieval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 497 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.00044 $0.00497
Opus 5.5 $0.00018 $0.00199
Sonnet 5.5 $0.00009 $0.00099
Haiku 4.5 $0.00004 $0.00050

Measured yesterday against content hash 56582bbe7efe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ctxd-retrieval 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 yesterday.

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.

skills/ctxd-retrieval/SKILL.md · 44 lines

What it actually says

ctxd retrieval

Use ranked search to find candidates, then verify claims in documents. Search previews and grep lines are leads, not a substitute for reading source context.

  1. Choose the narrowest authorized source prefix that can contain the answer. Use tree only when the available roots are unknown.
  2. Search with the complete question. The default 20 results and eight previews are normally appropriate; do not reduce them before seeing the first page.
  3. When next_offset is returned, inspect at least the next page using the same query, prefix, and index_revision. Continue further when neither page has evidence covering every requested fact. If candidate_pool_stopped_by=limit, issue a narrower query for unresolved qualifiers rather than treating absence from the bounded pool as proof.
  4. Read at least one promising returned path before answering. Prioritize hits with recommended_action=read, matching titles, and matched_terms covering different parts of the question. For multi-part or conflicting evidence, read enough documents to resolve each part and determine which material is current, approved, draft, example, or superseded.
  5. Use grep after ranked search and reads when an exact identifier, number, or phrase remains unresolved. If grep returns next_cursor, resume with the same pattern and prefix. Read an exact path returned by that grep before using the match, even if another document was already read.
  6. Answer only from verified document content. State unresolved gaps instead of inferring them, and return the supporting ctxd paths or document IDs.

CLI equivalents:

ctxd files search "<complete question>" --prefix <prefix>
ctxd files search "<complete question>" --prefix <prefix> \
  --offset <next_offset> --index-revision <index_revision>
ctxd files read <returned-path>
ctxd files grep "<exact term or regex>" --prefix <prefix> --timeout-seconds 10

For MCP, use the tools with the same names and fields. Do not broaden a prefix past the user's authorized or requested scope.

Files

What ships with it

1 file 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. yesterday First seen · 44 lines · 44 tokens per session scan A 56582bbe7efe

Subscribe to this mod's changes

ctxd-retrieval is a skill published in the GitHub repository ctxd-dev/ctxd (50 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 497 once invoked, about $0.0002 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-12-03.

Related

ctxd-retrieval compared with skills from other repositories

ctxd-retrieval next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ctxd-retrievalctxd-dev/ctxdSkill50yesterdayMITA44Codex
pkup-genpPrecel/pkup-genSkill143mo agoMITA27Claude Code, Codex
algodocs-automationranbot-ai/awesome-skillsSkill15yesterdaynoneA29Claude Code, Codex
api2pdf-automationranbot-ai/awesome-skillsSkill15yesterdaynoneA29Claude Code, Codex
boldsign-automationmanu14357/zskillsSkill164mo agoMITA27Claude Code, Codex
affinda-automationmanu14357/zskillsSkill164mo agoMITA27Claude Code, Codex
algodocs-automationmanu14357/zskillsSkill164mo agoMITA29Claude Code, Codex