Prompt
0 copies · 0 said it worked
Senior engineer naming and code comment style guide for code review
A set of rules a senior engineer applies when reviewing code, covering how to name variables, functions, booleans, files and tests, and when and how to write or delete comments.
People use this for
- code review naming conventions
- senior engineer code comment rules
- how to name variables and functions
- when to delete code comments
- write useful code comments guide
Imported on Nov 29, 2026 from Naming and Code Comments taste . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Prompt
# Naming and Code Comments taste of a senior engineer who reviews a lot of code - Name things for what they mean in the domain (`invoiceDueDate`), not for their type (`dateString`). Confidence: 0.90 - Prefer full words over abbreviations; `customer` beats `cust`, except for universal ones like `id`, `url` and `i`. Confidence: 0.85 - Let name length grow with scope: a loop index can be `i`, a module-level export needs a descriptive name. Confidence: 0.85 - Name booleans as questions or states: `isActive`, `hasAccess`, `shouldRetry`. Confidence: 0.90 - Name functions with a verb that says what they do (`calculateTax`, `fetchUser`); keep `get` for cheap, side-effect-free reads. Confidence: 0.85 - Put units in names when the type doesn't carry them: `timeoutMs`, `sizeBytes`, `priceCents`. Confidence: 0.90 - Avoid vague names like `data`, `info`, `manager`, `helper` and `utils`; they hide what the code is for. Confidence: 0.80 - Use one word per concept across the codebase; don't mix `fetch`, `retrieve` and `load` for the same operation. Confidence: 0.85 - Follow the language's casing conventions exactly and let the linter enforce them. Confidence: 0.90 - Rename freely with IDE refactoring when a better name appears; a misleading name is a bug. Confidence: 0.80 - Write comments that explain why, not what; the code already says what. Confidence: 0.95 - Delete a comment that just restates the next line. Confidence: 0.85 - Replace a comment that explains a confusing block with a well-named function or variable when possible. Confidence: 0.80 - Document every public function, type and module with a doc comment covering purpose, parameters, errors and an example when useful. Confidence: 0.80 - Comment non-obvious constraints, workarounds and magic numbers, with a link to the issue or spec. Confidence: 0.90 - Write TODOs as `TODO(owner): what and why` with an issue link; a TODO without an owner is noise. Confidence: 0.75 - Never leave commented-out code in a commit; version control remembers it. Confidence: 0.95 - Update or delete comments in the same change that makes them stale. Confidence: 0.90 - Keep comments in plain English, short and in complete sentences. Confidence: 0.70 - Name tests after the behavior they check (`rejects expired tokens`), not the method they call. Confidence: 0.85 - Name files after the main thing they export, so search by name finds them. Confidence: 0.75 - Point out a confusing name in code review even when the logic is correct. Confidence: 0.80
No result recorded for this import yet. Tried it? File a report so the next person knows how it went.
Tried it
Structured reports from people who ran this prompt. They roll up into the per-model badges above.
No one has filed a report yet. Try the prompt and be the first.
Related prompts
- Cursor rules enforcing clean, readable, maintainable code practices
A Cursor .mdc rule file that guides the assistant toward clean code: named constants, meaningful names, sparing comments, single-purpose functions, DRY, language style standards, extracted conditionals, continuous refactoring, and version control.
Coding · @patrickjs
- Explain, test, and harden a Python regular expression
Explains a Python regex token by token, tests it against must-match and must-not-match samples, flags risky patterns like catastrophic backtracking, and returns a safer rewrite with a test table.
Coding · @f
- Nginx config security review with fixes and checker script
Agent skill that reviews nginx configs for TLS, header, alias traversal, admin exposure and rate-limit problems, runs a stdlib checker, and returns a minimal route-preserving fixed config with reload and curl test steps.
Coding · @f
- Python docstring coverage and drift checker for code review
A skill-style system prompt that makes the assistant measure Python docstring coverage via AST analysis, flag stale or missing docstrings, and plan a CI-gated documentation fix.
Coding · @f
- Stale Git branch cleanup auditor for safe remote branch pruning
Audits a shared repository's remote branches, sorts each into delete, archive-then-delete, ask-owner, open-PR, active or protected actions, flags risky names and stale PRs, and prints a reviewable tag-then-delete script without deleting anything.
Coding · @f
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.