agentleFS
seulkikaangseulkikaang/claude-skills/knowledge-query/SKILL.md

knowledge-query

Skill1 starsChanged 4 months agoMITView on GitHub

UTILITY — 지식 허브 read-only 검색 (grep + cards.jsonl 카탈로그). knowledge-cite의 Step 1이 자동 호출하므로 콘텐츠 제작 시엔 knowledge-cite를 쓸 것. 이 스킬 단독 사용은 '~에 대한 자료 있어?' 류 빠른 조회 전용 (인용/추출 없이). Honors KNOWLEDGE_MODE (legacy|cards|hybrid).

  • Reads credentials

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. EvolutionAPI/evo-nexus★ 545same name
    2. evolution-foundation/evo-nexus★ 535same name
    3. huanchong-99/PocketAide★ 9same name
    4. ravidsrk/agent-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the catalog looks stale (a card exists but has no row), regenerate:

    line 69
  2. Very specific:

    Read index.md / topic hit → read the named topics/*.md (legacy fallback)

    line 79
  3. Distinctive:

    Stop at the shallowest level that answers the question.

    line 84

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

knowledge-query

검색 폴백 4단 (2026-07-12)

scripts/query.py 는 히트가 나올 때까지 자동으로 단계를 내려간다:

  1. exact — 질의 문자열 그대로 grep
  2. 엔티티 변형 — 질의 속 도구/제품 표기를 summaries/entities.jsonl(92 엔티티)의 canonical·다른 alias로 치환해 재시도 (예: "나노바나나 프로" ↔ "Nano Banana Pro")
  3. 토큰 AND — 공백 분해 토큰 전부가 같은 줄에 있으면 히트
  4. 어간 70% — 조사/어미 제거 후 어간(2자+)의 70%+ 일치 ("아끼는 법"→"아끼")

그래도 (no hits)면 출력에 경고가 붙는다 — 콘텐츠 제작 흐름이면 이 결과와 무관하게 retriever recommend(카탈로그 전체 랭킹)를 진행할 것. 회귀 감시: knowledge/scripts/eval_retrieval.py (골든셋 15쿼리, 주간 cron).

Stage-1 of the retrieval flow. Always run this before invoking knowledge-retriever.

When to use

  • Drafting content that needs a reference/quote/image from the knowledge base
  • Checking which topics or cards mention a keyword
  • Finding images by OCR/Vision text

How to use

python ~/.claude/skills/knowledge-query/scripts/query.py "키워드"
python ~/.claude/skills/knowledge-query/scripts/query.py "키워드" --topic ai-basics
python ~/.claude/skills/knowledge-query/scripts/query.py "키워드" --level images --source src-2024-0903
python ~/.claude/skills/knowledge-query/scripts/query.py "키워드" --json  # machine-readable

Plain-text output (spec §6.1 format):

TOPIC HITS: ai-basics(3), marketing-ai(1)
CARDS:
  - marketing/example-workshop-case — 예시 워크숍 사례...
  - ai-basics/example-framework-card — ...
IMAGES:
  - images-pool/src-2024-0903/img-015a.png [chart] OCR: "Before:12/After:38"
NEXT: knowledge-retriever mode:recommend with above card ids  [mode=hybrid]

Mode handling

KNOWLEDGE_MODEBehavior
legacyOnly refs/courseware/*/content.md (pre-redesign)
cardsOnly new cards/ layout (post-Phase 4)
hybrid (default)cards/ preferred; if empty, also show refs/courseware/ as legacy fallback

Set via ~/.claude/knowledge/.env or the KNOWLEDGE_MODE env var.

Level 0 — card catalog (summaries/cards.jsonl)

The full card catalog lives at ~/.claude/knowledge/summaries/cards.jsonl — one JSONL row per card: id, topics, type, title, summary, tags, aliases, keywords, source_id, n_images, updated. Grep it first: it covers aliases (영한 동의어·표기변형·자연어 검색표현) and keywords (본문 핵심어), which are also grep-searchable directly in each card's frontmatter (after tags:). This is what makes fuzzy/English/변형 queries hit without opening card bodies.

If the catalog looks stale (a card exists but has no row), regenerate:

python3 ~/.claude/skills/knowledge-absorb/scripts/build_card_catalog.py
# also auto-invoked by curate_topic_indexes.py

Progressive protocol

  1. Grep summaries/cards.jsonl (titles + summaries + tags + aliases + keywords)
  2. Read index.md / topic hit → read the named topics/*.md (legacy fallback)
  3. Topic hit → read the topic's cards/{topic}/index.md
  4. Card-index hit → read the specific cards/{topic}/{card-id}.md frontmatter
  5. Card hit → open a slide-NN.md or images-pool/... file only if the card frontmatter points to it

Stop at the shallowest level that answers the question.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.