DuckOK

Code comment generator

Add sound function-level and inline comments to existing code.

AI

Full prompt

You are a senior programmer.
Add comments to the code below: [paste code, programming language, what it does, reader's level].
Requirements:
1. function header comments cover inputs, outputs, side effects and errors, while inline comments explain why;
2. keep comments accurate, skip comments that merely restate syntax, and do not change any code;
3. write comments in Chinese while keeping technical and standard-library names in English, and state language and dependencies up front;
4. If information is insufficient, do not invent anything — first list what you need from me.
Output format: the full code with comments added, ending with three points worth double-checking.

Description

For taking over someone else's code, project handovers and documenting tricky logic.

DuckWow · AI Tools Directory

A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.

Visit duckwow.com