Does the Shortcut Add to CLAUDE.md?
Usually, yes: a Claude Code shortcut can add instructions or other text to a CLAUDE.md file, but the exact result depends on what the shortcut is and how it is configured. Claude Code itself does not automatically copy every conversation or action into that file; the file is a persistent project-instructions document that you or a tool can edit.
What “the shortcut” might mean
The question does not identify a particular shortcut. It might refer to a keyboard shortcut, a shell alias, a command in Claude Code, or an automation created by a user. Those are not interchangeable: a shortcut only changes CLAUDE.md if its implementation explicitly writes to that file, or if it invokes an action that does.
Likewise, “what Claude Code documents” could mean the product’s documented instructions feature, a generated note, or material in a project file. The reliable way to answer for a specific shortcut is to inspect its command or script and check the file afterward. Do not infer that a keypress saves a conversation merely because it is used inside Claude Code.
What Claude Code uses CLAUDE.md for
CLAUDE.md is a Markdown file for guidance Claude Code should use when working in a project. It can contain context such as how to run tests, repository conventions, directory-specific requirements, or preferred coding practices. Claude Code reads applicable instruction files as context; the file does not itself execute commands or guarantee that every instruction will be followed in every situation.
Projects may have a root-level CLAUDE.md and additional instruction files in subdirectories. User-level instructions can also provide guidance across projects. The location and scope matter: adding a note to one project’s file does not automatically make it a global instruction, and a note in a subdirectory may be relevant only when work concerns that area.
How a shortcut can add content
A shortcut can affect the file in several ways. A script might append a fixed line, open the file for editing, call a Claude Code command that proposes an instruction, or run a custom automation. These outcomes differ: appending text is not the same as asking Claude to summarize a conversation, and prompting for an edit is not necessarily the same as saving one.
To verify what a shortcut does, use a low-risk check:
- Identify the exact shortcut: its name, key combination, command, or script.
- Check what it runs. For a shell alias or script, inspect the command and look for a write operation, such as redirecting output into
CLAUDE.mdor using a file-editing tool. - Note the working directory. A relative path such as
CLAUDE.mdrefers to a file relative to where the command runs, which may not be the repository you expect. - Run it on a test project or make a backup first, then inspect the relevant file with a text editor or version-control diff.
If the shortcut uses Claude Code to suggest an instruction, review the proposed text before relying on it. It may be a useful summary, but it can omit context or phrase a one-off preference as a lasting rule.
What belongs in the file
Good project instructions are concise, durable, and actionable. For example, a repository might say, “Run npm test before submitting changes,” or “Keep API handlers in src/routes.” Include information that helps future work, rather than a transcript of ordinary conversation.
- Useful: build, test, and lint commands; architectural boundaries; naming conventions; important project-specific constraints.
- Usually less useful: temporary task details, long explanations repeated in documentation, or information that changes frequently without a clear update process.
- Potentially unsafe: passwords, API keys, private tokens, or other secrets. A project instruction file may be committed or shared, so do not put credentials in it.
Keep instructions specific enough to guide action. “Be careful with tests” is vague; “Run pytest for changes under tests/” is more operational if it accurately describes the project.
How to check and undo a change
After a shortcut runs, inspect the file itself rather than assuming what happened. Check which CLAUDE.md it changed, whether it appended or replaced content, and whether it introduced duplicate or misleading instructions. If the project uses Git, a diff can show the exact change; a status check can also reveal whether a file is newly created or modified.
If the addition is wrong, edit or remove the new text, then review the diff before committing. If the shortcut overwrote the file, restore a known-good copy from version control or a backup rather than trying to reconstruct missing content from memory. For an unfamiliar script, avoid running it against important files until you understand its effects.
Common misunderstandings
A frequent misconception is that Claude Code automatically records every useful answer in CLAUDE.md. It does not follow from the file’s purpose that conversations are saved there. Another is that any shortcut labeled “document” edits the project’s instruction file; that label may describe a different destination or simply open a documentation workflow.
Also, a note in CLAUDE.md is not a substitute for project documentation intended for human readers. Use a README or dedicated docs when the goal is to explain the project to collaborators; use instruction files for guidance that should shape Claude Code’s work. The same information may sometimes belong in both places, but it should be maintained deliberately.
Frequently Asked Questions
Does Claude Code automatically add chats to CLAUDE.md?
No. The file is for persistent instructions, not an automatic transcript. A particular command or custom shortcut may write to it, so verify that tool’s behavior.
How can I tell whether a shortcut edited the file?
Inspect the relevant CLAUDE.md after running it and compare the before-and-after text. If the project uses Git, review the diff and confirm the file path.
Can I add instructions to CLAUDE.md myself?
Yes. You can edit the Markdown file with a text editor. Keep instructions relevant to the project, clear, and free of credentials or other secrets.
Does a project CLAUDE.md apply to every project?
No. A project file applies within its intended scope. User-level instructions may apply more broadly, but a file in one repository should not be assumed to govern another.
What should I do if the shortcut added the wrong text?
Remove or correct the text, then inspect the resulting diff. If the file was overwritten, restore it from version control or a backup and check the shortcut before using it again.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.