Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Optimize the research agent for rate limit handling, API call efficiency, web search integration fixes, and improved streaming UX with granular progress updates and source attribution.
.claude/skills/aiskillstore-research-agent-optimization/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-04 | ✓→✗ | ▼ Worse | -42% | 0% |
/home/bender/classwork/Thesisbackend/news_research_agent.py, backend/app/api/routes/research.py, backend/app/services/news_research.pyfrontend/app/search/page.tsx, frontend/lib/api.tsbackend/app/core/config.pysearch_internal_news toolFiles:
backend/news_research_agent.py - tools and cachingbackend/app/services/news_research.py - request batching helpers--skip-gemini-analysis mode for article analysis when quota is lowgemini-2.0-flash (faster, lower token cost) instead of gemini-2.0-flash-expFiles:
backend/app/core/config.py - error handling wrapper, model selectionbackend/app/api/routes/research.py - HTTP error responsesbackend/news_research_agent.py - LLM call error handlingfrom duckduckgo_search import DDGS (not ddgs or DuckDuckGo)web_search and news_search tools are properly bound to LLMFiles:
backend/news_research_agent.py - tool definitions and error handlingexa-code to verify current DuckDuckGo API patternstool_start includes tool name + query parametersweb_search("climate change") → "Searching web for: climate change..."news_search(keywords="COP30") → "Searching news for: COP30..."search_internal_news(query) → "Searching internal knowledge base..."fetch_article_content(url) → "Reading article: title/domain]..."Files:
backend/news_research_agent.py - streaming generatorbackend/app/api/routes/research.py - SSE formattingFiles:
frontend/app/search/page.tsx - message rendering and sources gridfrontend/lib/api.ts - response parsingFiles:
backend/app/api/routes/research.py - error formattingfrontend/app/search/page.tsx - error UI and retry logicsearch_internal_news with 5min TTLresearch_stream() to emit granular tool start/result events| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 11,603 | 23,427 | +102% | 1 | 1 | 0% | 274 | 2,016 | +636% | 0 | 0 | — |
case-02 | fail→fail | 10,626 | 20,450 | +92% | 1 | 1 | 0% | 348 | 2,034 | +484% | 0 | 0 | — |
case-03 | fail→fail | 25,564 | 17,774 | -30% | 1 | 1 | 0% | 311 | 1,975 | +535% | 0 | 0 | — |
case-04 | pass→fail | 14,510 | 11,739 | -19% | 1 | 1 | 0% | 3,119 | 1,796 | -42% | 0 | 0 | — |
case-05 | pass→fail | 21,930 | 16,282 | -26% | 1 | 1 | 0% | 3,759 | 1,826 | -51% | 0 | 0 | — |
case-06 | pass→fail | 14,501 | 12,123 | -16% | 1 | 1 | 0% | 2,958 | 1,771 | -40% | 0 | 0 | — |
case-07 | pass→fail | 7,212 | 21,684 | +201% | 1 | 1 | 0% | 1,260 | 1,880 | +49% | 0 | 0 | — |
case-08 | fail→fail | 27,791 | 16,751 | -40% | 1 | 1 | 0% | 1,692 | 1,885 | +11% | 0 | 0 | — |
case-09 | fail→pass | 21,869 | 3,396 | -84% | 1 | 1 | 0% | 2,317 | 2,030 | -12% | 0 | 0 | — |
case-10 | fail→pass | 35,092 | 31,946 | -9% | 1 | 1 | 0% | 1,281 | 2,291 | +79% | 0 | 0 | — |
case-11 | pass→fail | 17,131 | 55,414 | +223% | 1 | 1 | 0% | 1,639 | 1,807 | +10% | 0 | 0 | — |
case-12 | pass→pass | 12,692 | 16,404 | +29% | 1 | 1 | 0% | 1,249 | 2,811 | +125% | 0 | 0 | — |
case-13 | fail→fail | 15,878 | 46,908 | +195% | 1 | 1 | 0% | 1,806 | 1,911 | +6% | 0 | 0 | — |
case-14 | fail→pass | 11,638 | 13,216 | +14% | 1 | 1 | 0% | 1,984 | 2,424 | +22% | 0 | 0 | — |
case-15 | fail→pass | 16,813 | 33,951 | +102% | 1 | 1 | 0% | 2,083 | 2,533 | +22% | 0 | 0 | — |
case-16 | fail→fail | 15,608 | 21,987 | +41% | 1 | 1 | 0% | 1,905 | 1,845 | -3% | 0 | 0 | — |
case-17 | fail→fail | 40,034 | 73,680 | +84% | 1 | 1 | 0% | 1,506 | 1,892 | +26% | 0 | 0 | — |
case-18 | pass→fail | 38,597 | 35,192 | -9% | 1 | 1 | 0% | 2,358 | 1,827 | -23% | 0 | 0 | — |
case-19 | pass→fail | 16,988 | 52,586 | +210% | 1 | 1 | 0% | 1,841 | 1,777 | -3% | 0 | 0 | — |
case-20 | fail→fail | 22,011 | 46,312 | +110% | 1 | 1 | 0% | 2,633 | 1,791 | -32% | 0 | 0 | — |
case-21 | fail→fail | 41,934 | 61,402 | +46% | 1 | 1 | 0% | 3,790 | 1,864 | -51% | 0 | 0 | — |
case-22 | pass→fail | 26,111 | 47,020 | +80% | 1 | 1 | 0% | 3,886 | 1,730 | -55% | 0 | 0 | — |
case-23 | fail→fail | 41,720 | 102,504 | +146% | 1 | 1 | 0% | 1,401 | 1,955 | +40% | 0 | 0 | — |
case-24 | fail→fail | 28,059 | 91,223 | +225% | 1 | 1 | 0% | 2,426 | 1,820 | -25% | 0 | 0 | — |
case-25 | pass→fail | 16,967 | 15,215 | -10% | 1 | 1 | 0% | 3,280 | 1,775 | -46% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted, and 4 counted toward the lift figure. The other 21 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of -20 percentage points is the difference between those two pass rates over the 4 comparable cases. 9 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.