---
name: research-with-primary-sources-prompt
description: A prompt that researches a technical question from primary sources only - official docs, source code, specs and changelogs, not second-hand write-ups - and saves the findings to a Markdown file in the repo with a source link for every claim. Use when you need to know how a library, API or standard really works before building on it.
license: MIT
metadata:
  category: research-prompts
  tags: "research,docs,fact-check"
  author: johnny-bravo
  version: "1.0"
  updated: "2026-11-02"
  status: published
  aliases: "primary sources, research a library, read the docs first"
  source_url: "https://github.com/mattpocock/skills/tree/a496f5513d4a4cf889bc48e189e579f4b0bdf6aa/skills/engineering/research"
  source_license: MIT
  copyright: "Copyright (c) 2026 Matt Pocock"
  original_author: "Matt Pocock (mattpocock/skills, research)"
  modified: "Adapted by TheSkillVault: expanded the brief research instruction into a paste-in prompt with an original findings template and confidence levels; dropped background-agent requirement; added steps, adapt notes and done-when."
  imported_on: "2026-11-02"
---

# Research with primary sources (prompt)

Blog posts go stale and AI memory guesses. This prompt makes the AI read the real docs and code, and cite them.

## When to use
- You are about to use an API or library feature and need to know how it really behaves.
- Answers online disagree, or they are for an old version.
- You want research saved in the repo so the team and future agents can reuse it.

## When not to use
- Checking claims in an article or post. Use research-fact-check-claims-prompt.

## Steps
1. Write the question as specifically as you can, with versions.
2. Paste the prompt. In tools with background agents, run it in one so you can keep working.
3. Open the saved file and spot-check two or three source links.

## Prompt
```text
Research this question using primary sources only: {{QUESTION}}

Primary sources are official docs, the source code, specs or RFCs, changelogs and release notes, and first-party API references. Blog posts and forum answers can point you somewhere, but every claim must trace back to a primary source.

1. Find the relevant primary sources for the version I use: {{VERSION}}.
2. Answer the question directly, then give the details.
3. Cite every claim with a link (and a line or section where possible).
4. Mark each finding: confirmed (seen in source), likely (documented but not verified), or unknown.
5. Note anything that changed between versions.
6. Save the result as a Markdown file where this repo keeps notes (for example docs/research/), and tell me the path.
```

## How to adapt
- No repo? Ask for the answer in chat with the same citations.
- Comparing two libraries? Ask for one section per library and a short comparison table.

## Gotchas
- Do not paste private code or keys into a public AI tool to "help" the search.
- Links can still be misread. Check the ones your decision depends on.

## Portability
Works with any AI that can browse or read files, in any language or framework. No tool lock-in.

## Done when
- The question has a direct answer with a primary-source link per claim.
- The findings are saved in the repo with a confidence mark on each.

## Example prompt
"Research from primary sources how Next.js 15 caches fetch requests by default, and save it to docs/research."

---
Adapted from "research" in mattpocock/skills (MIT, Copyright (c) 2026 Matt Pocock). See LICENSE.txt.
