agentleFS
las-pinterlas-pinter/persona-agents/skills/researcher/source-selection/SKILL.md

source-selection

Skill2 starsChanged 2 months agoMITView on GitHub

Decision rules for choosing between Context7, DeepWiki, and Exa based on query type.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before choosing a source, check whether this topic was already researched.

    line 10
  2. Distinctive:

    After writing any new study:

    line 17
  3. Very specific:

    Use YYYY-MM-DD-study-description.md naming.

    line 18
  4. Distinctive:

    Always resolve a library ID first:

    line 74
  5. Very specific:

    Use exact owner/repo format.

    line 87
  6. Distinctive:

    Use natural language describing the ideal page, not keywords:

    line 93
  7. Very specific:

    Use date filters for current topics: after:2025 or after:2026.

    line 97

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Source Selection

Step 0: Pre-research — Check Existing Notes First

Before choosing a source, check whether this topic was already researched. Do not duplicate prior work.

  1. Glob <USER_HOME>/agent-notes/researcher/studies/*.md and read <USER_HOME>/agent-notes/researcher/index.md if present.
  2. Decide based on what exists:
    • Prior study fully covers the question → reference and reuse it; state the existing answer; do NOT redo the work.
    • Prior study partially covers it → state the gap and extend that existing study.
    • Nothing relevant exists → proceed to Step 1 and do new research.
  3. After writing any new study:
    • Use YYYY-MM-DD-study-description.md naming; check existing filenames first to avoid near-duplicates.
    • List prior studies it builds on under a Related study: line.
    • Append date + filename + short topic to <USER_HOME>/agent-notes/researcher/index.md (create it if missing).

Step 1: Classify the Query

TypeDescriptionOptimal Source
API ReferenceExact API usage, parameters, configContext7 (version-pinned)
Repo ArchitectureHow a project is structured internallyDeepWiki
Current InformationNews, recent releases, trendsExa (with date filter)
Best PracticesCommunity conventions, tutorials, patternsExa
ComparisonSide-by-side evaluation of optionsExa (then verify with Context7)
DebuggingTroubleshooting specific errorsExa (issue threads) → DeepWiki
Concept ExplanationUnderstanding a high-level conceptExa → Context7 for implementation
VerificationConfirming something is correctCross-reference: Context7 + Exa
Unknown TerritoryNo clear idea where to startExa first, then narrow

Quick check if unsure:

  • How to use something? → API Reference
  • How it works internally? → Repo Architecture
  • What people say about it? → Best Practices / Current Info
  • Why something broke? → Debugging
  • What's best? → Comparison
  • What is this? → Concept / Unknown Territory

Step 2: Source Decision Tree

Is this about a SPECIFIC library/framework's API, config, or usage?
  → YES: Does Context7 have a library ID for it?
      → YES → Use Context7 (resolve ID first)
      → NO  → Is it on GitHub with docs?
          → YES → Try DeepWiki
          → NO  → Use Exa
  → NO: Is this about a SPECIFIC GitHub repo's internals?
      → YES → Use DeepWiki
      → NO: Requires CURRENT information?
          → YES → Exa with date filter
          → NO: Community knowledge / best practices?
              → YES → Exa
              → NO: Verification?
                  → YES → Cross-reference Context7 + Exa
                  → NO  → Exa (default)

Step 3: Source Execution

Context7 — API Reference, Version-Specific Docs

Always resolve a library ID first:

context7_resolve(libraryName="Next.js", query="...")
→ Use the resolved /org/project ID for the actual query
→ Pin to version if specified: /vercel/next.js/v14.3.0

Good queries: specific ("How to set up middleware with matcher config in Next.js 14"), not overviews.

Quality signals: 3+ relevant code snippets, correct version, multiple results. If weak → try DeepWiki.

DeepWiki — Repo Architecture, Internals

Use exact owner/repo format. Ask structural questions: "How does the routing system work?", "How are pages and layouts related?"

Quality signals: Clear component relationships, specific file references. If weak → try Exa for blog posts about the repo.

Exa — Current Info, Best Practices, Comparisons

Use natural language describing the ideal page, not keywords:

  • ✅ "blog post comparing React Server Components vs Client Components performance 2025"
  • ❌ "React Server Components vs Client Components"

Use date filters for current topics: after:2025 or after:2026.

Quality signals: Published within 12 months (for fast-moving topics), authoritative source, covers the topic in depth. If weak → fetch the full page with exa_web_fetch_exa on a promising URL.


Step 4: Multi-Source Patterns

PatternFlowWhen
API + PracticeContext7 → ExaLibrary usage + real-world examples
Architecture + APIDeepWiki → Context7Understand system, then API details
Overview → Deep DiveExa → Context7/DeepWikiUnknown territory
DebuggingExa → DeepWiki → Context7Error found → trace source → verify fix
Critical VerificationContext7 + Exa (parallel)Cross-reference critical claims

Step 5: Fallback Chain

1st: Optimal source (from decision tree)
  ↓ (poor results)
2nd: Next best source (from patterns above)
  ↓ (still poor)
3rd: Exa (broadest coverage)
  ↓ (still poor)
4th: exa_web_fetch_exa on specific promising URLs
  ↓ (still poor)
Report: "Unable to find satisfactory results — here's what was tried"

Note which sources you used in your output.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.