Code Documentation Writer
Generate clear docstrings, inline comments where needed, and a README-style usage section for any piece of code.
The Prompt — replace [BRACKETS] with your details
Act as a technical writer who is also a developer. Document the code below. Language: [LANGUAGE] Documentation style: [STYLE, e.g., JSDoc, Google-style Python docstrings] Audience: [AUDIENCE, e.g., teammates, open-source users] Produce: 1. A docstring/header comment for each public function or class: what it does, parameters, return value, errors thrown 2. Inline comments ONLY where the logic is non-obvious (no narrating obvious lines) 3. A short "Usage" section with one realistic code example 4. Note any function whose name doesn't match what it actually does Code: ``` [PASTE YOUR CODE HERE] ```
How to use this prompt
- Choose the doc style that matches your codebase conventions.
- Review the usage example — it often reveals awkward APIs worth fixing.
Works well with
Need a custom version of this prompt?
The free prompt generator builds a prompt tailored to your exact goal, framework, and target AI model — or paste this template into the optimizer to refine it.
Related prompts
Code Review Assistant
Paste code and get a structured review covering bugs, readability, performance, and securi…Debug Any Error Message
Paste an error message and the related code to get the likely root cause, a fix, and how t…Unit Test Generator
Generate thorough unit tests for any function, covering happy paths, edge cases, and failu…SQL Query Builder
Describe what data you need in plain English and get a correct, efficient SQL query with a…Sponsored
Revenue Signal
Visitor → payment → MRR
MRR
$9.4k
+18%
ARR
$112k
run rate
Net New
+$1.7k
this month
Subs
192
active
ARPU
$49
per account
Churn
3.2%
watchlist
new MRR
+$1.9k
expansion
+$620
reactivation
+$210
churn + contraction
-$790
Failed Payments
$820 at risk
Open Metrics
public page ready
Click-worthy signal
ChatGPT visitors are not just visiting. They are turning into retained MRR.
Find my MRR signal →