skills/43-wentorai-research-plugins/skills/literature/fulltext/osf-api/SKILL.md
Manage open science projects and preprints via the OSF REST API
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research osf-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Open Science Framework by the Center for Open Science provides infrastructure for the entire research lifecycle — project management, file storage, preprint hosting, and registrations. The API enables search, project creation, file management, and preprint discovery across OSF Preprints, PsyArXiv, SocArXiv, and 25+ community preprint servers. Free, no auth for read access.
https://api.osf.io/v2
# Search across all OSF content
curl "https://api.osf.io/v2/search/?q=replication+crisis&page[size]=20"
# Search preprints
curl "https://api.osf.io/v2/preprints/?filter[q]=machine+learning&page[size]=20"
# Filter by preprint provider
curl "https://api.osf.io/v2/preprints/?filter[provider]=psyarxiv&filter[q]=cognitive+bias"
# Search registrations (pre-registered studies)
curl "https://api.osf.io/v2/registrations/?filter[q]=randomized+controlled+trial"
# Get public projects
curl "https://api.osf.io/v2/nodes/?filter[public]=true&filter[q]=neuroimaging"
# Get project details
curl "https://api.osf.io/v2/nodes/{node_id}/"
# Get project files
curl "https://api.osf.io/v2/nodes/{node_id}/files/"
# Get project contributors
curl "https://api.osf.io/v2/nodes/{node_id}/contributors/"
| Provider | Filter | Disciplines |
|----------|--------|-------------|
| OSF Preprints | osf | Multidisciplinary |
| PsyArXiv | psyarxiv | Psychology |
| SocArXiv | socarxiv | Social sciences |
| EarthArXiv | eartharxiv | Earth sciences |
| BioHackrXiv | biohackrxiv | Bioinformatics |
| engrXiv | engrxiv | Engineering |
| MedArXiv | medarxiv | Medical sciences |
| NutriXiv | nutrixiv | Nutrition |
| Parameter | Description | Example |
|-----------|-------------|---------|
| filter[q] | Text search | filter[q]=open+data |
| filter[provider] | Preprint server | filter[provider]=psyarxiv |
| filter[subjects] | Subject filter | Subject taxonomy ID |
| filter[date_created] | Date filter | filter[date_created][gte]=2024-01-01 |
| page[size] | Results per page (max 100) | page[size]=50 |
| page | Page number | page=2 |
{
"data": [
{
"id": "abc12",
"type": "preprints",
"attributes": {
"title": "Replication of the Ego Depletion Effect",
"description": "We attempted to replicate...",
"date_created": "2024-06-15T10:00:00Z",
"date_published": "2024-06-16T08:00:00Z",
"doi": "10.31234/osf.io/abc12",
"is_published": true,
"subjects": [["Social and Behavioral Sciences", "Psychology"]],
"tags": ["replication", "ego depletion"]
},
"relationships": {
"contributors": {"links": {"related": {"href": "..."}}},
"primary_file": {"links": {"related": {"href": "..."}}}
}
}
]
}
import requests
BASE_URL = "https://api.osf.io/v2"
def search_preprints(query: str, provider: str = None,
page_size: int = 20) -> list:
"""Search OSF preprints across providers."""
params = {
"filter[q]": query,
"page[size]": page_size,
}
if provider:
params["filter[provider]"] = provider
resp = requests.get(f"{BASE_URL}/preprints/", params=params)
resp.raise_for_status()
data = resp.json()
results = []
for item in data.get("data", []):
attrs = item.get("attributes", {})
results.append({
"id": item.get("id"),
"title": attrs.get("title"),
"description": (attrs.get("description") or "")[:300],
"doi": attrs.get("doi"),
"date": attrs.get("date_published", "")[:10],
"tags": attrs.get("tags", []),
"url": f"https://osf.io/{item.get('id')}/",
})
return results
def search_registrations(query: str,
page_size: int = 20) -> list:
"""Search pre-registered studies on OSF."""
params = {
"filter[q]": query,
"page[size]": page_size,
}
resp = requests.get(f"{BASE_URL}/registrations/", params=params)
resp.raise_for_status()
data = resp.json()
results = []
for item in data.get("data", []):
attrs = item.get("attributes", {})
results.append({
"id": item.get("id"),
"title": attrs.get("title"),
"description": (attrs.get("description") or "")[:300],
"date_registered": attrs.get("date_registered", "")[:10],
"registration_schema": attrs.get("registration_supplement"),
})
return results
def get_project_files(node_id: str) -> list:
"""List files in an OSF project."""
resp = requests.get(f"{BASE_URL}/nodes/{node_id}/files/")
resp.raise_for_status()
data = resp.json()
providers = []
for item in data.get("data", []):
attrs = item.get("attributes", {})
providers.append({
"provider": attrs.get("provider"),
"name": attrs.get("name"),
})
return providers
# Example: search psychology preprints
preprints = search_preprints("cognitive load", provider="psyarxiv")
for p in preprints[:5]:
print(f"[{p['date']}] {p['title']}")
print(f" DOI: {p['doi']}")
# Example: find pre-registered clinical trials
regs = search_registrations("randomized placebo")
for r in regs[:5]:
print(f"[{r['date_registered']}] {r['title']}")
development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.