Source: https://github.com/aipoch/medical-research-skills
Academic Citation Style Formatter and Converter
When to Use
- Use this skill when the task needs Use when formatting references for journal submission, converting between citation styles (APA, MLA, Vancouver, Chicago), generating bibliographies for manuscripts, or ensuring consistent reference formatting. Automatically formats citations and bibliographies in 1000+ academic styles. Ensures reference accuracy, completeness, and compliance with journal requirements. Supports batch conversion and integration with reference managers.
- Use this skill for academic writing tasks that require explicit assumptions, bounded scope, and a reproducible output format.
- Use this skill when you need a documented fallback path for missing inputs, execution errors, or partial evidence.
Key Features
- Scope-focused workflow aligned to: Use when formatting references for journal submission, converting between citation styles (APA, MLA, Vancouver, Chicago), generating bibliographies for manuscripts, or ensuring consistent reference formatting. Automatically formats citations and bibliographies in 1000+ academic styles. Ensures reference accuracy, completeness, and compliance with journal requirements. Supports batch conversion and integration with reference managers.
- Packaged executable path(s):
scripts/main.py.
- Reference material available in
references/ for task-specific guidance.
- Structured execution path designed to keep outputs consistent and reviewable.
Dependencies
Python: 3.10+. Repository baseline for current packaged skills.
Third-party packages: not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.
Example Usage
cd "20260318/scientific-skills/Academic Writing/citation-formatter"
python -m py_compile scripts/main.py
python scripts/main.py --help
Example run plan:
- Confirm the user input, output path, and any required config values.
- Edit the in-file
CONFIG block or documented parameters if the script uses fixed settings.
- Run
python scripts/main.py with the validated inputs.
- Review the generated output and return the final artifact with any assumptions called out.
Implementation Details
See ## Workflow above for related details.
- Execution model: validate the request, choose the packaged workflow, and produce a bounded deliverable.
- Input controls: confirm the source files, scope limits, output format, and acceptance criteria before running any script.
- Primary implementation surface:
scripts/main.py.
- Reference guidance:
references/ contains supporting rules, prompts, or checklists.
- Parameters to clarify first: input path, output path, scope filters, thresholds, and any domain-specific constraints.
- Output discipline: keep results reproducible, identify assumptions explicitly, and avoid undocumented side effects.
Quick Check
Use this command to verify that the packaged script entry point can be parsed before deeper execution.
python -m py_compile scripts/main.py
Audit-Ready Commands
Use these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --input "Audit validation sample with explicit symptoms, history, assessment, and next-step plan." --format json
Workflow
- Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
- Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
- Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
- Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
- If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.
When to Use This Skill
- formatting references for journal submission
- converting between citation styles (APA, MLA, Vancouver, Chicago)
- generating bibliographies for manuscripts
- ensuring consistent reference formatting
- checking reference completeness and accuracy
- preparing grant proposal reference sections
Quick Start
from scripts.main import CitationFormatter
# Initialize the tool
tool = CitationFormatter()
from scripts.citation_formatter import CitationFormatter
formatter = CitationFormatter()
# Format references for specific journal
formatted_refs = formatter.format_references(
references=raw_references,
target_style="Nature Medicine",
output_format="docx"
)
# Convert between styles
converted = formatter.convert_style(
bibliography=apa_bibliography,
from_style="APA 7th",
to_style="Vancouver",
include_doi=True,
include_pmids=True
)
# Validate reference completeness
validation = formatter.validate_references(
references=reference_list,
required_fields=["authors", "title", "journal", "year", "volume", "pages", "doi"]
)
print(f"Validation results:")
print(f" Complete: {validation.complete_count}")
print(f" Missing fields: {validation.incomplete_count}")
print(f" Invalid DOIs: {len(validation.invalid_dois)}")
# Generate in-text citations
in_text = formatter.generate_in_text_citations(
citations=[
{"author": "Smith", "year": 2023, "type": "paren"},
{"author": "Jones et al.", "year": 2022, "type": "narrative"}
],
style="APA"
)
# Batch process multiple documents
batch_results = formatter.batch_format(
files=["chapter1.docx", "chapter2.docx"],
style="AMA",
output_dir="formatted/"
)
Core Capabilities
1. Format citations in 1000+ academic styles
# Format functionality
result = tool.execute(data)
2. Convert seamlessly between citation formats
# Convert functionality
result = tool.execute(data)
3. Validate reference completeness and accuracy
# Validate functionality
result = tool.execute(data)
4. Batch process large reference collections
# Batch functionality
result = tool.execute(data)
Command Line Usage
python scripts/main.py --input references.bib --from-style APA --to-style Vancouver --output formatted.docx --validate
Best Practices
- Always validate DOIs and URLs before submission
- Check journal-specific requirements beyond standard style
- Maintain original reference database for updates
- Review formatting of special cases (websites, preprints)
Quality Checklist
Before using this skill, ensure you have:
After using this skill, verify:
References
references/guide.md - Comprehensive user guide
references/examples/ - Working code examples
references/api-docs/ - Complete API documentation
Skill ID: 625 | Version: 1.0 | License: MIT
Output Requirements
Every final response should make these items explicit when they are relevant:
- Objective or requested deliverable
- Inputs used and assumptions introduced
- Workflow or decision path
- Core result, recommendation, or artifact
- Constraints, risks, caveats, or validation needs
- Unresolved items and next-step checks
Error Handling
- If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
- If
scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
- Do not fabricate files, citations, data, search results, or execution outcomes.
Input Validation
This skill accepts requests that match the documented purpose of citation-formatter 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-formatter only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
Response Template
Use the following fixed structure for non-trivial requests:
- Objective
- Inputs Received
- Assumptions
- Workflow
- Deliverable
- Risks and Limits
- Next Checks
If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.
1---2name: citation-formatter3description: Use when formatting references for journal submission, converting between citation styles (APA, MLA, Vancouver, Chicago), generating bibliographies for manuscripts, or ensuring consistent reference formatting. Automatically formats citations and bibliographies in 1000+ academic styles. Ensures reference accuracy, completeness, and compliance with journal requirements. Supports batch conversion and integration with reference managers.4license: MIT5---6> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
7# Academic Citation Style Formatter and Converter
8
9## When to Use
10
11- Use this skill when the task needs Use when formatting references for journal submission, converting between citation styles (APA, MLA, Vancouver, Chicago), generating bibliographies for manuscripts, or ensuring consistent reference formatting. Automatically formats citations and bibliographies in 1000+ academic styles. Ensures reference accuracy, completeness, and compliance with journal requirements. Supports batch conversion and integration with reference managers.
12- Use this skill for academic writing tasks that require explicit assumptions, bounded scope, and a reproducible output format.
13- Use this skill when you need a documented fallback path for missing inputs, execution errors, or partial evidence.
14
15## Key Features
16
17- Scope-focused workflow aligned to: Use when formatting references for journal submission, converting between citation styles (APA, MLA, Vancouver, Chicago), generating bibliographies for manuscripts, or ensuring consistent reference formatting. Automatically formats citations and bibliographies in 1000+ academic styles. Ensures reference accuracy, completeness, and compliance with journal requirements. Supports batch conversion and integration with reference managers.
18- Packaged executable path(s): `scripts/main.py`.
19- Reference material available in `references/` for task-specific guidance.
20- Structured execution path designed to keep outputs consistent and reviewable.
21
22## Dependencies
23
24- `Python`: `3.10+`. Repository baseline for current packaged skills.
25- `Third-party packages`: `not explicitly version-pinned in this skill package`. Add pinned versions if this skill needs stricter environment control.
26
27## Example Usage
28
29```bash
30cd "20260318/scientific-skills/Academic Writing/citation-formatter"
31python -m py_compile scripts/main.py
32python scripts/main.py --help
33```
34
35Example run plan:
361. Confirm the user input, output path, and any required config values.
372. Edit the in-file `CONFIG` block or documented parameters if the script uses fixed settings.
383. Run `python scripts/main.py` with the validated inputs.
394. Review the generated output and return the final artifact with any assumptions called out.
40
41## Implementation Details
42
43See `## Workflow` above for related details.
44
45- Execution model: validate the request, choose the packaged workflow, and produce a bounded deliverable.
46- Input controls: confirm the source files, scope limits, output format, and acceptance criteria before running any script.
47- Primary implementation surface: `scripts/main.py`.
48- Reference guidance: `references/` contains supporting rules, prompts, or checklists.
49- Parameters to clarify first: input path, output path, scope filters, thresholds, and any domain-specific constraints.
50- Output discipline: keep results reproducible, identify assumptions explicitly, and avoid undocumented side effects.
51
52## Quick Check
53
54Use this command to verify that the packaged script entry point can be parsed before deeper execution.
55
56```bash
57python -m py_compile scripts/main.py
58```
59
60## Audit-Ready Commands
61
62Use these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.
63
64```bash
65python -m py_compile scripts/main.py
66python scripts/main.py --help
67python scripts/main.py --input "Audit validation sample with explicit symptoms, history, assessment, and next-step plan." --format json
68```
69
70## Workflow
71
721. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
732. Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
743. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
754. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
765. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.
77
78## When to Use This Skill
79
80- formatting references for journal submission
81- converting between citation styles (APA, MLA, Vancouver, Chicago)
82- generating bibliographies for manuscripts
83- ensuring consistent reference formatting
84- checking reference completeness and accuracy
85- preparing grant proposal reference sections
86
87## Quick Start
88
89```python
90from scripts.main import CitationFormatter
91
92# Initialize the tool
93tool = CitationFormatter()
94
95from scripts.citation_formatter import CitationFormatter
96
97formatter = CitationFormatter()
98
99# Format references for specific journal
100formatted_refs = formatter.format_references(
101 references=raw_references,
102 target_style="Nature Medicine",
103 output_format="docx"
104)
105
106# Convert between styles
107converted = formatter.convert_style(
108 bibliography=apa_bibliography,
109 from_style="APA 7th",
110 to_style="Vancouver",
111 include_doi=True,
112 include_pmids=True
113)
114
115# Validate reference completeness
116validation = formatter.validate_references(
117 references=reference_list,
118 required_fields=["authors", "title", "journal", "year", "volume", "pages", "doi"]
119)
120
121print(f"Validation results:")
122print(f" Complete: {validation.complete_count}")
123print(f" Missing fields: {validation.incomplete_count}")
124print(f" Invalid DOIs: {len(validation.invalid_dois)}")
125
126# Generate in-text citations
127in_text = formatter.generate_in_text_citations(
128 citations=[
129 {"author": "Smith", "year": 2023, "type": "paren"},
130 {"author": "Jones et al.", "year": 2022, "type": "narrative"}
131 ],
132 style="APA"
133)
134
135# Batch process multiple documents
136batch_results = formatter.batch_format(
137 files=["chapter1.docx", "chapter2.docx"],
138 style="AMA",
139 output_dir="formatted/"
140)
141```
142
143## Core Capabilities
144
145### 1. Format citations in 1000+ academic styles
146
147```python
148
149# Format functionality
150result = tool.execute(data)
151```
152
153### 2. Convert seamlessly between citation formats
154
155```python
156
157# Convert functionality
158result = tool.execute(data)
159```
160
161### 3. Validate reference completeness and accuracy
162
163```python
164
165# Validate functionality
166result = tool.execute(data)
167```
168
169### 4. Batch process large reference collections
170
171```python
172
173# Batch functionality
174result = tool.execute(data)
175```
176
177## Command Line Usage
178
179```text
180python scripts/main.py --input references.bib --from-style APA --to-style Vancouver --output formatted.docx --validate
181```
182
183## Best Practices
184
185- Always validate DOIs and URLs before submission
186- Check journal-specific requirements beyond standard style
187- Maintain original reference database for updates
188- Review formatting of special cases (websites, preprints)
189
190## Quality Checklist
191
192Before using this skill, ensure you have:
193- [ ] Clear understanding of your objectives
194- [ ] Necessary input data prepared and validated
195- [ ] Output requirements defined
196- [ ] Reviewed relevant documentation
197
198After using this skill, verify:
199- [ ] Results meet your quality standards
200- [ ] Outputs are properly formatted
201- [ ] Any errors or warnings have been addressed
202- [ ] Results are documented appropriately
203
204## References
205
206- `references/guide.md` - Comprehensive user guide
207- `references/examples/` - Working code examples
208- `references/api-docs/` - Complete API documentation
209
210---
211
212**Skill ID**: 625 | **Version**: 1.0 | **License**: MIT
213
214## Output Requirements
215
216Every final response should make these items explicit when they are relevant:
217
218- Objective or requested deliverable
219- Inputs used and assumptions introduced
220- Workflow or decision path
221- Core result, recommendation, or artifact
222- Constraints, risks, caveats, or validation needs
223- Unresolved items and next-step checks
224
225## Error Handling
226
227- If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
228- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
229- If `scripts/main.py` fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
230- Do not fabricate files, citations, data, search results, or execution outcomes.
231
232## Input Validation
233
234This skill accepts requests that match the documented purpose of `citation-formatter` and include enough context to complete the workflow safely.
235
236Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:
237
238> `citation-formatter` only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
239
240## Response Template
241
242Use the following fixed structure for non-trivial requests:
243
2441. Objective
2452. Inputs Received
2463. Assumptions
2474. Workflow
2485. Deliverable
2496. Risks and Limits
2507. Next Checks
251
252If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.