Claude Code lessons: workflows, costs, mistakes, prompts
Reference lessons to use after the step-by-step tutorial.
Prompt library
Explain this repo in 10 bullets. Don’t change files.Write a failing test for this bug, then the smallest fix. Show the diff before applying.Review the changes on this branch. List issues by severity with file and line.Mistakes and fixes
| Mistake | Fix |
|---|---|
| Blind approvals | Read every command |
| No tests | Run the suite before committing |
| Secrets in files | Use env vars or a secrets manager |
Use-case playbooks
Fix a bug with a test
- Describe expected vs actual.
- Ask for a failing test first.
- Approve the smallest fix and run tests.
Code review
- Open a branch.
- Ask for a review of the diff by severity.
- Fix the top 3.
Onboard to a repo
- Ask for a tour, read-only.
- Ask where to add a small feature.
- Write CLAUDE.md from what you learned.
Troubleshooting
It stopped mid-task.
You hit the 5-hour or weekly limit shared with Claude. Wait for the reset or plan big jobs earlier.
Install fails.
Check Node.js is version 22 or newer and install without sudo, per Anthropic’s docs.
The answer cites a page that doesn't say that.
Treat the claim as unverified. Ask it to quote the exact sentence from that page, or say it isn't there. Then open the page yourself.
It forgot my earlier instructions.
Long sessions push early text out of context. Put standing instructions where Claude Code keeps them (Add a CLAUDE.md file to your repo with how to build, test and style code, so every session starts with the rules.) and start fresh.
It agrees with everything I say.
Ask it to argue the other side and list the strongest evidence against your view, with sources.
Cost control
- Not included in Claude Free.
- Pro: $20/month, or $17/month billed yearly ($200).
- Max: from $100/month. Ultra: $200/month.
- Team and Enterprise plans include it too.
Claude Code shares your plan’s usage limits: a 5-hour window and weekly limits (claude.com/pricing, checked Oct 30, 2026).
Claude Code shares your Claude plan’s limits: a rolling 5-hour window plus weekly limits (claude.com/pricing).
- Test with the free tier (if there is one) on real tasks for a week first.
- Set a calendar reminder 2 days before any renewal.
- Keep one paid tool per job, not three, unless each earns its place.
Prompt library: bad vs good
Bad: help me
Good: Read this repository and explain, in 10 bullets, what it does, how to run it, and where the tests live. Don’t change any files yet.
Why: situation, task, format and limits.
Bad: research this
Good: Find the 5 most relevant official sources from the last 12 months on [topic]. For each: title, date, link, and one sentence it actually says.
Why: asks for dated, quotable, checkable sources.
Bad: make it better
Good: Rewrite this for a busy customer: max 100 words, one ask, no jargon. Then list what you cut.
Why: a reader, a length and an audit of changes.
Bad: should I do X?
Good: List the 3 strongest reasons for and against X for someone in [situation]. Mark which reasons depend on facts I should check.
Why: balanced, and separates facts from judgement.
Privacy and safety
- Don't paste passwords, ID numbers, card numbers or other people's private details.
- Assume the company can read and keep your chats unless its official policy says otherwise.
- For health, money or legal decisions, confirm with a professional or an official source.
- Keep secrets in environment variables or a secrets manager, never in files Claude Code reads into chat.
- Review every command before you approve it, especially anything that deletes, pushes or deploys.
- Use your employer’s approved plan for company code.
Failure modes to watch
- Edits that pass the happy path but break edge cases. Run the full test suite.
- Commands with side effects (deletes, pushes). Read before approving.
- Over-large changes. Ask for the smallest diff.
When to use it vs other bots
| Use Claude Code for | Consider another bot when |
|---|---|
|
See: ChatGPT · Claude · Gemini · Perplexity · Copilot · comparison |
Leveled tutorials
Where these facts come from
- Claude pricing: Claude Code included in Pro ($20, or $17/month yearly at $200), Max ($100), Ultra ($200), Team, Enterprise; not Free; shared 5-hour and weekly limits
- Claude Code docs: npm install -g @anthropic-ai/claude-code, Node 22+, run claude
Checked Oct 30, 2026. Plans change, so confirm on the official page before you pay.