requery

requery is a skill for Claude Code from jun0-ds/sonmat. It costs 84 tokens per session (1,844 once invoked), scanned A, original, BSD-3-Clause.

A search-retry method for finding information when the first search fails. It changes the wording, time frame, or viewpoint and checks structured, partly structured, and free-form notes.

In plain words
What is it for?
It helps agents search indexes, file headers, logs, notes, and other project records by progressively rebuilding their search terms.
Why use it?
It reduces missed answers caused by changed names, vague wording, or information stored in an unexpected place. It stops as soon as the first search succeeds.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the sonmat plugin — 7 skills, 3 agents, 1 hook shipped together

Good fit It helps agents search indexes, file headers, logs, notes, and other project records by progressively rebuilding their search terms.

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

Made for: Claude Code.

Or install sonmat, the plugin that ships this one along with the rest of its 7 skills, 3 agents, 1 hook.

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 requery

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jun0-ds/sonmat/requery"><img src="https://agentmods.dev/badge/skills/jun0-ds/sonmat/requery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,844 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.00084 $0.01844
Opus 5.5 $0.00034 $0.00738
Sonnet 5.5 $0.00017 $0.00369
Haiku 4.5 $0.00008 $0.00184

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

Security

Grade A, and why

requery 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 today.

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/requery/SKILL.md · 122 lines

How it starts

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

Requery — Agentic Retrieval Cycle

requery는 첫 질문으로 답을 찾지 못했을 때 표현·시점·관점을 바꿔 다시 검색하는 규율이다. 검색어를 반복해서 재구성하는 방법을 정하며 별도 도구를 추가하지 않는다.

참고한 사례는 Letta 블로그의 *Is a Filesystem All You Need?*다. 이 글의 LoCoMo 질의응답 실험에서는 파일 시스템의 단순 도구(grep·search_files)를 에이전트가 자율적으로 쓴 구성이 74%를 기록해, 그래프 기반 Mem0의 68.5%보다 높았다. 여기서 차용하는 것은 검색 장치를 먼저 복잡하게 만들기보다 질문을 바꿔 다시 찾는 방법이다.


발동 시점

다음 신호가 잡히면 적용한다.

  1. 첫 검색 실패 — 인덱스·헤더·grep을 한 번 확인했지만 답을 찾지 못했다.
  2. 인계 누락 의심 — bridge-note·agenda에서 이전 내용을 찾지 못해 "그 내용을 어디에 남겼지?"라는 의문이 생겼다.
  3. 정보 변경 의심 — 이름·경로·설명 방식이 바뀌었을 수 있다.
  4. 표현 수준의 차이 — 사용자는 추상적으로 묻고 본문에는 구체적인 항목이 적혀 있거나 그 반대다.

첫 검색에서 답을 찾았으면 즉시 끝낸다. 반복 검색을 강제하지 않는다.


자료 유형별 검색

자료 유형 예시 첫 검색 방법
정형 메모리 인덱스, frontmatter, ADR의 supersedes, agenda 체크박스 grep과 인덱스 읽기
반정형 bridge-note 대화 헤더, devlog 파일명({date}_{slug}.md), journal 헤더(## YYYY-MM-DD [hostname]) head·grep과 본문 읽기
비정형 journal 본문, 노트 수신함, bridge-note 본문, devlog 서술 rg와 검색어 재구성

정형 자료에서 질문에 맞는 답을 찾으면 한 차례로 끝난다. 반정형 자료는 한두 차례 더 찾아야 할 수 있고, 비정형 자료에서는 검색어를 여러 번 바꾸기도 한다.


6단계 protocol

1. 사용자 질문이나 작업 중 생긴 질문을 확인한다.
2. 정형 자료를 찾는다 — 메모리 인덱스 → 분야 안내가 있으면 경유 → 본문 → ADR의 supersedes 관계
3. 못 찾으면 반정형 자료를 찾는다 — bridge-note 대화 헤더, devlog 날짜, journal 헤더
4. 못 찾으면 비정형 자료를 찾는다 — rg 검색과 본문 읽기
5. 여전히 못 찾으면 질문을 재구성하고 2단계부터 다시 찾는다 — 아래 네 방법을 적용한다.
6. 반복해도 못 찾으면 검색한 범위와 남은 불확실성을 사용자에게 알린다.

분야 안내를 두지 않은 작업 기반에서는 인덱스에서 본문으로 바로 간다. 이 절차 때문에 새 라우터를 만들 필요는 없다.

질문을 바꾸는 네 방법

방법 적용할 상황 예시
동의어 이름·호칭이 바뀌었을 때 옛 컴포넌트명 → 새 컴포넌트명 / 별칭 → 정식 이름
시점 변경 날짜나 대화 묶음이 다를 때 "지난주 작업" → 해당 날짜 범위 / "어제" → "전 세션 인계"
추상↔구체 라벨 vs 항목 "agenda" → "[ ] 인증 방식 결정"
관점 변경 정책·구현·운영 중 다른 관점이 필요할 때 "인증 정책" → "토큰 만료 설정" → "배포 환경 변수"

각 방법으로 질문의 표현을 바꿔 다시 검색한다. 반복 횟수에 고정 상한은 두지 않는다. 찾는 데 드는 비용이 문제가 되면 검색어를 바꾼 횟수를 세어 정보나 탐색 경로가 낡았는지 살핀다.


자제선 (deflationary)

  1. 도구 추가 — embedding·BM25·그래프 인덱스의 도입 여부는 grep의 누락·오탐이 두 번 이상 재현될 때 판단한다. 이 스킬은 검색 규율만 정하며 인덱스를 만들지 않는다.
  2. 반복 자동화 — 단계마다 에이전트가 판단하므로 검색 전체를 자동 파이프라인으로 바꾸지 않는다.
  3. 별도 측정 파이프라인 — Letta 사례에서 차용한 관점은 도구를 잘 쓰는 능력에 있다. 측정 자체를 금지하지는 않는다. 검색어를 재구성한 횟수는 그 자리에서 셀 수 있으므로 별도 인프라를 만들지 않는다. 오래된 정보의 신호로 쓸 때도 막연한 느낌 대신 이 횟수를 센다.

Read the full file on GitHub · 122 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. today First seen · 122 lines · 84 tokens per session scan A ce4b3b903efa

Subscribe to this mod's changes

requery is a skill published in the GitHub repository jun0-ds/sonmat (5 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 84 tokens to every session and 1,844 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-11-13.

Related

requery compared with skills from other repositories

requery next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
requeryjun0-ds/sonmatSkill5yesterdayBSD-3-ClauseA84Claude Code
Vizra ADK Memory Systemvizra-ai/vizra-adkSkill2961mo agoMITA24Claude Code, Codex
adr-ops0xDarkMatter/claude-modsSkill816d agoMITA62Claude Code
nav-compactqf-studio/navigatorSkill3564d agoMITB38Claude Code
hive-mind-advancedfrankxai/claude-skills-librarySkill47todayMITA47Claude Code
creator-productivityfrankxai/claude-skills-librarySkill47todayMITA62Claude Code
memory-prunefrankxai/claude-skills-librarySkill47todayMITA67Claude Code