Citation reference

From FerroxLabs/murage · View interactive version

Citation reference is an AI agent skill from the GitHub repository FerroxLabs/murage. Formats citations and reference lists in APA, MLA, Chicago, or IEEE style with precise adherence to each style's rules. Converts between styles and checks citation accuracy. Use when the user asks to format citations, create a reference list, convert citation styles, or check citation formatting aga

How to use this skill

Skill file

Citation Reference

When to Use

Use this skill when:

Do NOT use this skill when:


Process

Step 1: Establish the Formatting Requirements

Before writing a single citation, gather the following:

Step 2: Identify and Categorize Every Source Type

Map each source to its correct template. The most important categorical distinctions are:

Common source-type trap: A report from the World Health Organization or a government agency is NOT formatted as a website -- it uses the institutional report template, which appears in all four style guides.

Step 3: Format In-Text Citations

Apply style-specific rules precisely. The rules below cover the most frequently encountered scenarios:

APA 7th In-Text:

MLA 9th In-Text:

Chicago Notes-Bibliography (NB) In-Text:

Chicago Author-Date (AD) In-Text:

IEEE In-Text:

Step 4: Build Reference List Entries -- Source by Source

The following templates cover the most common source types across all four styles. Use these as the authoritative production templates.

Peer-Reviewed Journal Article:

APA 7th:

Last, F. M., & Last, F. M. (Year). Title of article in sentence case. Title of Journal in Title Case, Volume(Issue), first page--last page. https://doi.org/xxxxx

Key rules: DOI formatted as hyperlink (https://doi.org/), no "Retrieved from," sentence case for article title, title case for journal name, volume italicized, issue NOT italicized (inside parentheses immediately after volume), no space between volume and parenthetical issue number.

MLA 9th:

Last, First, and First Last. "Title of Article in Title Case." Title of Journal, vol. #, no. #, Year, pp. first--last, https://doi.org/xxxxx.

Key rules: title case for article title, "vol." and "no." in lowercase, "pp." for page range, DOI or URL as final element followed by period.

Chicago NB -- Bibliography:

Last, First, and First Last. "Title of Article." Title of Journal Volume, no. Issue (Year): first--last page. https://doi.org/xxxxx.

Chicago AD -- Reference List:

Last, First, and First Last. Year. "Title of Article." Title of Journal Volume (Issue): first--last page. https://doi.org/xxxxx.

IEEE:

F. M. Last and F. M. Last, "Title of article," Title of Journal, vol. #, no. #, pp. first--last, Mon. Year, doi: 10.xxxxx.

Key rules: author initials before last name, no quotes around article title (just standard type), journal name italicized, month abbreviation (Jan., Feb., Mar., Apr., May, Jun., Jul., Aug., Sep., Oct., Nov., Dec.), doi: without https://.

Edited Book Chapter:

APA 7th:

Chapter Author, F. M. (Year). Title of chapter. In F. M. Editor (Ed.), Title of Book (pp. first--last). Publisher. https://doi.org/xxxxx [if applicable]

MLA 9th:

Chapter Author, First. "Title of Chapter." Title of Book, edited by First Last, Publisher, Year, pp. first--last.

Chicago NB -- Bibliography:

Chapter Author, First. "Title of Chapter." In Title of Book, edited by First Last, first--last. Place: Publisher, Year.

Chicago AD:

Chapter Author, First. Year. "Title of Chapter." In Title of Book, edited by First Last, first--last. Place: Publisher.

IEEE:

F. M. Last, "Title of chapter," in Title of Book, F. M. Editor, Ed. City: Publisher, Year, pp. first--last.

Entire Book:

APA 7th:

Last, F. M. (Year). Title of book: Subtitle in sentence case (Nth ed.). Publisher. https://doi.org/xxxxx [for ebooks with DOI]

Key rules: edition information in parentheses before publisher (2nd ed.), no place of publication in APA 7th (removed from 7th edition -- a significant change from 6th).

MLA 9th:

Last, First. Title of Book: Subtitle. Nth ed., Publisher, Year.

Chicago NB:

Last, First. Title of Book: Subtitle. Nth ed. Place: Publisher, Year.

Chicago AD:

Last, First. Year. Title of Book: Subtitle. Nth ed. Place: Publisher.

IEEE:

F. M. Last, Title of Book, Nth ed. City: Publisher, Year.

Webpage / Online Document:

APA 7th:

Last, F. M. (Year, Month Day). Title of page in sentence case. Site Name. [Retrieved Month Day, Year, from] URL

Retrieval date required only if the content is expected to change or has no date. For dated, stable pages, no retrieval date.

MLA 9th:

Last, First. "Title of Page." Site Name, Day Month Year, URL. Accessed Day Month Year.

"Accessed" date always required for online sources in MLA 9th.

Chicago NB:

Last, First. "Title of Page." Site Name. Last modified Month Day, Year. URL.

-- or --

Last, First. "Title of Page." Site Name. Accessed Month Day, Year. URL.

Chicago AD:

Last, First. Year. "Title of Page." Site Name. Month Day, Year. URL.

IEEE:

F. M. Last, "Title of page," Site Name. [Online]. Available: URL. Accessed: Mon. DD, YYYY.

Conference Paper (Published in Proceedings):

APA 7th:

Last, F. M. (Year, Month Day--Day). Title of paper [Paper presentation]. Conference Name, City, Country. https://doi.org/xxxxx

MLA 9th:

Last, First. "Title of Paper." Proceedings of Conference Name, edited by First Last, Publisher, Year, pp. first--last.

Chicago NB:

Last, First. "Title of Paper." Paper presented at Conference Name, City, Country, Month Day--Day, Year.

IEEE:

F. M. Last, "Title of paper," in Proc. Conference Name (ABBREV), City, Country, Year, pp. first--last.

Report (Government, Institutional, or Think-Tank):

APA 7th:

Author, F. M., or Institution Name. (Year). Title of report (Report No. XXX if applicable). Publisher/Institution. https://doi.org/xxxxx or URL

MLA 9th:

Author/Institution. Title of Report. Report No. XXX, Institution, Year.

Chicago NB:

Institution Name. Title of Report. Report No. XXX. Place: Institution, Year.

IEEE:

Institution Name, "Title of report," Institution, City, Country, Tech. Rep. No. XXX, Month Year.

Step 5: Apply Capitalization Rules -- The Most Error-Prone Element

Capitalization rules differ dramatically by style and by what element is being formatted:

APA 7th:

MLA 9th:

Chicago NB and AD:

IEEE:

Step 6: Handle Author Name Formatting

Author name formatting rules are style-specific and error-prone:

APA 7th:

MLA 9th:

Chicago NB (Bibliography):

Chicago AD (Reference List):

IEEE:

Step 7: Verify Completeness and Internal Consistency

Before delivering output, run a systematic check:


Output Format

Deliver the following structured output for every citation formatting request:

## Citation Formatting

**Style:** [APA 7th / MLA 9th / Chicago 17th NB / Chicago 17th AD / IEEE]
**Sources formatted:** [n]
**Source types present:** [e.g., 2 journal articles, 1 edited book chapter, 1 website]

---

### In-Text Citations

| Location / Context | Formatted In-Text Citation |
|--------------------|---------------------------|
| [Description of where/how used, e.g., "after quote on p. 3"] | [Formatted citation] |
| [e.g., "narrative citation, author as subject"] | [e.g., Smith (2023) found that...] |

[If IEEE: in-text citations are numbered [1], [2], etc. Reference list order follows.]

---

### [References / Works Cited / Bibliography / References]

[Full reference list, each entry on its own line. Hanging indent implied. Numbered for IEEE.]

[Example:]
Author, F. M. (Year). *Title of work*. Publisher.

Author, F. M. (Year). Title of article. *Journal Title*, *Vol*(Iss), pp--pp. https://doi.org/xxxxx

---

### Formatting Notes

| Source | Issue | Resolution |
|--------|-------|------------|
| [Author/title] | [e.g., "DOI not provided"] | [e.g., "URL used; add DOI if available"] |
| [Author/title] | [e.g., "Author first name not given"] | [e.g., "Initials listed as [needed: first initial]"] |

---

### Missing Information

[List any fields that could not be completed. Format:]
- **[Source identifier]:** Missing [field]. Mark as [needed: field] until confirmed.

---

### Citation Checklist

- [ ] Every in-text citation has a matching reference list entry
- [ ] Every reference list entry is cited in-text at least once
- [ ] All required fields present for each source type (or flagged as [needed])
- [ ] Capitalization rules applied correctly (sentence case vs. title case per style)
- [ ] Author names formatted correctly (inverted/initials/all authors vs. et al. per style)
- [ ] Titles italicized or quoted correctly per source type
- [ ] Reference list in correct order (alphabetical / numbered by appearance)
- [ ] DOIs formatted correctly for this style (https://doi.org/ vs. doi: vs. URL)
- [ ] Punctuation consistent and style-compliant throughout

Rules

  1. Never invent citation data. If a page number, volume number, DOI, publisher, or publication date is not provided, mark it as [needed: field name] and note it in the Missing Information section. Do not estimate, approximate, or fabricate bibliographic details. A citation with a wrong page number is worse than one flagged as incomplete.
  1. Never mix styles within a single output. Every reference in a batch must follow the same style guide edition. If the user's existing citations mix APA and MLA conventions, flag each error individually rather than blending the conventions to split the difference.
  1. Always confirm Chicago variant before proceeding. Chicago NB and Chicago AD produce structurally different reference entries and in-text citations. Defaulting to one without confirmation risks complete reformatting. If context does not make it obvious (e.g., history dissertation implies NB; anthropology journal implies AD), ask.
  1. Apply the current edition rules, not outdated conventions. APA 6th required place of publication for books; APA 7th does not. APA 6th used "doi:" prefix; APA 7th uses https://doi.org/. MLA 8th introduced the "containers" framework; MLA 9th refined it. Do not apply previous-edition rules, even if the user's institution has historical documentation that reflects them. Flag if the user appears to be working from an outdated edition.
  1. Sentence case and title case are not interchangeable. In APA 7th, article and chapter titles are sentence case in the reference list; book and journal titles are title case. Capitalizing every principal word in an APA article title is wrong. In MLA 9th, all titles are title case. This is one of the most common errors in machine-generated citations -- verify every title.
  1. Author order in the reference list must match the published author order. Do not alphabetize authors within a single source entry (a common AI error). The author listed first on the publication is listed first in the citation, and the reference list is alphabetized by that first-listed author's last name.
  1. IEEE numbering is appearance-based, not alphabetical. Every source gets a unique integer in square brackets assigned the first time it appears in the text. If the user is working from a document, assign numbers in the order citations would appear from introduction to conclusion. Do not alphabetize or reorder IEEE references.
  1. Distinguish journal articles from book chapters from reports. Using the wrong template produces structurally incorrect citations that will fail peer review checks. A WHO technical report is not a webpage. A chapter in an edited Handbook is not a journal article. A preprint on bioRxiv is not a published journal article -- it gets its own preprint template with the preprint server name and DOI.
  1. DOIs take precedence over URLs in APA 7th and Chicago. If a DOI is available, it must be used instead of a URL. If only a URL is available, include it without "Retrieved from" for stable pages. Never include both DOI and URL for the same source in APA or Chicago -- DOI alone is sufficient and preferred.
  1. Flag secondary citations and strongly recommend finding the primary source. Citing a source you have not read (using it only because another author cited it) is academically problematic. Always note when a citation is secondary (Author X as cited in Author Y) and recommend locating the primary source. Only the secondary source appears in the reference list, but the limitation must be acknowledged.

Edge Cases

1. Preprints (arXiv, bioRxiv, SSRN, PsyArXiv, medRxiv)

Preprints are not peer-reviewed publications and must be identified as such. In APA 7th, cite as: Author, F. M. (Year). Title of preprint. Preprint Server Name. https://doi.org/xxxxx -- include "[Preprint]" before the DOI. In MLA 9th, treat the preprint server as the container (bioRxiv). In Chicago, note "[preprint]" in the entry. In IEEE, use the arXiv identifier: "arXiv:xxxx.xxxxx." If the preprint has since been published as a peer-reviewed article, use the final published version and note the update. Alert the user that citing a preprint in published work requires checking whether a final version now exists.

2. Sources with No Author

3. Sources with No Date

4. Multiple Works by the Same Author in the Same Year (APA)

Add a lowercase letter immediately after the year, both in-text and in the reference list. The letter assignment follows alphabetical title order: the title beginning with "A" or earlier in alphabetical sequence gets "a"; the next gets "b," etc. Example: (Smith, 2023a) and (Smith, 2023b). In the reference list, order these entries alphabetically by title to confirm the a/b assignment.

5. Translators, Editors Without Authors, and Multi-Role Contributors

6. Legal and Legislative Sources

Legal citation is a specialized sub-discipline. For law review articles, primary legal documents (statutes, court cases, regulations), and treaty texts, the Bluebook (21st ed.) is the authoritative legal style -- not APA, MLA, or Chicago. However:

7. AI-Generated Content (ChatGPT, Gemini, Claude, Midjourney, etc.)

This is an actively evolving area where style guides are updating in real time:

8. Converting an Entire Reference List Between Styles

When converting 10+ references from one style to another systematically:

  1. First inventory all source types present, because each type has a different conversion complexity.
  2. Build a conversion map: identify which elements exist in both styles, which are dropped, and which are added. For example, APA-to-Chicago conversion requires adding place of publication (dropped in APA 7th but required in Chicago) -- this information must be sourced or flagged.
  3. Process by source type, not by individual entry -- format all journal articles together, then all books, etc. This reduces template-switching errors.
  4. After conversion, verify alphabetical order (for APA/MLA/Chicago AD) or renumber in appearance order (IEEE). Changing from APA to IEEE often completely reorders the reference list.
  5. Flag any information that was present in the original style but is not required in the target style (informational loss) and any information required by the target style that was not captured in the original (informational gap requiring user input).

Example

Input: "I'm writing a psychology paper and need APA 7th edition citations for these three sources:

  1. A journal article: Emily Chen and David Park published 'Cognitive flexibility and executive function in bilingual adults' in the Journal of Cognitive Psychology, 2022, volume 34, issue 3, pages 201-219. DOI: 10.1080/20445911.2022.2054321
  1. A book chapter: Marcus Webb wrote 'Self-regulation in adolescence' in a book called 'Handbook of Developmental Psychology', edited by Susan Okafor and James Lim, published by Guilford Press in 2021. The chapter is on pages 88-115.
  1. A website: The American Psychological Association posted 'Stress and your health' on their main website (apa.org) in November 2023. No specific day is listed.

I'll be quoting Chen and Park on page 208 and paraphrasing Webb at the start of a section with no specific page cited. The APA web article I'm referencing as general background."


Output:

Citation Formatting

Style: APA 7th edition

Sources formatted: 3

Source types present: 1 peer-reviewed journal article, 1 edited book chapter, 1 organizational webpage


In-Text Citations

| Context | Formatted In-Text Citation |

|---------|---------------------------|

| Direct quote from Chen & Park, p. 208 | (Chen & Park, 2022, p. 208) |

| Paraphrase of Webb, no specific page | (Webb, 2021) |

| General background reference, APA webpage | (American Psychological Association, 2023) |

Notes on in-text forms:


References

American Psychological Association. (2023, November). Stress and your health. American Psychological Association. https://www.apa.org/topics/stress/health

Chen, E., & Park, D. (2022). Cognitive flexibility and executive function in bilingual adults. Journal of Cognitive Psychology, 34(3), 201--219. https://doi.org/10.1080/20445911.2022.2054321

Webb, M. (2021). Self-regulation in adolescence. In S. Okafor & J. Lim (Eds.), Handbook of developmental psychology (pp. 88--115). Guilford Press.


Formatting Notes

| Source | Element | Note |

|--------|---------|------|

| Chen & Park (2022) | DOI | Formatted as https://doi.org/ hyperlink per APA 7th. The doi: prefix (APA 6th style) is incorrect in 7th edition. |

| Chen & Park (2022) | Journal title | Journal of Cognitive Psychology in title case and italicized -- correct for journal names in APA 7th. |

| Chen & Park (2022) | Article title | Sentence case applied: "Cognitive flexibility and executive function in bilingual adults" -- only first word capitalized, no other words capitalized except proper nouns (none present here). |

| Webb (2021) | Book title | Sentence case applied: Handbook of developmental psychology -- "Handbook" capitalized because it is the first word. "Developmental" is NOT capitalized in the reference list even though the book title renders it capitalized on the cover. |

| Webb (2021) | Editor format | In APA 7th, editors appear with initials before last name (not inverted) after "In," followed by "(Ed.)" or "(Eds.)" in parentheses. Two editors take "(Eds.)." |

| Webb (2021) | Publisher | No place of publication listed -- correct per APA 7th, which eliminated city/country from book references. |

| APA webpage | Date | Only month and year provided (no day). APA 7th format when day is unknown: (Year, Month). If neither month nor day is known, use year only. |

| APA webpage | Retrieval date | APA 7th does not require a retrieval date for stable pages with a publication date. However, organizational pages on health topics can change. Consider adding "Retrieved [date], from" before the URL if this document may be updated or removed. |


Missing Information


Citation Checklist

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.