# Scholar Lab Radar

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-taewooopark-scholar-lab-radar-scholar-lab-radar`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [TaewoooPark](https://agentstack.voostack.com/s/taewooopark)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [TaewoooPark](https://github.com/TaewoooPark)
- **Source:** https://github.com/TaewoooPark/scholar-lab-radar/tree/main/skills/scholar-lab-radar

## Install

```sh
agentstack add skill-taewooopark-scholar-lab-radar-scholar-lab-radar
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# scholar-lab-radar

Turns one lab (a PI, or a school/department) into a **temporal knowledge graph** of its
output and a grounded evolution report. Sibling to `scholar-megasearch`: free structured
scholarly APIs (**OpenAlex**-first) + LLM only on the semantic layer. The data layer is
deterministic Python (reproducible); the LLM names research themes/methods and writes the
narrative — always grounded in the graph's counts, never invented.

Default install locations:

- Claude Code: `~/.claude/skills/scholar-lab-radar`, venv not required (scripts are stdlib).
- Codex: `~/.agents/skills/scholar-lab-radar`.

Use the skill directory from the loaded skill path for bundled scripts (`/scripts`).
The full ontology schema is in `references/ontology.md`; the data sources and exact
OpenAlex queries are in `references/sources.md`.

## Modes

- **professor** *(default, cleanest)* — corpus = the confirmed PI's authored works.
- **lab** — PI + inferred members' works (co-author expansion).
- **department** — an institution + topic scoping (broad; noisier).
- **compare** — two labs side by side (e.g. an applicant comparing advisors).
- **applicant** — a lab + the user's interests → alignment + who to contact.

All modes reuse the same pipeline (resolve → collect → graph → tag → infer → analyze → synthesize).

### Mode recipes
- **lab** — run professor mode first, then take the `likely_member` ids from `data/roster.csv`
  and re-collect with the PI **and** members in one corpus, then rebuild:
  `collect.py --author  --author  --author  … -o ./labs/-lab`.
- **compare** — profile two labs into separate dirs, then
  `compare.py ./labs/ ./labs/ -o ./labs/-vs-.md` (productivity, shared vs
  distinctive topics, each lab's focus shift, overlapping collaborators).
- **applicant** — profile the lab, then match the user's stated interests against the lab's
  Themes/Topics (`metrics.json`) and recommend **which member to contact** — the recent
  first-author or `advised_by`/theme owner of the matching thread.
- **department** — collect by institution + topic instead of author
  (`/works?filter=authorships.institutions.id:,topics.id:,from/to_publication_date`);
  broader and noisier, so scope tightly and caveat heavily.

## Workflow

### 1. Resolve the lab — the make-or-break step
Author disambiguation decides whether the report is about the right person, so **confirm
the OpenAlex id with the user** before collecting. Prefer ORCID.
```bash
python3 /scripts/resolve.py institution "" --mailto 
python3 /scripts/resolve.py author "" --institution  --mailto 
python3 /scripts/resolve.py author "" --orcid 0000-... --mailto 
```
Present the candidates (name, ORCID, institution, works/cites, recent titles) and ask the
user to pick the id — **merge several ids** if OpenAlex split the person. Also confirm the
**year range** (default: last 5 years) and **mode**.

### 2. Collect the corpus
```bash
python3 /scripts/collect.py --author  [--author ] \
  --from  --to  -o ./labs/ --mailto 
```
Fetches every work in range via cursor paging, reconstructs abstracts, dedupes by
DOI → OpenAlex id → normalized title, and writes `labs//works.jsonl` + `meta.json`.
Use `--institution ` to scope to works produced while at that institution; `--max N`
to cap a very prolific PI.

### 3. Build the knowledge graph (ontology)
```bash
python3 /scripts/build_graph.py ./labs/
```
Emits `graph/entities.jsonl` + `graph/relations.jsonl` — typed, time-stamped: Paper /
Researcher / Topic / Venue / Institution / Funder nodes, and `authored_by · has_topic ·
published_in · funded_by · cites(internal) · collaborates_with(PI ego)` edges. Member
roster (role, active span, first-author count) is computed here. No LLM.

### 4. Compute metrics + structured report
```bash
python3 /scripts/analyze.py ./labs/
```
Writes `metrics.json`, `data/{topics_by_year.csv, roster.csv}`, `index.md` (dashboard),
and `report.md` (structured draft): papers/citations per year, topic×year matrix,
**focus-shift detection** (early vs late primary-topic share, with counts), roster,
rising members, collaboration growth, top venues, notable papers. Every number is
grounded — the narrative must cite these counts.

### 5. Semantic layer — tag Themes / Methods / Datasets (LLM, fan-out)
Fan out over `works.jsonl` (megasearch-style) and, from each paper's title+abstract,
extract lab-specific **Themes** (finer threads on top of OpenAlex Topics), **Methods**,
and **Datasets**, plus a one-line summary. **Canonicalize across the whole corpus** before
writing — reuse one `slug` per concept so "CNN" and "convolutional neural network" collapse
to the same Method, and cluster near-duplicate themes. Write one record per paper to
`labs//tags.jsonl`:
```json
{"id":"W123","themes":[{"slug":"contrastive-ssl","label":"Contrastive self-supervised learning"}],
 "methods":[{"slug":"transformer","label":"Transformer","aliases":["self-attention"]}],
 "datasets":[{"slug":"imagenet","label":"ImageNet"}],"summary":"one-line takeaway"}
```
Then merge it into the ontology and emit the per-paper cards + JSON-LD, and re-run analyze
so themes fold into the metrics/report:
```bash
python3 /scripts/tag_ingest.py   ./labs/   # +Theme/Method/Dataset, papers/*.md
python3 /scripts/infer.py        ./labs/   # structural advised_by + method diffusion
python3 /scripts/export_jsonld.py ./labs/   # graph/ontology.jsonld
python3 /scripts/analyze.py       ./labs/   # theme×year + theme focus-shift
```
`infer.py` adds the structural inferred edges (`advised_by` from recurring member-first /
PI-last co-authorship + shared institution; `diffused_to` from Method×Theme co-occurrence).
Theme lineage (`evolved_from`) is LLM-judged — append it to `graph/relations.jsonl` with
`confidence: llm` (see `references/ontology.md`).

### 6. Synthesize the report
Rewrite `report.md` into the final narrative grounded in `metrics.json` + the graph:
exec summary, year-by-year flow, **기조 변화** (cite the emerging/declining counts),
Theme lineage + which members carried each thread, method/dataset evolution, member
dynamics (rising first-authors, departures), notable papers, collaboration evolution,
and an honest **Caveats** section (disambiguation confidence, coverage gaps, small-N).
Never assert a trend without the count behind it.

### 7. (optional) Visualize the graph
```bash
python3 /scripts/viz.py ./labs/   # -> labs//graph.html
```
Self-contained interactive `graph.html` (vis-network, opens in any browser): nodes colored
by type, sized by degree, with node-type filters and an edge-label toggle. **Click any node**
for a detail panel (attributes, DOI/links, summary, connections). A **year slider + ▶ play**
grows the graph year by year — drag it (or press play) and nodes/edges appear as their
relations come into being, so you watch the lab assemble over time. External one-off
co-authors are hidden by default (`--include-external` to show); `--max-nodes N` caps the
most-connected nodes to avoid a hairball.

## Outputs
Everything lands under `./labs//` in the working directory:
```
labs//
├── works.jsonl              normalized corpus (one work per line)
├── meta.json               run params + counts
├── graph/{entities,relations}.jsonl   the temporal knowledge graph (ontology)
├── data/{topics_by_year,roster}.csv   spreadsheet-ready matrices
├── papers/-.md  per-paper tagged metadata (semantic layer)
├── index.md                structured dashboard
├── report.md               synthesized lab report
└── graph.html              interactive node-link viewer (open in a browser)
```

## Honesty
Report what was actually collected and the disambiguation choice. `likely_member` /
`collaborator` / `advised_by` are **inferred** — label them so. Do not invent trends:
small per-year samples are noisy and the counts are shown so a reader can judge. See
memory `feedback_honest_writing`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [TaewoooPark](https://github.com/TaewoooPark)
- **Source:** [TaewoooPark/scholar-lab-radar](https://github.com/TaewoooPark/scholar-lab-radar)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-taewooopark-scholar-lab-radar-scholar-lab-radar
- Seller: https://agentstack.voostack.com/s/taewooopark
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
