# Improve Research Agent Reliability

Research agents can waste quota, hide progress, and return hard-to-use source data. This skill guides Claude, Codex, or Claude Code through practical backend and frontend improvements.

## Install

```bash
npx skillstore add benderfendor/research-agent-optimization
```

## Metadata

- - Slug: benderfendor-research-agent-optimization
- - Version: 1.0.0
- - Author: BenderFendor
- - GitHub username: BenderFendor
- - License: MIT
- - Repository: https://github.com/BenderFendor/Thesis/tree/main/.github/skills/research-agent-optimization
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: low
- - Quality score: 77
- - Quality tier: bronze
- - Public page: https://skillstore.pages.dev/skills/benderfendor-research-agent-optimization
- - Manifest: https://skillstore.pages.dev/api/skills/benderfendor-research-agent-optimization/manifest

## Capabilities

- Defines backend changes for Gemini rate-limit handling and exponential backoff.
- Specifies DuckDuckGo web and news search initialization checks.
- Plans caching and batching for internal semantic news search.
- Maps streaming tool events to clear user-facing progress messages.
- Describes frontend source-card rendering instead of raw JSON blocks.
- Lists verification checks for quota errors, search results, and source de-duplication.

## Use Cases

- Stabilize Agent Research Workflows: Use the checklist to reduce duplicate calls, handle quota failures, and keep research sessions responsive.
- Improve Streaming Search Feedback: Map tool activity into clear progress events so users see what the agent is doing during long searches.
- Present Research Sources Clearly: Replace raw response data with readable source cards grouped by retrieval method.

## Prompt Templates

### Review Current Agent

```
Review my research agent against this skill. Identify the missing rate-limit, search, streaming, and source-rendering changes.
```

### Implement Rate Limits

```
Apply the rate-limit handling plan. Add graceful 429 handling, exponential backoff, quota logging, and user-safe errors.
```

### Fix Search and Streaming

```
Update the web search tools and streaming events so each tool call reports its name, query, result count, and duration.
```

### Complete Full Optimization

```
Implement the full optimization checklist, then verify caching, DuckDuckGo search, SSE progress, source cards, and error scenarios.
```

## Limitations

- It is implementation guidance, not a packaged library or runnable automation.
- It assumes the target project uses the listed backend and frontend file paths.
- It may need current DuckDuckGo API verification before implementation.
- It does not include complete test code or migration scripts.

## Best Practices

- Verify the current DuckDuckGo package API before changing search tool initialization.
- Keep user-facing error messages clear and avoid exposing stack traces.
- Test repeated queries to confirm caching and source de-duplication work.

## Anti Patterns

- Do not retry quota failures indefinitely or hide the cause from users.
- Do not render raw JSON source blocks as the final research experience.
- Do not add streaming messages that omit the active tool or query context.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T15:50:54.935\+00:00
- - Summary: Static analysis reported shell execution, weak cryptography, and reconnaissance patterns, but the reviewed file is Markdown guidance. The shell findings are inline code paths or examples, and no executable script, cryptographic primitive, or system reconnaissance command was found. A low warning remains because the skill asks the agent to use an external code-search tool for API verification.

## Stats

- - Views: 232
- - Downloads: 6
- - Favorites: 0
- - Popularity score: 0
