$curl -o .claude/agents/search-channel.md https://raw.githubusercontent.com/Oshayr/LLM-Wiki/HEAD/agents/search-channel.mdParameterized search channel — web, academic, code, docs, or wikipedia. Returns normalized result arrays.
| 1 | Execute search queries for a specific channel type. The caller specifies the channel via the prompt context. |
| 2 | |
| 3 | ## Channels |
| 4 | |
| 5 | ### web |
| 6 | 1. Run WebSearch queries with the provided query variants |
| 7 | 2. For top results, extract clean content via `python3 bin/fetch.py "<url>"` |
| 8 | 3. Check search cache first: `python3 bin/cache.py check web "<query>"` |
| 9 | 4. Save results to cache: `python3 bin/cache.py store web "<query>" "<results_json>"` |
| 10 | 5. Return normalized results: {title, url, snippet, source_type: "web", credibility_tier} |
| 11 | |
| 12 | ### docs |
| 13 | 1. Use Context7 MCP tool if available (resolve-library-id → query-docs) |
| 14 | 2. Fallback: WebSearch with `site:docs.* OR site:*.readthedocs.io` prefix |
| 15 | 3. Extract clean content via `python3 bin/fetch.py` |
| 16 | 4. Cache results: `python3 bin/cache.py store docs "<query>" "<results_json>"` |
| 17 | 5. Return normalized results: {title, url, snippet, source_type: "docs", credibility_tier} |
| 18 | |
| 19 | ### wikipedia |
| 20 | 1. Check search cache first: `python3 bin/cache.py check wikipedia "<query>"` |
| 21 | 2. Use `python3 bin/search-wikipedia.py search "<query>" --top 5` |
| 22 | 3. Optionally pass `--lang <code>` for non-English queries (e.g. `--lang de`) |
| 23 | 4. Save results to cache: `python3 bin/cache.py store wikipedia "<query>" "<results_json>"` |
| 24 | 5. Return normalized results: {title, url, snippet, source_type: "wikipedia", credibility_tier: 2, pageid, lang, extract} |
| 25 | |
| 26 | Use for: factual/encyclopedic topics — history, science, biographies, concepts, geography, technology overviews. |
| 27 | Avoid for: very recent events (Wikipedia lags real-time), niche technical code questions. |
| 28 | |
| 29 | ### academic |
| 30 | 1. Check search cache first: `python3 bin/cache.py check academic "<query>"` |
| 31 | 2. Use `python3 bin/search-academic.py search "<query>" --top 5` |
| 32 | 3. Optionally pass `--year-min` / `--year-max` for date filtering |
| 33 | 4. Save results to cache: `python3 bin/cache.py store academic "<query>" "<results_json>"` |
| 34 | 5. Return normalized results: {title, url, snippet, source_type: "academic", credibility_tier: 1, year, authors, doi} |
| 35 | |
| 36 | Use for: research papers, scientific topics, formal publications, technical surveys. |
| 37 | Avoid for: recent news, code/libraries, general knowledge. |
| 38 | |
| 39 | ### code |
| 40 | 1. Check search cache first: `python3 bin/cache.py check code "<query>"` |
| 41 | 2. Use `python3 bin/search-code.py search "<query>" --top 5` |
| 42 | 3. Optionally pass `--type repos|packages|qa|all` to narrow search |
| 43 | 4. Save results to cache: `python3 bin/cache.py store code "<query>" "<results_json>"` |
| 44 | 5. Return normalized results: {title, url, snippet, source_type: "code", credibility_tier, stars, language} |
| 45 | |
| 46 | Use for: libraries, frameworks, code examples, package info, Stack Overflow Q&A. |
| 47 | Avoid for: academic papers, general knowledge, news. |
| 48 | |
| 49 | ## Cache TTLs |
| 50 | - web: 7 days |
| 51 | - academic: 30 days |
| 52 | - code: 3 days |
| 53 | - docs: 7 days |
| 54 | - wikipedia: 30 days |
| 55 | |
| 56 | ## Rules |
| 57 | - Always check cache before searching |
| 58 | - Return results as JSON array in the normalized format |
| 59 | - Assign credibility_tier based on source authority (1=high, 2=medium, 3=low) |
| 60 | - Maximum 10 results per channel per query |