home / skills / bdambrosio / cognitive_workbench / format-citation
This skill formats academic citations from semantic-scholar notes or collections into BibTeX entries, preserving metadata and generating reusable references.
npx playbooks add skill bdambrosio/cognitive_workbench --skill format-citationReview the files below or copy the command above to add this skill to your agents.
---
name: format-citation
type: python
description: "Format paper citations from semantic-scholar Notes/Collections to BibTeX format"
---
# format-citation
Format academic paper citations from semantic-scholar Notes or Collections to BibTeX citation format.
## Input
- `target`: Collection ID, Note ID, or variable containing paper metadata
- `format`: Citation format (default: "bibtex"). Currently supports: "bibtex"
## Output
Success (`status: "success"`):
- `resource_id`: Collection ID (if input was Collection) or Note ID (if input was Note) containing formatted BibTeX citations
- Each output Note contains:
- `text`: Formatted BibTeX citation string
- `format`: "citation"
- `metadata`: Original metadata preserved (if available)
## Behavior
- Processes all Notes in Collection, continuing even if individual Notes fail
- Extracts paper metadata (title, authors, year, venue, DOI) from Note content
- Formats as BibTeX entry with appropriate entry type (@article, @inproceedings, etc.)
- Creates new Notes with formatted citations, preserving original Notes
- Handles missing fields gracefully (omits unavailable fields)
## Examples
```json
{"type":"semantic-scholar","value":"transformer architecture","out":"$papers"}
{"type":"format-citation","target":"$papers","format":"bibtex","out":"$bibtex"}
```
This skill formats academic paper citations taken from Semantic Scholar Notes or Collections into BibTeX entries. It converts extracted metadata such as title, authors, year, venue, and DOI into appropriate BibTeX entry types while preserving original metadata. It creates new Notes containing the formatted citation and continues processing when individual records fail.
The skill inspects a Collection ID, Note ID, or a variable containing paper metadata and extracts citation fields from each Note. It determines the best BibTeX entry type (for example @article or @inproceedings) and assembles a BibTeX string, omitting fields that are missing. For Collections it processes all Notes, creates new Notes with the formatted citation text and a format tag of "citation", and returns a resource ID that points to the created outputs.
What citation fields are required?
The skill uses whatever metadata is available. It expects at least title and authors for meaningful entries but will omit unavailable fields without failing.
What happens if a Note has incomplete or malformed metadata?
The skill continues processing other Notes, formats what it can from the problematic Note, and creates an output Note with the partial BibTeX entry. Individual failures do not stop batch processing.