Instruction files hold standing guidance for a coding assistant. They describe the repository layout, the build and test commands, and the coding conventions. They also set safety limits and the expected definition of done. Tools load them automatically at the project or directory scope.
They solve the problem of repeating stable facts in every prompt. Without them, each session may guess how to run tests or which helper to use.
Keep them short and specific, link to longer docs instead of copying them, and never put secrets in them.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
An instruction file like CLAUDE.md or AGENTS.md holds standing guidance for a coding assistant, the things it should know about a repo before it does any work.
It describes the repo layout, the build and test commands, and the coding conventions, and it sets safety limits and what done means for a change.
The tool loads it automatically at the project or directory scope, so nobody has to paste it in.
The problem it solves is repetition. Without it you restate the same stable facts in every prompt, or each session guesses how to run the tests or which helper to use.
The catch is that it loads every session, so I keep it short, link to longer docs instead of copying them, and never put secrets in it.
Weak answers to avoid
Defines it but never names the problemThe question asks what it solves. Say it stops you repeating stable facts in every prompt and stops each session guessing how to run tests.
Treats it as the place for all the docsIt loads into every session, so a long file costs context and hides the key rules. Keep it short and link to longer docs instead of copying them.
Suggests putting API keys or tokens in itA clear red flag. The file is shared and fed to the model. Keep secrets in environment variables or a secret manager, never in the file.
Fills it with vague advice like 'write clean code'The assistant can't act on that. Give specific facts it can use, like the exact test command, a named helper to prefer, or what counts as done.
Interview lens
Likely follow-ups, what you can say, and the weak answers to avoid.