# Document code

Discover ways that you can use GitHub Copilot Chat to document your code.

## Links

* [Filing issues without breaking your flow](/en/copilot/tutorials/copilot-cookbook/document-code/filing-issues-without-breaking-your-flow)

  When something catches your attention mid-task, use Copilot CLI to file a GitHub issue with code context, linked PRs, and labels, then get back to what you were doing.

* [Documenting legacy code](/en/copilot/tutorials/copilot-cookbook/document-code/document-legacy-code)

  Copilot Chat can help with documenting legacy code.

* [Explaining legacy code](/en/copilot/tutorials/copilot-cookbook/document-code/explain-legacy-code)

  Copilot Chat can help with explaining unfamiliar code.

* [Explaining complex algorithms or logic](/en/copilot/tutorials/copilot-cookbook/document-code/explain-complex-logic)

  Copilot Chat can help add clear and concise documentation on complex algorithms or logic.

* [Syncing documentation with code changes](/en/copilot/tutorials/copilot-cookbook/document-code/sync-documentation)

  Copilot Chat can help with keeping code documentation up-to-date.

* [Writing discussions or blog posts](/en/copilot/tutorials/copilot-cookbook/document-code/write-discussions-or-blog-posts)

  Copilot Chat can help you generate ideas, outline, or draft discussions or blog posts.