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:
- Read the policy before you start, not before you submit.
- Comment generated code at the point of use and keep the commit trailers.
- 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.
Sources
All pages were checked on 21 September 2026.
- IEEE Author Center, Submission and peer review policies: AI-generated content
- ACM, Policy on Authorship (updated 14 May 2026)
- COPE, Authorship and AI tools position statement
- ICMJE, Recommendations: artificial intelligence, use by authors
- American Psychological Association, Citing generative AI in APA Style: Part 1, reference formats and Part 2 (9 September 2025), which cite Publication Manual, 7th ed., section 10.10 (software)
- IEEE, IEEE Editorial Style Manual and IEEE Reference Guide (software format)
- The Chicago Manual of Style Online, Q&A: citing content developed or generated by AI
- GitHub Docs, Review AI-generated code, Supported AI models in GitHub Copilot and About CITATION files
- Anthropic, Claude Code settings reference (attribution setting)
