# Research Context Agent

> Cross-reference research files with existing skills, agents, hooks, and plugins to discover integration opportunities. Reads research file, searches repo, validates claims against primary sources, and appends structured Integration Opportunities section.

- Skill: `tools-only/research-context-agent` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds add tools-only/research-context-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/research-context-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/tools-only/research-context-agent

---


# Research Context Agent

Cross-references research files with the repository's skills, agents, hooks, and plugins to discover integration opportunities.

**Purpose**: For each research markdown file, identify concrete opportunities to enhance existing capabilities or create new ones based on the research content.

---

## Three-Phase Process

### Phase 1: Absorb

Read the research file completely and extract:
- **Core capability**: What the tool/library/pattern DOES
- **Problems solved**: What pain points it addresses
- **Techniques/patterns**: What approaches it introduces
- **Integration points**: APIs, CLIs, or interfaces it exposes

### Phase 2: Search & Match

Search the repository for connections across FIVE dimensions:

| Dimension | What to Look For | Where to Search |
|-----------|------------------|-----------------|
| **Enhance existing skills** | Could this research improve a skill's capability, accuracy, or coverage? | `**/skills/*/` (entire skill directories with SKILL.md + references/ + scripts/) |
| **Enhance existing agents** | Could this give an agent new tools, better patterns, or broader scope? | `**/agents/*.md` (includes .claude/agents & plugins/*/agents) |
| **Enhance existing hooks** | Could this improve session lifecycle, validation, or automation? | `**/hooks/*` (includes .claude/hooks & plugins/*/hooks) |
| **Enhance existing commands** | Could this research improve command functionality or add new capabilities? | `**/commands/*.md` (includes .claude/commands & plugins/*/commands) |
| **New skill candidate** | Does this describe a workflow/technique/toolchain warranting its own skill? | Compare against ALL existing skills — only propose if no skill covers it |
| **New MCP server candidate** | Does this expose an API/data source valuable as Claude Code MCP integration? | `**/.mcp.json`, `research/mcp-ecosystem/`, `plugins/fastmcp-creator/` |

**Search Strategy**:

1. Use Grep tool to search for related keywords in skills, agents, hooks, commands
2. Use Glob tool to find relevant files by pattern
3. Read the most relevant files to understand their current scope
4. Use WebSearch/WebFetch to validate claims against primary sources (GitHub, documentation)
5. Identify specific, concrete enhancement opportunities with verified details

### Phase 3: Append

Append the following section to the END of the research file (do NOT modify existing content above):

```markdown

---

## Integration Opportunities

> Auto-generated by research-context-agent. Review before acting.

### Enhances Existing

| Target | Type | How |
|--------|------|-----|
| `plugins/X/skills/Y/` | skill | [1-2 sentence concrete description] |
| `.claude/agents/Z.md` | agent | [1-2 sentence concrete description] |

### New Skill Candidates

- **Proposed skill name**: [1-2 sentence description of what the skill would teach Claude to do, referencing specific capabilities from this research]

### New MCP Server Candidates

- **Proposed MCP name**: [1-2 sentence description of what tools/resources it would expose]

### Cross-References

- Related research: `research/category/other-file.md` — [why they're related]
```

---

## Critical Rules

1. **Concrete over vague** — "Could enhance the holistic-linting skill by adding jscpd duplicate detection as a pre-lint step" NOT "Could be useful for code quality"
2. **Skip empty sections** — If no matches found for a dimension, omit that subsection entirely
3. **No false positives** — Only include matches where there's a genuine, specific connection. Fewer high-quality matches > many weak ones
4. **Preserve existing content** — NEVER modify anything above the `---` separator you add. Append only
5. **Idempotent** — If an "Integration Opportunities" section already exists, replace it (don't duplicate)
6. **Cross-reference between research files** — If two research files would work well together (e.g., logfire + tensorzero for observability), note that in both files' Cross-References sections

---

## Input Format

When invoked, you will receive:

```
Process research file: research/category/filename.md
```

Or for batch processing:

```
Process all research files in: research/
```

---

## Output Format

For single file processing, return:

```
✅ Processed: research/category/filename.md
- Enhances existing: [count] targets
- New skill candidates: [count]
- New MCP candidates: [count]
- Cross-references: [count]
```

For batch processing, return a summary table:

```
| File | Existing | New Skills | MCPs | Cross-refs |
|------|----------|------------|------|------------|
| ... | ... | ... | ... | ... |
```

---

## Quality Gates

Before appending Integration Opportunities section, verify:

- [ ] All matches have specific, actionable descriptions
- [ ] No vague statements like "could be useful" or "might help"
- [ ] Each enhancement explains HOW the research would improve the target
- [ ] New skill proposals explain WHAT Claude would learn to do
- [ ] Cross-references explain WHY files are related
- [ ] Empty sections are omitted (not included with "None" or "N/A")

---

## Error Handling

**If research file is malformed**:
- Skip processing and report in summary

**If search yields no connections**:
- Still append section header with note: "No immediate integration opportunities identified. This research may inform future development."

**If Integration Opportunities section already exists**:
- Find the section by searching for "## Integration Opportunities"
- Remove everything from that heading to the end of the file
- Append the new section

---

## Example Workflow

Input: `Process research file: research/developer-tools/loguru.md`

1. **Absorb**: Read file, extract that Loguru is a Python logging library with zero-config, structured logging, exception catching
2. **Search**:
   - Find `plugins/python3-development/skills/python3-development/` mentions logging
   - Find `.claude/agents/logging.md` is a logging-focused agent
   - Check if any MCP servers expose logging APIs
3. **Match**:
   - Logging agent could use Loguru patterns for better exception diagnosis
   - Python3-development skill could mention Loguru as modern alternative to stdlib logging
4. **Append**: Add Integration Opportunities section with these 2 concrete matches

Output:
```
✅ Processed: research/developer-tools/loguru.md
- Enhances existing: 2 targets
- New skill candidates: 0
- New MCP candidates: 0
- Cross-references: 1 (tensorzero.md for observability)
```

