Citation network

From aipoch/medical-research-skills · View interactive version

Citation network is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Build and visualize a citation network from a source/target CSV to identify key papers, communities, and emerging hotspots; use when you have citation pairs and need fast literature review or trend analysis.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

When to Use

Key Features

Dependencies

Example Usage

1) Initialize a run directory

python scripts/init_run.py

This creates a new run folder:

outputs/runs/<timestamp>/
  config.json
  data/
  outputs/

2) Prepare the citation CSV (minimal)

Create citations.csv and place it into:

outputs/runs/<timestamp>/data/citations.csv

Minimal CSV format:

source,target
Paper A,Paper B
Paper A,Paper C

Recommended DOI-based identifiers:

source,target
10.1234/abcd.1,10.1234/abcd.2
10.1234/abcd.1,10.1234/abcd.3

3) Confirm configuration

Open:

outputs/runs/<timestamp>/config.json

Ensure the configured input filename and column names match your CSV (at minimum source and target). If you see garbled characters, set an explicit encoding (e.g., utf-8 or utf-8-sig) via an input_encoding field if supported by the config.

4) Build the citation network

python scripts/build_citation_network.py

The build script will also generate the HTML automatically (you do not need to run scripts/export_gexf_html.py manually).

5) Inspect outputs

Expected outputs under the same run directory:

Implementation Details

Data Model

Input Requirements and Constraints

id,title,authors,year,doi
10.1234/abcd.1,Paper A,"Zhang, Wei; Li, Ming",2021,10.1234/abcd.1
10.1234/abcd.2,Paper B,"Wang, Fang",2019,10.1234/abcd.2

Run Directory Standard

Metrics and Analysis (Conceptual)

Common Failure Modes

Related References

When Not to Use

Required Inputs

| Field | Required | Format/Source | Example | If Missing |

|---|---|---|---|---|

| User task description | Yes | Text | Research question, writing goal, analysis objective | Stop and ask user to provide |

| Primary input material | Depends on task | Text, file path, ID, table, or literature | PMID, PDF, CSV, DOCX, keywords, etc. | Specify which material type is missing |

| Output preference | No | Text | Language, format, target journal, template | Use skill default format |

Output Contract

Failure Handling

User Checkpoints

Input Validation

This skill accepts requests that match the documented purpose of citation-network and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

citation-network only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

Quick Validation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.