Wonders

The Rabbit Hole · Citation guides

How to Cite Claude Code, GitHub Copilot and Other AI Coding Assistants

How to acknowledge AI-written code in a repository, a programming assignment and a paper: code comments, commit trailers, README notes, software-style references in APA and IEEE, and what ACM and IEEE require.

Sep 21, 2026
How to Cite Claude Code, GitHub Copilot and Other AI Coding Assistants

TL;DR

AI coding assistants are acknowledged in three places. In the code: a comment on the generated function or file, plus the commit trailer that Claude Code adds. In the repository: a README or methods note naming the tool, version, model and dates. In the paper: a disclosure (IEEE requires one in the acknowledgments, ACM in the methods section when AI was used to conduct the research) and, if your style needs a reference, a software-style entry with Anthropic or GitHub as author. There is usually no shareable chat to link to, so your commit history is the record.

Citing a chatbot answer and acknowledging AI-written code are different problems. A chat is a text you quote. A coding assistant works inside your editor or terminal, touches many files over many sessions, and usually leaves no conversation you can link to. The style manuals say little about it, so this page combines what they do say (software references, disclosure rules) with the conventions programmers already use for borrowed code. Where a suggestion is ours and not an authority's, we say so.

What is different about coding assistants

There is often nothing to link to. Claude Code runs in a terminal and GitHub Copilot runs in an editor. Neither normally produces the kind of public share link that APA and MLA now prefer for chats. The durable record of what the tool did is your version history.

The publisher and the model are different things. Claude Code is published by Anthropic and runs Claude models. GitHub Copilot is published by GitHub, and GitHub's documentation lists supported models from several companies. Record both: the tool with its version, and the model you had selected.

The output is a derivative you edit. Generated code is rarely used untouched. Say whether you used it as generated, modified it, or only took the approach.

It is not Microsoft Copilot. The chat assistant from Microsoft is a different product; see how to cite Microsoft Copilot. For Claude in the chat app, see how to cite Claude.

In the code

The long-standing convention for code you did not write yourself is a comment at the point of use saying where it came from. Apply the same to generated code. A pattern to adapt, with your own details in the brackets:

# The [function or routine] below was generated with Claude Code (Anthropic,

# model [model name]) on [YYYY-MM-DD] from the prompt "[your prompt]".

# I [what you changed, for example added the boundary checks and the tests].

For a whole file, put the note in the file header. Keep it factual: tool, publisher, model, date, what you asked for, what you changed.

Commits carry attribution too. Anthropic's settings reference describes a trailer that Claude Code adds to commits and an attribution line it adds to pull request descriptions; both can be changed or hidden through the attribution setting. In coursework and research code, we suggest leaving these on. They answer the question "which commits involved the AI?" precisely.

In the repository

Add a short section to the README, or to the methods documentation of a research compendium. A pattern to adapt:

AI assistance. Parts of this codebase were written with Claude Code [version] (Anthropic; model [model name]) between [dates]: [which modules or files]. All generated code was reviewed and tested by the authors. Commits made with the tool carry a Co-Authored-By trailer.

Only say what is true of your project. If you publish the software with a CITATION.cff file, that file tells others how you would like them to cite your work. The AI tool does not belong in its author list.

In a paper, thesis or report

Disclosure comes first

IEEE's submission policy says AI-generated content in an article, explicitly including code, shall be disclosed in the acknowledgments, identifying the AI system, the sections that use it and the level of use. ACM's authorship policy, updated on 14 May 2026, no longer requires authors to disclose AI help with writing, but when AI was used to conduct the research, and it names coding, implementing models, running simulations and data analysis, the specific uses must be described in detail in the methods section. Neither allows the tool to be listed as an author. For empirical work where code produced the results, describe the use in the methods section as you would any other instrument. A pattern to adapt:

The analysis scripts were drafted with GitHub Copilot (GitHub; model [model name]) in [editor] and then reviewed, corrected and tested by [author]. No manuscript text was generated with AI tools.

A reference, if your style or instructor wants one

Use the style's software format. APA's general template for an AI tool is itself the software template from section 10.10 of the Publication Manual.

APA 7:

Anthropic. ([year]). Claude Code (Version [number]) [Computer software]. https://claude.com/product/claude-code

GitHub. ([year]). GitHub Copilot [Computer software]. https://github.com/features/copilot

In text: (Anthropic, [year]); (GitHub, [year]). APA does not require references for common software merely mentioned, so check whether a reference is wanted at all.

IEEE. The IEEE Reference Guide's basic software format is: J. K. Author. Title of Software. (Date). Repository or Archive. (version or year). Publisher Name. Accessed: Date. [Type of Medium]. Available: site/path/file. Applied here:

[1] Anthropic. Claude Code. ([year]). (ver. [number]). Accessed: [Mon. Day, Year]. [Online]. Available: https://claude.com/product/claude-code

[2] GitHub. GitHub Copilot. ([year]). Accessed: [Mon. Day, Year]. [Online]. Available: https://github.com/features/copilot

MLA 9 treats software as a work with a version and publisher: Claude Code. Version [number], Anthropic, [year], claude.com/product/claude-code. Chicago, as with chatbots, prefers a note or a mention in the text over a bibliography entry; adapting the note form in its Q&A: 1. Code generated by Claude Code, version [number], Anthropic, [Month Day, Year]. The MLA and Chicago lines are our applications of those styles' general patterns; neither authority publishes an example for a coding assistant.

If you asked a chatbot for code

When the code came from a conversation in ChatGPT, Claude or Gemini and you have a share link, you can cite that chat with the formats in the per-tool guides, and still comment the code. APA notes that whether to reference the full chat containing code depends on how central the code is to the work.

Programming assignments

Course rules matter more here than any style guide, and they differ a great deal: some courses ban assistants outright, some allow them with a usage log, some require them. Three habits hold up under most policies:

  1. Read the policy before you start, not before you submit.
  2. Comment generated code at the point of use and keep the commit trailers.
  3. Be able to explain every line you hand in. If you cannot, acknowledging the tool will not help you in a viva or code review.

Citing the tool does not make prohibited use acceptable.

You are still responsible for the code

Disclosure does not transfer responsibility. Generated code can be wrong in ways that pass a quick test. GitHub's documentation advises running automated tests and static analysis first, checking that the code fits your project, and reviewing licensing and matches with public code. In research, a bug in generated analysis code is your erratum.

The same principle applies to the literature side of a project: keep the work traceable. In Wonders, quotes in summaries are checked against the paper text, and where full text is available a page-number citation opens the PDF at the passage.

Sources

All pages were checked on 21 September 2026.

Frequently asked questions

How to cite Claude Code?

Treat it as software. APA 7: Anthropic. (year). Claude Code (Version number) [Computer software]. https://claude.com/product/claude-code. Then say in your acknowledgments or methods what it generated, and mark the generated code with comments. Use the version your own installation reports.

Who is the author of GitHub Copilot: GitHub, Microsoft or a model provider?

GitHub. It is the publisher named on the product. GitHub's documentation lists models from several providers, but you cite the product you used and its publisher.

Do I have to cite autocomplete suggestions?

None of the style guides we checked asks for a reference for single-line completions, which are closer to an editor feature than to a source. A generated function, class, test suite or algorithm is different: acknowledge it. Course policies can be stricter than this, and some require you to disclose any use of an AI assistant.

Should I keep the Co-Authored-By line Claude Code adds to commits?

For academic and research code, we suggest yes. It is a machine-readable record of which commits involved the tool, which is what a marker or reviewer may ask for. It is a Git convention, not a claim of scholarly authorship: COPE and ICMJE say AI tools cannot be listed as authors of a paper, and ACM requires every author to be an identifiable human being.

Can AI-generated code be included in a journal submission?

IEEE and ACM both provide for it. IEEE's policy lists code alongside text, figures and images as AI-generated content that must be disclosed in the acknowledgments. ACM's policy, updated on 14 May 2026, requires AI used to conduct the research, coding included, to be described in detail in the methods section. You remain responsible for correctness and licensing.

More useful guides

All citation guides

Finding these guides useful?

Try these techniques in Wonders — an AI workspace for literature review. 14 days free. Students get 50% off.

Start free →