Literature statistics

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

Literature statistics is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Generate statistics for publication-year and journal distributions from local references or PDFs; use when you need standardized Year/Journal tables and a summary without any network access.

How to use this skill

Skill file

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

When to Use

Key Features

Dependencies

Example Usage

1) Process a local PDF directory

python scripts/process_pdfs.py --input-dir "./pdfs" --output "./literature_stats.md"

2) Process a local reference file (example pattern)

If your repository provides a CLI entry or script for reference files, run it similarly to the PDF script. For example:

python scripts/process_references.py --input "./refs/library.bib" --output "./literature_stats.md"

3) Expected output format (Markdown)

## Summary
- Total processed: 120
- Unknown year: 7
- Unknown journal: 15

## Year Distribution
| Year | Count | Percent |
|------|-------|---------|
| 2023 | 18    | 15.0%   |
| 2022 | 22    | 18.3%   |
| ...  | ...   | ...     |

## Journal Distribution
| Journal | Count | Percent |
|---------|-------|---------|
| Journal of X | 9 | 7.5% |
| ...         | ... | ... |

For additional examples, see: references/examples.md.

Implementation Details

Processing Pipeline

  1. Detect input type: pasted text / file path / PDF directory.
  2. Read content from pasted text or local files.
  3. Split into individual citations using format cues:
  1. Extract year and journal using the parsing rules below.
  2. Normalize journal names using the normalization rules below.
  3. Aggregate counts and compute percentages.
  4. Output:
  1. For PDF directories, use:

```bash

python scripts/process_pdfs.py --input-dir "<pdf_dir>" --output "<output_md>"

```

Parsing Rules

BibTeX
RIS
Plain Text / Mixed Citations
PDF Directory (Script-Based)

If unclear, set to unknown.

Journal Normalization Rules

Failure Handling and Safety Constraints

Sorting and Reporting Requirements

1) count descending

2) then by name ascending (year or journal title)

When Not to Use

Required Inputs

Recommended Workflow

  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

Output Contract

Validation and Safety Rules

Failure Handling

Quick Validation

Run this minimal verification path before full execution when possible:

python scripts/process_pdfs.py --help

Expected output format:

Result file: literature_statistics_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any
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.