Skip to content
AI Resource Hub

AI prompts for code documentation

Copy-ready prompts for code documentation. Replace the [brackets] with your own details for the best results.

Code documentation

Add documentation to code

Generate docstrings and comments in your project's style.

Add documentation to this code using [docstring style, e.g. Google style, JSDoc]. ```[language] [paste code] ``` Document each function's purpose, parameters, return value, and errors raised. Add comments only where the logic isn't obvious. Don't change the code itself.

How to use it

Check that the documentation matches what the code actually does.

Details
Code documentation

Project README

A clear README for a code project.

Write a README.md for my project. Name: [name] What it does: [description] Tech stack: [list] How to install and run: [steps/commands] Configuration: [environment variables] Licence: [licence] Sections: overview, features, requirements, installation, usage with examples, configuration, contributing, licence. Keep it concise and use code blocks for commands.

How to use it

Run every command in the README yourself to make sure it works.

Details

More programming prompts