Home › Browse

Explain unfamiliar code: how to do it with AI

Last checked 2026-10-15

BeginnerBot with human review 💻 Coding

Walk through what a function or file does, line by line.

1. Bot automation level

Bot with human review The bot does the work, but facts, numbers or code should be checked.

2. Before you hand it to the bot

3. Copy-paste prompts

Main prompt
Explain what this function does: purpose, inputs/outputs, side effects, edge cases and possible bugs. Cite line numbers.

<paste code>
Beginner-friendly
Explain what this function does: purpose, inputs/outputs, side effects, edge cases and possible bugs. Cite line numbers.

<paste code>

I'm new to this: explain each step in plain words and ask me for anything you need before starting.
Check-your-work
Explain what this function does: purpose, inputs/outputs, side effects, edge cases and possible bugs. Cite line numbers.

<paste code>

When you finish, list any assumptions you made, anything you're unsure about, and what I should double-check before using the result.

Free tiers that can handle this (verified): ChatGPT (incl. Work & Codex), GitHub Copilot, Mistral Le Chat. Others: check plan.

4. Step-by-step

  1. Copy the function plus its imports and any types it uses; one function at a time works best.
  2. Ask for: purpose, inputs/outputs, side effects, edge cases, and anything that looks like a bug.
  3. For a whole repo, open it in an IDE agent (Cursor Agent, GitHub Copilot agent mode, Claude Code) so it can search related files.
  4. Ask it to point to exact line numbers for each claim.
  5. Confirm 1–2 claims by running the code or a quick test.

5. Which bots and plans can do it

ToolWhat's different herePlan limitsSource
Claude (incl. Claude Code)Claude Code can read the whole repo from the CLI or IDE extensions.Claude Code and Research need Pro or higher; computer use is Pro/Max only (research preview).code.claude.com/docs/en/desktop
ChatGPT (incl. Work & Codex)Codex works with local repos in the ChatGPT desktop app.Free tier has limited deep research, Codex and Work; scheduled tasks need Go or higher (per chatgpt.com/pricing).help.openai.com/en/articles/20001275-chatgpt-work-and-codex
CursorCursor's Agent searches your codebase in the editor.Pricing page unverified; cloud agents require a connected source-control repo.cursor.com/docs/agent/overview
GitHub CopilotCopilot Chat works in VS Code, JetBrains and Visual Studio.Free: 2,000 completions + 50 chats; cloud agent listed on paid plans.docs.github.com/en/copilot/concepts/agents/cloud-agent/about-cloud-agent
Mistral Le Chat—Free tier has limited messages, searches and coding sessions; Pro raises limits.mistral.ai/pricing
DeepSeek—Chat app limits not documented officially; API is pay-per-token.api-docs.deepseek.com/quick_start/pricing

Free or paid?

6. Risks and what to double-check

Professions that use this

Software developer

Related tasks

Open in the interactive app