Instead of asking LLMs to generate large chunks of code, I use them as codebase janitors. Small, focused tasks. Run often. Compound over time.

Below are copy-pasteable prompts I regularly use.


1. Remove Dead Code

Find unused files, functions, exports, imports, and variables.
Explain why each is safe to remove and note any risk.


2. Improve Naming

Rename variables, functions, and classes to better reflect intent.
Optimize for clarity and readability, not brevity.


3. Reduce Cyclomatic Complexity

Identify overly complex functions and simplify logic.
Prefer early returns, smaller functions, and clearer control flow.


4. Close Coverage Gaps

Scan test coverage output.
Find uncovered lines and write focus...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help