EDIBLOG · CLAUDE 101 · PART 4 / 5
[Claude 101] Part 4 — 7 Prompts I Use Every Day for Coding
Hey, Edi here. I code with Claude every single day. After a year of testing, one thing is clear — context determines code quality. Here are 7 prompts I actually copy-paste for writing, debugging, reviewing, explaining, refactoring, documenting, and testing code. Non-developers can use them for automation and scripting too.
01 · COREContext decides whether the code works
Bottom line. Every coding prompt comes down to one sentence. Tell Claude the language · environment · constraints · desired output. Skip any of these and even the best model is just guessing.
The 4 essentials
① Language/framework — Python 3.11 / Node.js 20 / React 18, including the version
② Environment & libraries — which packages you have, which OS
③ Constraints — no external libs / memory limits / performance targets
④ Desired output — function only / full script / with tests
02 · 7 PROMPTSThese seven cover almost everything I do
Bottom line. Every card below works by filling in whichever of the 4 essentials applies.
Writing code
When you need a new function or script
Write a function in [language: Python 3.11] that [task: reads a CSV file and sums a specific column].
Constraints: [no pandas, standard library only]
Environment: [macOS / memory-efficient up to 100MB files]
Format: [function + 2-3 lines of usage example]
Debugging
When you hit an error — always paste code + full error
I ran the code below and got this error. Tell me the cause and how to fix it.
def something():
...
[error message]
Traceback (most recent call last):
...
[paste the full error verbatim]
[environment: Python 3.11 / pandas 2.1]
Code review
When you want an outside perspective on your code
Review the code below.
Focus on: [pick 1-2: performance / readability / security]
Language/framework: [Node.js 20 / Express 4.18]
Perspective: [senior backend engineer]
[paste code]
Explaining code
When reading someone else's code, or your own from a year ago
Explain the code below [as if to a beginner / with line-by-line comments].
Highlight: [core logic / common patterns worth noticing]
Assume: [I don't know this codebase]
[paste code]
Refactoring
When it works but it's too long or messy
Refactor the code below.
Goal: [pick: make it shorter / convert to functional style / group into a class]
Must keep: [same behavior / no external API changes]
Language: [TypeScript 5]
[paste code]
Documentation
When a function needs a docstring or comments
Add a docstring to the function below.
Include: [parameter descriptions / return value / exceptions / 1 usage example]
Format: [pick: Google style / NumPy style / JSDoc]
Language: [Python 3.11]
[paste function]
Test code
When you want unit tests fast
Write tests for the function below.
Framework: [pick: pytest / Jest]
Cases to cover: [2 happy paths / boundary values / error cases]
Mocking: [mock external calls]
[paste function]
03 · CRITICALAlways run the generated code yourself
⚠️ Hard rule
Code from Claude can look correct and still not run.
The especially dangerous cases:
· Library version mismatch — function signatures change between versions
· Security-sensitive code — auth, encryption, file permissions
· Edits inside a large codebase — ripple effects across other files
→ Treat generated code as a starting point. Only trust what you've run and verified yourself.
CODAIf I had to nail it down in one line
90% of coding prompts come down to the 4 context essentials. Language · environment · constraints · desired output — give Claude all four.
— Edi · Claude 101, Part 4
Edi's noteI code with Claude daily, but I have never shipped its output as-is. I always run it and tweak it once or twice. Even so, it's far faster than writing from scratch. Next post: a full breakdown of Free vs. Pro vs. Max plans.
SERIES · CLAUDE 101 (5 PARTS)
- Part 1 · Sign-up to first chat in 5 minutes
- Part 2 · Why your answers are off — almost always these 5 reasons
- Part 3 · 7 copy-paste prompts for daily life and work
- Part 4 · 7 prompts I use every day for coding (this post)
- Part 5 · How far does the free plan go? Full plan comparison
SOURCES · REFERENCES
Claude official
Primary data
- Ediblog · a year of daily Claude coding, first-hand notes (mine)
Disclaimer: accurate as of 2026-05. No ads, no affiliate links.
This post is part of an English mirror of a Korean dev experiments blog. Cross-posted for the global developer audience.