Install
openclaw skills install citation-formatterUse 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.
openclaw skills install citation-formatterfrom 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/"
)
# Format functionality
result = tool.execute(data)
# Convert functionality
result = tool.execute(data)
# Validate functionality
result = tool.execute(data)
# Batch functionality
result = tool.execute(data)
python scripts/main.py --input references.bib --from-style APA --to-style Vancouver --output formatted.docx --validate
Before using this skill, ensure you have:
After using this skill, verify:
references/guide.md - Comprehensive user guidereferences/examples/ - Working code examplesreferences/api-docs/ - Complete API documentationSkill ID: 625 | Version: 1.0 | License: MIT