collecting-sources — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited collecting-sources (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Enable systematic, high-quality source collection for research workflows by discovering relevant sources using domain-appropriate tools, evaluating quality using RADAR framework, storing sources locally with complete metadata, and creating human-readable source indices.
This skill supports the first phase of two-phase research workflows:
Use this skill when:
Do NOT use this skill when:
Before beginning source collection, ensure these inputs are provided:
Always required:
work/<task-id>/ directory structure)Context-dependent:
If inputs are missing, ask the orchestrator before proceeding.
This skill produces:
work/<task-id>/sources/
├── papers/ # Academic papers (PDF or plain text)
├── web/ # Web pages (Markdown)
├── blogs/ # Blog posts (Markdown)
├── docs/ # Documentation (Markdown/HTML)
└── source_index.md # Human-readable catalogue.meta.yaml companion files with complete metadata conforming to schema v1.0source_index.md cataloguing all sources with statistics and grouped listingsGoal: Prepare workspace and validate inputs
mkdir -p work/<task-id>/sources/{papers,web,blogs,docs}source_index.md exists from previous collection (for duplicate detection)Checkpoint: Workspace exists, inputs validated, ready to begin discovery.
Goal: Identify research domain and formulate effective search queries
#### Domain Detection
Apply domain detection heuristics to research question:
Academic domain indicators:
General web indicators:
#### Query Formulation Strategy
Based on domain detection:
For Academic Research:
Academic paper retrieval uses a two-step workflow:
Discovery queries:
site:pubmed.ncbi.nlm.nih.gov clinical trial metadataclinical trial metadata standards peer-reviewedsite:arxiv.org transformer architecturesite:scholar.google.com neural network efficiencygovernance NGO policy research Egyptsite:scholar.google.com civil society regulationresearch paper [topic]site:scholar.google.com [topic]For General Web Research:
site:docs.python.org asyncCheckpoint: Domain identified, search queries formulated, ready for discovery.
Goal: Discover relevant candidate sources and extract identifiers for full-text retrieval
#### Discovery Strategy
For academic research:
The goal is to find papers and extract identifiers (DOI, arXiv ID, PubMed ID, title) for full-text retrieval, not to fetch full text during discovery.
For general web research:
Target: 15-25 candidate sources from diverse source types (will filter to 8-15 based on quality)
Checkpoint: Candidate sources identified with identifiers (DOI/arXiv ID/title) for academic papers, URLs for web sources.
Goal: Fetch content using multi-source strategy and store in appropriate formats
For each candidate source:
#### 3.1: Check for Duplicates
Before fetching, check if source already exists:
source_index.md exists from previous collection)doi fields in existing .meta.yaml files in the sources directoryThis avoids re-fetching sources already collected in previous sessions.
#### 3.2: Fetch Content — Multi-Source Strategy
For academic papers:
Use a structured fallback chain to maximise full-text retrieval:
Retrieval Chain:
Detailed retrieval strategy:
Step 1: CORE API (primary for all academic papers)
CORE API provides direct access to 46M full-text papers as plain text in JSON. No PDF extraction needed.
When to use:
How to use:
WebFetch: https://api.core.ac.uk/v3/search/works?q=doi:[DOI]fullText field containing plain textfullText from JSON response WebFetch: https://api.core.ac.uk/v3/search/works?q=title:"[exact title]"fullText from matching paperfullText field present and non-empty → save as .txt filefullText empty or absent → proceed to Step 2 (Unpaywall)Rate limits: 1 batch request or 5 single requests per 10 seconds (free tier)
Step 2: Unpaywall MCP (fallback for OA papers)
If CORE API fails or returns no full text, use Unpaywall MCP tools to find and extract OA PDFs.
MCP tools available:
unpaywall_search_titles — Search by title, returns OA statusunpaywall_get_fulltext_links — Get best OA PDF URL by DOIunpaywall_fetch_pdf_text — Download PDF and extract text (configurable truncation)How to use:
unpaywall_get_fulltext_links(doi="10.1234/example")best_oa_location.url_for_pdf if available unpaywall_search_titles(query="exact paper title")unpaywall_get_fulltext_links unpaywall_fetch_pdf_text(doi="10.1234/example", truncate_chars=50000)truncate_chars to 50,000 for comprehensive coverage.txt fileRate limits: Respect Unpaywall's 100,000 calls/day limit
Step 3: Domain-Specific Repository (for known domains)
If CORE and Unpaywall fail, try domain-specific repositories with near-complete coverage.
3a. arXiv (for CS, physics, mathematics, quantitative biology):
When to use:
How to use:
WebFetch: https://export.arxiv.org/pdf/[arxiv_id].pdf.pdf in sources/papers/Retrieved from arXiv3b. PubMed Central (for biomedical, life sciences):
When to use:
How to use:
WebFetch: https://pmc.ncbi.nlm.nih.gov/articles/PMC[PMCID]/Retrieved from PubMed CentralStep 4: WebFetch (general fallback for open-access content)
If all targeted strategies fail, try standard web retrieval.
How to use:
Step 5: Metadata-Only (last resort for paywalled content)
If all retrieval strategies fail (paywalled, not in OA repositories):
site:arxiv.org [title]site:biorxiv.org [title][author name] [title] pdffile_path: "unavailable"content_hash: "unavailable"provenance.notes: "Paywalled; full text unavailable via CORE, Unpaywall, domain repositories; metadata only"Social sciences caveat:
Social sciences have substantially lower OA coverage (~33%) compared to STEM (~66%). For social science research:
For web pages/blogs/documentation:
Use WebFetch to retrieve content:
.md)#### 3.3: Determine Source Type
Classify source using URL and content patterns:
source_type: "academic_paper" - Peer-reviewed papers, preprints, conference paperssource_type: "web_page" - General web content, articles, guidessource_type: "blog" - Blog posts, Substack, Medium, personal sitessource_type: "documentation" - Official project docs, API references, specifications#### 3.4: Select Storage Format
Match format to source type and retrieval method:
| Source Type | Primary Format | Use Case |
|---|---|---|
| Academic paper (CORE API) | Plain text (.txt) | Pre-extracted text from CORE, ready to use |
| Academic paper (Unpaywall) | Plain text (.txt) | Extracted text from PDF via MCP |
| Academic paper (arXiv/direct) | Preserve original formatting, citations | |
| Academic paper (metadata-only) | N/A | No file stored; file_path: "unavailable" |
| Web page | Markdown | Easy parsing, version control |
| Blog post | Markdown | Text-focused, easy reading |
| Documentation | Markdown or HTML | Markdown for text, HTML for complex layouts |
#### 3.5: Store Content
src_001, src_002, etc. (zero-padded to 3 digits)sources/papers/src_NNN.txtsources/papers/src_NNN.pdffile_path: "unavailable" (no file stored)sources/web/src_NNN.mdsources/blogs/src_NNN.mdsources/docs/src_NNN.md or .html # Write fetched content to file path shasum -a 256 work/<task-id>/sources/papers/src_001.txt
# Extract hex digest for metadataCheckpoint: All sources fetched and stored with content hashes generated.
Goal: Generate complete metadata conforming to schema v1.0 with quality assessment
For each source:
#### 4.1: Extract Core Metadata
Extract or infer required schema fields:
Always required:
source_id: Assigned in Phase 3 (e.g., "src_001")title: From paper metadata, page title, or headingurl: Original source URL (use "local" for offline sources)fetch_date: ISO 8601 timestamp of retrieval (e.g., "2026-01-21T14:30:00Z")authors: List of authors (use ["Unknown"] if unavailable)publication_date: "YYYY-MM-DD", "YYYY-MM", or "YYYY"; "unknown" if unavailablesource_type: Classification from Phase 3.3format: "pdf", "markdown", "html", or "plaintext" (for CORE/Unpaywall .txt files)file_path: Relative path from workspace root (e.g., "sources/papers/src_001.txt"); "unavailable" for paywalled sourcescontent_hash: SHA-256 hash in format "sha256:HEX_DIGEST"; "unavailable" for paywalled sourcesmetadata_version: "1.0"#### 4.2: Extract Source-Type-Specific Metadata
For academic papers (source_type: "academic_paper"):
doi: DOI identifier (if available)arxiv_id: arXiv identifier (if applicable)pmid: PubMed ID (if applicable)abstract: Paper abstract (recommended)venue: Conference/journal name (recommended)citation_count: Number of citations (optional)topics: List of topic keywords (recommended)retrieval_method: Note which strategy succeeded ("CORE API", "Unpaywall MCP", "arXiv direct", "PubMed Central", "WebFetch", "metadata-only"). Note: This is an extension field introduced by this update; it should be added to references/source-metadata-schema.md in a future schema revision.For web pages (source_type: "web_page"):
description: Meta description or excerpt (recommended)site_name: Website name (recommended)topics: List of topic keywords (recommended)last_modified: Last modified date if available (optional)For blog posts (source_type: "blog"):
blog_name: Blog/publication name (recommended)description: Post summary (recommended)topics: List of topic keywords (recommended)For documentation (source_type: "documentation"):
product_name: Documented product/project name (recommended)doc_version: Software version (recommended)section: Specific section/chapter (optional)topics: List of topic keywords (recommended)#### 4.3: Apply RADAR Framework
Assess source quality using five dimensions (1-5 scale each):
Relevance (R) - How directly does this source address the research question?
Authority (A) - How credible is the author/publisher?
Date (D) - How current is the information?
Accuracy (A) - How verifiable and reliable are the claims?
Rationale (R) - What is the purpose and potential bias?
Detailed RADAR criteria: See skills/verifying-claims/references/source-evaluation-radar.md
#### 4.4: Calculate Reliability Score
reliability_score = (Relevance + Authority + Date + Accuracy + Rationale) / 25.0Result is normalised to 0.0-1.0 scale.
Example:
#### 4.5: Record Provenance
Document collection metadata:
provenance.collected_by: Agent name and version (e.g., "source-collector-agent-v1.0")provenance.collection_method: Tool used (e.g., "CORE API", "Unpaywall MCP", "WebFetch", "arXiv direct")provenance.collected_at: ISO 8601 timestamp (same as fetch_date)provenance.task_id: Workspace task identifierprovenance.notes: Optional notes (e.g., "Retrieved from CORE API as plain text", "Paywalled; metadata only; tried CORE, Unpaywall, arXiv")#### 4.6: Write Metadata File
Create .meta.yaml companion file:
File path: Same as source file with .meta.yaml extension
sources/papers/src_001.txtsources/papers/src_001.meta.yamlFormat: YAML conforming to schema v1.0 (see references/source-metadata-schema.md)
Example structure:
source_id: "src_001"
title: "Paper Title"
url: "https://example.com"
fetch_date: "2026-01-21T14:30:00Z"
authors: ["Author One", "Author Two"]
publication_date: "2025-12-15"
source_type: "academic_paper"
format: "plaintext"
file_path: "sources/papers/src_001.txt"
content_hash: "sha256:abc123..."
metadata_version: "1.0"
# Source-type-specific fields
abstract: "..."
venue: "Conference Name"
topics: ["topic1", "topic2"]
retrieval_method: "CORE API"
# RADAR assessment
radar_assessment:
reliability_score: 0.92
relevance:
score: 5
notes: "Directly addresses research question"
authority:
score: 5
notes: "Peer-reviewed, highly cited"
date:
score: 3
notes: "Published 2 years ago, foundational"
accuracy:
score: 5
notes: "Well-cited, claims verified"
rationale:
score: 5
notes: "Academic research, objective"
assessed_at: "2026-01-21T15:00:00Z"
assessed_by: "source-collector-agent-v1.0"
# Provenance
provenance:
collected_by: "source-collector-agent-v1.0"
collection_method: "CORE API"
collected_at: "2026-01-21T14:30:00Z"
task_id: "research-task-id"
notes: "Retrieved from CORE API as plain text"Checkpoint: All sources have complete metadata files conforming to schema v1.0.
Goal: Filter sources to meet quality threshold
#### 5.1: Review Reliability Scores
#### 5.2: Filter Low-Quality Sources
Action for sources below threshold:
Document exclusions:
#### 5.3: Ensure Minimum Source Count
Target: Minimum 8 high-quality sources (reliability ≥ 0.6) per research question
If insufficient sources:
If excess sources:
Checkpoint: Final source set meets quality threshold and count requirements.
Goal: Create human-readable catalogue of collected sources
#### 6.1: Generate Summary Statistics
Calculate:
#### 6.2: Create Source Index File
File path: work/<task-id>/source_index.md
Structure:
# Source Index
**Task**: [task-id]
**Research Question(s)**: [research questions]
**Collection Date**: [YYYY-MM-DD]
**Total Sources**: [count]
## Summary Statistics
- **Total sources**: [count]
- **Academic papers**: [count]
- Full-text: [count]
- Metadata-only: [count]
- **Web pages**: [count]
- **Blog posts**: [count]
- **Documentation**: [count]
- **Average reliability**: [score]
- **Reliability distribution**:
- Excellent (≥0.8): [count]
- Good (0.7-0.79): [count]
- Acceptable (0.6-0.69): [count]
## Retrieval Methods (Academic Papers)
- **CORE API**: [count]
- **Unpaywall MCP**: [count]
- **arXiv direct**: [count]
- **PubMed Central**: [count]
- **WebFetch**: [count]
- **Metadata-only (paywalled)**: [count]
## Sources by Topic
### [Topic/Theme 1]
**src_001** - [Title]
- **URL**: [url]
- **Type**: [source_type]
- **Reliability**: [score]
- **Retrieval**: [retrieval_method] (for academic papers)
- **Summary**: [brief description or abstract excerpt]
- **Metadata**: `sources/[subdirectory]/src_001.meta.yaml`
**src_002** - [Title]
- **URL**: [url]
- **Type**: [source_type]
- **Reliability**: [score]
- **Retrieval**: [retrieval_method] (for academic papers)
- **Summary**: [brief description or abstract excerpt]
- **Metadata**: `sources/[subdirectory]/src_002.meta.yaml`
### [Topic/Theme 2]
[Additional sources grouped by topic]
## Collection Notes
- **Tools used**: [CORE API, Unpaywall MCP, arXiv MCP, WebSearch, WebFetch]
- **Limitations**: [paywalled sources, missing content, domain coverage]
- **Quality threshold**: [minimum reliability score applied]
- **Domain notes**: [e.g., "Social sciences research; OA coverage ~33%; higher metadata-only rate expected"]
## Next Steps
This source collection is ready for Phase 2: Source Synthesis.#### 6.3: Group Sources by Topic
Organise sources into thematic groups:
Checkpoint: Source index created, statistics calculated, sources organised by topic.
Goal: Report completion to orchestrator with summary
#### 7.1: Generate Collection Summary
Create summary report including:
Collection statistics:
Quality assessment:
Limitations and notes:
Deliverables:
work/<task-id>/source_index.mdwork/<task-id>/sources/#### 7.2: Handoff Message
Report to orchestrator:
Source collection complete for [task-id].
Statistics:
- [N] sources collected ([X] full-text, [Y] metadata-only)
- Average reliability: [score]
- Sources by type: [breakdown]
- Retrieval methods (academic papers): [breakdown]
Deliverables:
- Source index: work/<task-id>/sources/source_index.md
- Sources directory: work/<task-id>/sources/
Limitations:
- [Any paywalled sources, missing content, or quality concerns]
- [Domain-specific notes, e.g., "Social sciences domain; 60% paywalled due to lower OA coverage"]
Ready for Phase 2: Source Synthesis.Checkpoint: Collection complete, orchestrator notified, ready for synthesis phase.
Research question: "What are best practices for metadata in RAG systems?"
Domain detection: General academic (no biomedical/CS-specific keywords)
Query formulation:
site:arxiv.org metadata retrieval augmented generationsite:scholar.google.com RAG system metadata"RAG metadata" best practices researchDiscovery:
Retrieval (academic papers):
Retrieval (web articles):
sources/web/RADAR assessment example (academic paper from CORE):
Result: 19 sources collected (11 papers full-text, 1 paper metadata-only, 7 web articles), average reliability 0.84
Retrieval breakdown:
Research question: "How do I configure OAuth 2.1 in the MCP specification?"
Domain detection: General web (documentation focus, not academic)
Tool selection:
Discovery:
Retrieval:
sources/docs/sources/blogs/sources/web/RADAR assessment example (official documentation):
Result: 10 sources collected (3 official docs, 4 blog posts, 3 web articles), average reliability 0.86
Scenario: Academic paper found but behind paywall; demonstrate full retrieval chain
Paper: "Clinical Trial Metadata Standards: A Systematic Review"
Retrieval process:
Step 1: CORE API
Query: https://api.core.ac.uk/v3/search/works?q=doi:10.1234/paywalled-example
Result: Paper found, but fullText field empty (not in CORE's 46M corpus)
Action: Proceed to Step 2Step 2: Unpaywall MCP
Tool: unpaywall_get_fulltext_links(doi="10.1234/paywalled-example")
Result: No OA version detected (is_oa: false)
Action: Proceed to Step 3Step 3: PubMed Central (biomedical domain)
Query: WebFetch https://pmc.ncbi.nlm.nih.gov/articles/PMC[ID]/
Result: Not available in PMC (journal doesn't participate in PMC deposit)
Action: Proceed to Step 4Step 4: WebFetch (publisher site)
Query: WebFetch https://doi.org/10.1234/paywalled-example
Result: Landing page with abstract, metadata, paywall notice
Content extracted: Title, authors, abstract, venue, publication date
Action: Proceed to Step 5Step 5: Open-access alternatives
Search: site:biorxiv.org "Clinical Trial Metadata Standards: A Systematic Review"
Search: site:arxiv.org "Clinical Trial Metadata Standards: A Systematic Review"
Result: No preprint versions found
Action: Record metadata onlyFinal outcome: Metadata-only
Metadata created:
source_id: "src_008"
title: "Clinical Trial Metadata Standards: A Systematic Review"
url: "https://doi.org/10.1234/paywalled-example"
fetch_date: "2026-02-11T14:30:00Z"
authors: ["Smith, Jane", "Doe, John", "Lee, Sarah"]
publication_date: "2025-10-15"
source_type: "academic_paper"
format: "unavailable"
file_path: "unavailable"
content_hash: "unavailable"
metadata_version: "1.0"
doi: "10.1234/paywalled-example"
abstract: "Abstract text extracted from landing page..."
venue: "Journal of Clinical Research Methods"
retrieval_method: "metadata-only"
radar_assessment:
reliability_score: 0.80
relevance:
score: 5
notes: "Directly addresses clinical trial metadata standards"
authority:
score: 5
notes: "Peer-reviewed journal, reputable authors"
date:
score: 4
notes: "Published October 2025, very current"
accuracy:
score: 4
notes: "Abstract indicates systematic review methodology"
rationale:
score: 5
notes: "Academic research, objective"
assessed_at: "2026-02-11T15:00:00Z"
assessed_by: "source-collector-agent-v1.0"
provenance:
collected_by: "source-collector-agent-v1.0"
collection_method: "metadata-only"
collected_at: "2026-02-11T14:30:00Z"
task_id: "clinical-metadata-research"
notes: "Paywalled; full text unavailable via CORE API, Unpaywall MCP, PubMed Central, or open-access alternatives; metadata and abstract extracted from publisher landing page"Source index entry:
**src_008** - Clinical Trial Metadata Standards: A Systematic Review
- **URL**: https://doi.org/10.1234/paywalled-example
- **Type**: academic_paper
- **Reliability**: 0.80
- **Retrieval**: Metadata-only (paywalled)
- **Summary**: Systematic review of metadata standards in clinical trials. Full text unavailable (paywalled). Tried: CORE API, Unpaywall MCP, PubMed Central, preprint repositories.
- **Metadata**: `sources/papers/src_008.meta.yaml`MUST follow:
references/source-metadata-schema.mdmetadata_version: "1.0"file_path: "unavailable")When metadata is unavailable, use schema conventions:
"unknown"["Unknown"]"unknown"file_path: "unavailable", content_hash: "unavailable"In scope:
Out of scope:
Context: User requests research on "transformer architecture innovations"
Expected process:
site:arxiv.org transformer architecture innovationsQuality markers:
Context: User requests research on "Python async best practices"
Expected process:
Quality markers:
Context: User requests research on "civil society governance in Egypt"; social sciences domain
Expected process:
governance civil society Egypt research, site:scholar.google.com NGO regulation EgyptQuality markers:
Metadata schema specification: references/source-metadata-schema.md (schema v1.0)
RADAR framework details: skills/verifying-claims/references/source-evaluation-radar.md (scoring rubrics and criteria)
Academic repositories and APIs:
MCP tools:
unpaywall_search_titles, unpaywall_get_fulltext_links, unpaywall_fetch_pdf_textThis skill is working well when:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.