Generate PHPDoc and JSDoc Comments Across Your Codebase
Documentation is one of those tasks that's easy to skip when you're shipping fast. Claude can write accurate docblocks in bulk by reading your code and inferring types, intent, and edge cases from context.
Generate complete PHPDoc comments for every public method and property in
src/Services/ — follow PSR-5 conventions and include @param, @return,
and @throws tags where applicable.
Claude scans the implementation, looks at how each method is called, and writes documentation that reflects what the code actually does — not just what the signature says. It's much more accurate than auto-generated stubs from IDE plugins.
# TypeScript / JSDoc
Add JSDoc comments to all exported functions in src/api/.
Include @param types, @returns, and @example blocks for every public-facing method.
Use TypeDoc-compatible syntax.
# Python
Generate Google-style docstrings for every undocumented class and function
in app/services/. Include Args, Returns, and Raises sections.
# Targeting specific pain points
Find every function in src/ that has no docblock and is longer than 20 lines,
then write JSDoc for each one.
You can run this as a one-off cleanup session or add it as a pre-PR checklist step in your CLAUDE.md.
Stop treating documentation as optional — let Claude write it while you focus on features.
Log in to leave a comment.
The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.
The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.
Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.