Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To turn chat history into useful CLAUDE.md rules, identify corrections and preferences you have repeated, keep only durable project guidance, rewrite each as a specific action, then place it in the file whose audience matches the rule. This is a manual distillation method—not an automatic feature that mines conversations for instructions.

What belongs in CLAUDE.md?

Claude Code describes CLAUDE.md as a place for persistent instructions you would otherwise have to re-explain. Anthropic puts it plainly: “Treat CLAUDE.md as the place you write down what you’d otherwise re-explain.” (Anthropic, Claude Code Docs: How Claude remembers your project.)

That makes repeated corrections in your conversations useful clues. If you keep asking for the same naming convention, test command, architectural boundary, or response to a particular workflow, consider whether it is a stable instruction. The conversation is a source to review; the file is guidance you maintain. The documentation distinguishes written instructions from auto memory, which Claude maintains for learnings and patterns such as user corrections. They are related ways of carrying context forward, not the same feature.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to extract rules from your conversations

  1. Gather conversations about recurring work

    Start with project discussions and repeated task types. In the Claude Code CLI, claude -c continues the most recent conversation in the current directory, while claude -r "<session>" resumes a conversation by session ID or name. These commands help return to particular CLI sessions; they do not establish that every Claude conversation can be searched or exported in the same way. Broader access depends on the product and workflow you use. See the Claude Code CLI reference.

  2. Look for repetition and corrections

    Mark preferences you have stated more than once, instructions you had to repeat, and corrections that changed later work. A correction is especially useful when it reveals a general rule rather than a one-time fix.

  3. Keep durable project knowledge

    Good candidates include coding standards, architecture, naming conventions, common commands, and workflows. Leave out one-off task requests and facts Claude can easily read from the current files. The purpose is to preserve guidance that remains useful across tasks, not to archive a transcript.

  4. Rewrite each candidate as an action

    Make the instruction concrete enough to follow and check. Replace “keep the code clean” with a specific convention or procedure. Where the rule depends on a particular location, format, or command, state it explicitly.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Add context or an example only when it clarifies

    A short reason can explain why a preference matters; a representative example can resolve an ambiguity. Anthropic’s prompting guidance recommends clear, direct, specific instructions and relevant, structured examples. Include only the context that helps Claude apply the rule correctly. See Anthropic’s prompting guidance.

  6. Put the rule at the right scope

    Decide whether it applies to one project, your personal workflow, or an organization. Use the matching location rather than putting every preference in a shared project file.

  7. Review and prune as work changes

    Keep instructions short, organized, and consistent with the project as it exists now. Remove rules that no longer apply and update commands or conventions when they change.

Choose project, personal, or organization scope

Claude Code documentation describes three useful scopes. Pick the one that matches who should follow the instruction and whether teammates should receive it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Scope Audience Location Shared with project team?
Project People and Claude working in the project ./CLAUDE.md or ./.claude/CLAUDE.md Yes, when the project file is committed and shared
Personal Your own Claude Code workflow ~/.claude/CLAUDE.md No
Organization Organization-wide policy audience Managed policy locations For the organization’s managed audience

Project instructions are a natural home for team-relevant build and test commands, coding standards, architecture, naming conventions, and common workflows. A preference that only applies to you belongs in your personal instructions instead. The documentation says files in the current directory and its ancestors load at session start; instruction files in subdirectories load on demand.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Write instructions Claude can apply

A CLAUDE.md file provides context; it is not an enforced configuration or a hard security control. Phrase rules as practical directions, not guarantees. For example:

  • Vague: “Be careful with tests.”
  • Actionable: “Before changing a module, run its relevant test command and report any failures.”
  • Vague: “Use our usual naming.”
  • Actionable: “Use snake_case for Python function names; match the existing public API names when editing exported interfaces.”

These examples illustrate the difference in precision; adapt the actual commands and conventions to your project. An instruction should be easy to check against the work, and should not conflict with other guidance in the file.

What not to copy from chat history

  • One-off requests that apply only to a particular task.
  • Long conversation excerpts that bury the instruction in unrelated detail.
  • Information already obvious from current files or likely to change frequently.
  • Personal preferences in a team-shared file, unless the team has adopted them.
  • Instructions that imply the file enforces security or other technical restrictions.

Keep the durable rule and discard the conversational detour. If the same correction keeps appearing, capture the underlying behavior you want rather than documenting each incident.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.