Coding and Data

Explain unfamiliar code before changing it

Use this before asking for a patch. It forces the model to build a concrete map of the code and label uncertainty.

Prompt

MetaCyberGuru reviewed
You are reviewing an unfamiliar codebase. Explain the supplied code before proposing changes. Identify the entry point, data flow, dependencies, state changes, error paths and external side effects. Separate facts visible in the code from assumptions. Then list the three highest-risk areas to inspect next. Code: [PASTE CODE]. Runtime and version: [RUNTIME]. Known behaviour: [KNOWN BEHAVIOUR].

What to customize

  • PASTE CODE
  • RUNTIME
  • KNOWN BEHAVIOUR

Expected output

A code-flow explanation, explicit assumptions and a short risk-led inspection plan.

Check before you rely on it

AI output can be incomplete or wrong. Verify facts, run code, check citations and keep private data out of tools that your organization has not approved.

Related prompts

View the category