“I asked Claude for something and got an answer in a different form than I expected.”
“It used to follow my instructions well when I wrote ‘must,’ but lately it seems less flexible.”
The shortcut to better prompts is to grasp the principles before memorizing techniques. On top of that, with every new model generation, Claude’s way of taking instructions shifts a little.
In Part 4, we look at the prompting best practices that Anthropic officially publishes, and at what changed in the latest generation as of September 2026 (Claude Opus 5.5 and Sonnet 5.5, which this series calls the “5.x generation”). In the second half, we cover where to write the instructions you use often so you only write them once, the shared research and fact-checking rules the author uses, and six templates for infrastructure work.
▶ This part is also available as a YouTube video (about 21 min) (it is also embedded at the end of this article).
- Be clear, and add background and reasons
- Examples, XML tags, and long documents
- Directing output and actions
- What changed in the 5.x generation
- Basics for users (Claude 101)
- Where to write instructions
- A shared instruction: research and fact-checking rules
- Use case 1: First-pass incident investigation
- Use case 2: Creating and running a playbook
- Use case 3: Creating a procedure document
- Use case 4: Researching and comparing official information
- Use case 5: Reviewing configs and scripts
- Use case 6: Drafting a report for customers
- Think about it
- Summary
- Watch the video
- The Claude Fundamentals series (6 parts)
Be clear, and add background and reasons
The official prompting best practices recommend thinking of Claude as “a brilliant new hire who doesn’t know your company’s context.”

The principle is: “if a colleague who doesn’t know the background would be confused reading it, Claude will be confused too.“
- Write what the work is for, who will read it, and what constraints apply
- If you want more than the minimum, say so explicitly
- Add a reason to each instruction
Reasons make a big difference. For example, instead of just writing “Don’t use ellipses,” writing “The output will be read aloud by a speech engine, so don’t use ellipses” lets Claude grasp the intent and apply it correctly to similar situations. For infrastructure work, give the reason together with the instruction, as in “This is the production environment, so always show me the diff before making changes.“
Fixing common requests
| Common request | What is missing | Improved example |
|---|---|---|
| “Look at my nginx config.” | Purpose, perspectives, output format | “This is the nginx config that goes to production next week. List anything of concern from the perspectives of security and performance in a table with severity levels. Do not change the file yet.” |
| “Write a procedure document.” | Reader, structure, source material | “From the notes below, write a procedure document for someone doing this task for the first time. Use the order: pre-checks → steps → verification → rollback.” |
| “What is the cause of this error?” | Environment, situation, how to handle unknowns | “nginx on RHEL 9 has been returning 502 since around 10:00. I’m pasting the logs. Give three hypotheses for the cause, quoting the lines that support each. If you don’t know something, say so.” |
Examples, XML tags, and long documents
- Show examples: Provide 3 to 5 relevant and varied examples, wrapped in
<example>tags - Separate parts with XML tags: Delimit instructions, documents, and input with tags. Keep tag names consistent (
<document>,<instructions>, and so on; the names are up to you) - Put long documents (20,000 tokens or more) first: Write the question at the end. According to the official guidance, this improves quality by up to 30%
- Have Claude quote: Ask it to quote the relevant parts of the document before it answers
<document>(Paste the logs and config files from the incident)</document>
<instructions>
From the logs above, quote the lines that you think are the cause of the error,
then give three hypotheses for the cause. This is the production environment,
so offer change proposals as suggestions only.
</instructions>
When documents and instructions are separated by tags, Claude is less likely to mistake a sentence buried in a log for an instruction.
Directing output and actions
- “Do X” rather than “Don’t do Y”: Write what you want, not what you want to avoid
- Match the format: Match the format of your prompt to the format you want in the output (if you want bullet points, write the prompt in bullet points)
- Make it clear whether you want a suggestion or an action: If you write “suggest,” Claude stops at a suggestion. If you want it to make changes, write “make the change”
- Have Claude confirm irreversible operations: Ask it to check with you before deletions, force pushes, and posting to external services
- Don’t let it guess: Tell it not to speculate about files or code it has not opened
- It is fine to say “I don’t know”: Saying this reduces plausible-sounding errors (hallucinations)
“Suggestion or action” matters especially in Claude Code (Part 5), which can change files and run commands.
What changed in the 5.x generation
Opus 5.5 and Sonnet 5.5 take instructions more literally than earlier models. If you keep writing the way you used to, instructions can be too strong or too narrow.
| Aspect | How you wrote it for earlier models | The 5.x generation (Opus 5.5 and Sonnet 5.5) |
|---|---|---|
| Scope of an instruction | Writing it in one place spread it across the whole output | Follows only what is written. State the scope explicitly (for example, “applies to every section”) |
| Strong wording | Emphasized with “CRITICAL” or “you MUST …” | Too effective. Write in ordinary language |
| “Think carefully” | Added to make Claude think | Not needed with Opus 5.5. Removing it does not lower quality and makes responses faster (how much it thinks is set by Effort; Part 3) |
| Narrowing down | Even if you wrote “only the serious ones,” it cast a wide net | It follows the instruction faithfully, so a review may report fewer items |
| Abstract instructions | “Don’t make it sound like AI” | Less effective. List the specific writing patterns you want to avoid |
| Facts that can change | Let it answer from its knowledge | State explicitly: “confirm with a search” |
Instructions you added for earlier models, such as “be thorough” or “when in doubt, use a tool,” should be toned down or removed. If you have a “prompt collection” or standard instructions on hand, it is worth reviewing them once.
Basics for users (Claude 101)
Claude 101, an introductory course on Anthropic’s learning site Claude Academy, lists the following basics for people who use Claude in the apps.
- State the reader, role, constraints, and length: for example, “for beginner infrastructure engineers, one A4 page”
- Show the format with an example: Add table headings and a sample row
- Treat the first output as a draft: Finish it by saying specifically what you want changed
- Start a new conversation when it drifts: In a long conversation, Claude can lose track of the first instruction
- Verify facts yourself and ask for sources: Claude can also produce links that don’t exist
- Try it on 5 to 10 of your own routine tasks: Find out for yourself which tasks it suits
The last point, “try it on your own work,” is also the method the official sources recommend for choosing a model in Part 3. Your own results on your own tasks are more reliable evidence than articles or reputation.
Where to write instructions
Instead of pasting the same instructions every time, choose where to write them according to the scope in which they should apply.
| Where | Scope | Suited for |
|---|---|---|
| “Instructions for Claude” in the Claude app settings | All conversations in the app (including Cowork, once Chat and Cowork are merged) | Shared rules for how to research and answer |
| Project instructions in Projects | Conversations in that project | Per-project background and terms |
~/.claude/CLAUDE.md | All your own Claude Code sessions | Shared rules such as how to research |
The project’s CLAUDE.md | That repository (shared with the team through Git) | Working conventions and frequently used commands |
| Skills | Loaded only for related tasks | Procedures for repeated tasks |

There is no official statement on whether the instructions in the app settings also apply to Claude Code sessions. If you want the same rules to work in Claude Code, write the same text in ~/.claude/CLAUDE.md as well. CLAUDE.md and Skills are covered in more detail in Part 5.
Where to put CLAUDE.md, what to write in it, and how to write rules that get followed are covered in Part 4 of the follow-up series Claude Code in Practice, and tips for prompts when asking Claude Code to do work are covered in Part 2 of the same series.
A shared instruction: research and fact-checking rules
The author writes the following instruction in both the app’s “Instructions for Claude” setting and ~/.claude/CLAUDE.md. These are rules for infrastructure work, where you often look up product specifications and setting values.
# Rules for research and fact-checking
When answering about facts that can change, such as product specifications, setting values,
limits, prices, and versions, do not answer from memory alone. Confirm with web search
or by fetching documentation.
The answers are used for design and for explaining to customers, so it matters that the
basis is clear.
- Priority of sources
1. Official documentation published by the product vendor itself, and standards
documents such as RFCs
(for example, AWS https://docs.aws.amazon.com/ , Microsoft https://learn.microsoft.com/ )
2. The vendor's official blog, release notes, and support articles
3. Everything else (personal blogs, Q&A sites, news articles, and so on)
- Treat what is stated in 1 and 2 as confirmed information, and show what comes from 3
separately as reference information
- If official and unofficial sources disagree, adopt the official one and also say
that there was a disagreement
- If nothing is found in the official sources, do not fill the gap with guesses; write
"not found in the official sources"
- Attach the source URL to the answer, and write the version and date you checked
Why this instruction works
| Part of the instruction | The official principle behind it |
|---|---|
| Don’t answer from memory alone; confirm with a search | The Sonnet 5.5 guide: if a search tool is available, state explicitly “confirm facts that can change with a search” |
| State what the answer is used for (the reason) | If you add a reason to an instruction, Claude grasps the intent and applies it to similar situations (first half) |
| Define “official” by principle, not by example | The 5.x generation follows only what is written. Two example sites alone would not let it judge other vendors |
| Have it write “no record found” when it finds nothing | Telling it “it is fine to say you don’t know” reduces hallucinations |
| Have it write source URLs, versions, and dates | These are the materials for evaluating the result (Discernment, Part 6) |
For this instruction to work, web search must be available. In the apps, check that web search is turned on in the tool settings of the conversation input area (on organization plans, an administrator enables it in the organization’s settings).
Use case 1: First-pass incident investigation
- What to use: Claude Code (your local terminal, or a server you connect to over SSH; Part 2). Sonnet 5.5 (Effort medium). If the cause cannot be narrowed down, move up to Opus 5.5 (Part 3)
- Principles at work: don’t change anything (separate suggestions from actions), quote evidence, don’t let it guess, mark what is not confirmed
The web servers (web01 and web02) have been returning 502 errors since around 10:00.
Please do a first-pass investigation of the cause.
This is the production environment, so make no changes at all and use read-only commands only.
- Check the nginx and application logs, systemctl status, and the state of disk and memory
- Give three hypotheses for the cause in order of likelihood, and quote the supporting log lines for each
- Write "not confirmed" for anything you could not verify
- Offer remediation ideas as suggestions only, and do not execute them
In addition to writing “read-only commands only,” setting Claude Code’s permission rules (Part 5) so that write commands require confirmation gives you double protection.
Use case 2: Creating and running a playbook
- What to use: Claude Code (your local terminal, WSL, or SSH). Sonnet 5.5 (medium to high)
- Principles at work: state the purpose and scope, follow existing conventions, give it a way to verify (Part 5), and leave production to a human decision
Create a playbook that standardizes the chrony configuration for the webservers group in inventory/stg
on our internal NTP servers (ntp1 to ntp3.corp.example.com).
- Match the style of the existing roles/ and put variables in group_vars
- Write it so that it gives the same result no matter how many times it runs (idempotent)
- After creating it, run ansible-lint and --check --diff against stg, and show me the diff
- Do not run it against production (inventory/prod). I will decide after looking at the diff
Exercises that take this playbook through creation with Claude Code, --check --diff, and review of the diff are in Parts 8 and 9 of the follow-up series Claude Code in Practice.
Use case 3: Creating a procedure document
- What to use: Claude Code (to keep the result as md) or Chat. Sonnet 5.5
- Principles at work: put the document first, state the reader, specify the format, and have it flag the parts it filled in
<document>(Paste the work notes and command history)</document>
From the notes above, create a procedure document in md for the RHEL 9 kernel update.
The reader is a junior engineer doing this task for the first time.
- Structure: a numbered list in the order pre-checks → steps → verification → rollback
- For each step, write the command to run and the expected result
- If you added a step that is not in the notes, write it so that it is clear you added it
You ask it to “make clear what was added” because Claude may fill gaps with a generic procedure. If you check only the added parts closely, the review takes less effort.
Use case 4: Researching and comparing official information
- What to use: Claude Code (to keep the result in md). Sonnet 5.5. If you want it to go as far as a recommendation, Opus 5.5. Subagents (Part 5) increase usage, so use them only when needed
- Principles at work: state the purpose (how the result will be used), specify the perspectives, mark sources and what is not confirmed, and specify the output format
Compare Amazon RDS for PostgreSQL and Amazon Aurora PostgreSQL as migration targets for
an internal mid-sized system (500 GB database, mostly reads). The result will be material
for a proposal to my manager.
- Perspectives to compare: availability, backup, scaling, how pricing works, operational effort
- Confirm with the official AWS documentation and attach a source URL to each item
- Write "not confirmed" for points that are not found in the official documentation
- Summarize the result in a table, and end with a recommendation and its reason in three lines
Use case 5: Reviewing configs and scripts
- What to use: Claude Code. Sonnet 5.5, Effort high
- Principles at work: the 5.x generation follows “only the serious ones” faithfully and reports fewer items. Have it list everything and assign severity
Please review this nginx configuration file. It is scheduled to go to production next week.
- List everything of concern from the perspectives of security, availability, and performance (include minor items)
- For each finding, give a severity (high, medium, low) and the relevant line
- Show proposed fixes as a diff. Do not change the file yet
The official Sonnet 5 guide warns that, because the model faithfully follows instructions such as “only the serious ones” or “be conservative,” the rate at which it reports the problems it finds in code review can drop. The narrowing down is done by a person, looking at the severities.
Use case 6: Drafting a report for customers
- What to use: Chat. Sonnet 5.5
- Principles at work: put the document first, state the reader, specify the structure, and don’t let it make assertions
<memo>(Paste the incident timeline notes)</memo>
From the memo above, create a draft incident report for customers.
The reader is a customer contact who is not technical.
- Structure: overview → impact → cause → response → measures to prevent recurrence
- Add a short explanation to technical terms
- For anything that cannot be determined from the memo (for example, whether the cause is confirmed), do not assert it; write [needs confirmation]
Before you paste information that cannot leave your organization, such as customer names or system configurations, check how your plan handles data (Part 6) and your workplace’s rules.
Think about it
- Think of a task you recently asked Claude to do. Which of the purpose, reader, constraints, and reason did you not write?
- If you write “list only the serious ones” when asking for a review, what is likely to happen in the 5.x generation? What does the template for use case 5 write instead?
- Pick one task you often ask for, think about which of the six templates it is closest to, and try making your own template.
Hint: Review the new-hire principle, the table of what changed in the 5.x generation, and the “principles at work” in the six templates.
Summary
- Claude is a brilliant new hire who lacks context. Write the purpose, reader, and constraints, and add the reason
- Use 3 to 5 examples, separate documents and instructions with XML tags, put long documents first and the question last. Make clear whether you want a suggestion or an action
- The 5.x generation follows only what is written. Strong wording is too effective, and “think carefully” is not needed. Narrowing down is followed faithfully, so for reviews, have it list everything and assign severity
- Write the instructions you use often once, in the place that matches their scope: app settings, Projects, CLAUDE.md, or Skills
- For research, a shared instruction that treats official information as confirmed and requires sources and “not confirmed” labels works well
- For instructions for each task, start from a template that includes the purpose, scope, verification, and human judgment
Next time, we cover the official best practices for using Claude Code: explore → plan → implement → verify, CLAUDE.md, context management, and permissions.
Watch the video
This part is also explained in a YouTube video (about 21 min).
All parts of the series are in the Claude Fundamentals playlist on YouTube.
The Claude Fundamentals series (6 parts)
All 6 parts with a reading guide: Claude Fundamentals
- The Big Picture of Claude and Its Plans
- Choosing Between Chat, Cowork, and Code
- Model and Effort
- Prompting Basics and Example Instructions (this article)
- Claude Code Best Practices
- Using Claude Safely
This series is the English edition of 【Claude活用入門】, originally written in Japanese.


コメント