← Prompt Library / Engineering
Add documentation to code the right way: docstrings that state contracts, comments that explain WHY, and deletion of comments that lie or narrate.
Add documentation to this code: {{code}}. Conventions: {{style}} (JSDoc/PHPDoc/docstrings — or infer from the code).
Rules: public functions get contract docstrings — what it does, params with units/constraints, return, what it throws, side effects. Inline comments ONLY where the code can't speak: non-obvious WHY, workaround references, invariants, warnings ('order matters because…'). DELETE comments that narrate the obvious, restate the function name, or have drifted from what the code now does — show me what you deleted and why. Don't touch the code logic itself.
Fields like {{ this }} are placeholders — replace them with your own details, or let Aria ask you for them.
This prompt runs with Aria connected to your email, files, CRM and 40+ other services — and you can schedule it to run automatically.
Start Free WeekReview a diff for correctness, security, and readability issues.
Get a plain-English walkthrough of unfamiliar code.
Generate thorough unit tests for a function.
Diagnose an error systematically: likely causes ranked with reasoning, the cheapest test for each, a...
Build a regular expression from a plain-English requirement — explained token by token, tested again...
Turn a plain-English data question into a working SQL query — with the assumptions stated, a readabl...