Convert reference lists and in-text citations between RIS, BibTeX, plain text, and CSL-JSON, triggered when you need to unify bibliography/citation styles before journal submission or compare before/after formatting differences.
BY aipochUPDATED Oct 27, 2026
INTENDED FOR◈OpenClawInstall in a listed agent.
instructions.md
---
name: bib-formatter
description: Convert reference lists and in-text citations between RIS, BibTeX, plain text, and CSL-JSON, triggered when you need to unify bibliography/citation styles before journal submission or compare before/after formatting differences.
license: MIT
author: AIPOCH
---
> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
## When to Use
- You have a bibliography in **RIS/BibTeX/plain text/CSL-JSON** and must reformat it to a journal style (e.g., **NEJM**, **The Lancet**, **Nature**) before submission.
- You need to switch **in-text citation formatting** (e.g., generating formatted citations for specific cite keys/IDs).
- You are consolidating references from multiple sources and want a **single consistent output style**.
- You want a **before/after comparison** to verify formatting changes and spot missing metadata.
- You need to validate and repair incomplete entries (missing authors, year, journal, pages, DOI/URL) prior to final export.
## Key Features
- Supports input formats: **RIS**, **BibTeX**, **plain text**, **CSL-JSON**.
- Outputs bibliography entries compatible with **CSL styles** (including NEJM/Lancet/Nature or any custom `.csl`).
- Journal-name driven style selection with **automatic CSL retrieval** (exact match preferred; download first, then search fallback).
- Batch conversion via `scripts/format_bibliography.py`.
- In-text citation generation mode for specified cite keys/IDs.
- Produces a **Markdown Before/After table** (minimum 2 examples) for quick review.
- Detects entries that cannot be reliably parsed and requests missing fields.
## Dependencies
- Python **3.10+**
- Citation Style Language (CSL) style files (`.csl`) for target formatting (e.g., `styles/nature.csl`, `styles/the-lancet.csl`, `styles/new-england-journal-of-medicine.csl`)
## Example Usage
### 1) Auto-retrieve a journal style (recommended)
```bash
python scripts/format_bibliography.py \
--input refs.bib \
--input-format bibtex \
--journal "Nature"
```
### 2) Use a local CSL style file for bibliography formatting
```bash
python scripts/format_bibliography.py \
--input refs.bib \
--input-format bibtex \
--style "styles/nature.csl" \
--output formatted.txt
```
### 3) RIS input example
```bash
python scripts/format_bibliography.py \
--input refs.ris \
--input-format ris \
--style "styles/the-lancet.csl"
```
### 4) In-text citations mode (format citations for specific IDs)
```bash
python scripts/format_bibliography.py \
--input refs.json \
--input-format csljson \
--style "styles/new-england-journal-of-medicine.csl" \
--mode citations \
--cite-keys "ITEM-1,ITEM-2"
```
## Implementation Details
- **Workflow**
1. Collect input text/files and identify the input format: `ris | bibtex | plain | csljson`.
2. Choose the target style by either:
- providing `--journal "<Journal Name>"` (auto-retrieval; exact match prioritized; download first, then search), or
- providing `--style "<path/to/style.csl>"` (local CSL file).
3. Run batch conversion using `scripts/format_bibliography.py`.
4. Validate completeness of critical fields and rerun after fixing missing metadata:
- author(s), year, title, journal/container title, volume/issue, pages, DOI/URL.
5. After formatting, append a **Markdown comparison table** with at least **two** Before/After examples.
- **Input parsing and field mapping**
- Refer to `references/input-formats.md` for parsing rules, field mapping, and format-specific details.
- **Output requirements**
- All instructions/prompts shown to the user must be **in Chinese**.
- Clearly state the **target CSL style** and the **source input format**.
- For entries that cannot be reliably parsed, prompt in Chinese and list the missing fields that must be completed.
- Always include a **Markdown Before/After comparison table** (≥ 2 examples) at the end.
- **Quality checklist**
- Output matches the target journal style (NEJM/Lancet/Nature/custom CSL).
- Required metadata is complete: author, year, journal, volume/issue/pages, DOI/URL.
- Sorting, punctuation, and capitalization follow the CSL style rules.
---
name: bib-formatter
description: Convert reference lists and in-text citations between RIS, BibTeX, plain text, and CSL-JSON, triggered when you need to unify bibliography/citation styles before journal submission or compare before/after formatting differences.
license: MIT
author: AIPOCH
---
> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
## When to Use
- You have a bibliography in **RIS/BibTeX/plain text/CSL-JSON** and must reformat it to a journal style (e.g., **NEJM**, **The Lancet**, **Nature**) before submission.
- You need to switch **in-text citation formatting** (e.g., generating formatted citations for specific cite keys/IDs).
- You are consolidating references from multiple sources and want a **single consistent output style**.
- You want a **before/after comparison** to verify formatting changes and spot missing metadata.
- You need to validate and repair incomplete entries (missing authors, year, journal, pages, DOI/URL) prior to final export.
## Key Features
- Supports input formats: **RIS**, **BibTeX**, **plain text**, **CSL-JSON**.
- Outputs bibliography entries compatible with **CSL styles** (including NEJM/Lancet/Nature or any custom `.csl`).
- Journal-name driven style selection with **automatic CSL retrieval** (exact match preferred; download first, then search fallback).
- Batch conversion via `scripts/format_bibliography.py`.
- In-text citation generation mode for specified cite keys/IDs.
- Produces a **Markdown Before/After table** (minimum 2 examples) for quick review.
- Detects entries that cannot be reliably parsed and requests missing fields.
## Dependencies
- Python **3.10+**
- Citation Style Language (CSL) style files (`.csl`) for target formatting (e.g., `styles/nature.csl`, `styles/the-lancet.csl`, `styles/new-england-journal-of-medicine.csl`)
## Example Usage
### 1) Auto-retrieve a journal style (recommended)
```bash
python scripts/format_bibliography.py \
--input refs.bib \
--input-format bibtex \
--journal "Nature"
```
### 2) Use a local CSL style file for bibliography formatting
```bash
python scripts/format_bibliography.py \
--input refs.bib \
--input-format bibtex \
--style "styles/nature.csl" \
--output formatted.txt
```
### 3) RIS input example
```bash
python scripts/format_bibliography.py \
--input refs.ris \
--input-format ris \
--style "styles/the-lancet.csl"
```
### 4) In-text citations mode (format citations for specific IDs)
```bash
python scripts/format_bibliography.py \
--input refs.json \
--input-format csljson \
--style "styles/new-england-journal-of-medicine.csl" \
--mode citations \
--cite-keys "ITEM-1,ITEM-2"
```
## Implementation Details
- **Workflow**
1. Collect input text/files and identify the input format: `ris | bibtex | plain | csljson`.
2. Choose the target style by either:
- providing `--journal "<Journal Name>"` (auto-retrieval; exact match prioritized; download first, then search), or
- providing `--style "<path/to/style.csl>"` (local CSL file).
3. Run batch conversion using `scripts/format_bibliography.py`.
4. Validate completeness of critical fields and rerun after fixing missing metadata:
- author(s), year, title, journal/container title, volume/issue, pages, DOI/URL.
5. After formatting, append a **Markdown comparison table** with at least **two** Before/After examples.
- **Input parsing and field mapping**
- Refer to `references/input-formats.md` for parsing rules, field mapping, and format-specific details.
- **Output requirements**
- All instructions/prompts shown to the user must be **in Chinese**.
- Clearly state the **target CSL style** and the **source input format**.
- For entries that cannot be reliably parsed, prompt in Chinese and list the missing fields that must be completed.
- Always include a **Markdown Before/After comparison table** (≥ 2 examples) at the end.
- **Quality checklist**
- Output matches the target journal style (NEJM/Lancet/Nature/custom CSL).
- Required metadata is complete: author, year, journal, volume/issue/pages, DOI/URL.
- Sorting, punctuation, and capitalization follow the CSL style rules.
COMPATIBILITY & REFERENCES
Platform guidance
Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.
When the user needs to set up multiple academic courses in a learning management system (Canvas/LMS) from structured data sources. This skill automates the entire workflow extracting course schedules from emails/attachments, matching instructors from CSV files, creating courses, enrolling teacher...
Design Canvas LMS assignments using evidence-based learning science principles from the Four Learning Design Pillars. Use when educators want to create pedagogically sound assignments, need help writing assignment descriptions with clear objectives, want rubric suggestions, or are creating quizze...
Generate learning science-backed feedback templates for Canvas assignments. Use when educators need feedback templates for grading, want to create rubric comments, need encouraging feedback language aligned with Pillar 3 principles (targeted, encouraging, immediate), or want to set up SpeedGrader...
Comprehensively reviews curriculum materials for quality, consistency, and effectiveness. Use when the user asks to review content, check quality, audit materials, or ensure curriculum meets standards. Provides detailed feedback and improvement recommendations.