Skip to content

ProperPath

Menu

Free resources · Notes and skills

Context engineering vs prompt engineering: what changes in Claude Code

Context engineering vs prompt engineering for Claude Code users: what each one covers, what fills Claude's context before you type, and the first thing to move out of your prompts.

Built by ProperPath

What is the difference between context engineering and prompt engineering?

Your prompt is what you type this turn. The context is everything the model reads before it replies, and in a coding agent your prompt is a small part of it. So prompt engineering sits inside context engineering, which also decides everything that travels with your message.

A model keeps no memory between calls. Each reply comes from one block of text sent fresh: instructions, loaded files, the conversation so far, and your newest message. That block fills the context window, measured in tokens (a word or part of one).

If you are learning how to use Claude Code, this idea is why it has CLAUDE.md, skills and hooks.

Does writing a good prompt still matter?

Yes, and plain detail helps most. Say where to look, what goes wrong, and how you will know it is fixed. Our own wording, untested:

In our view, skip persona openers such as "You are a senior engineer": they add no facts about your project. Skip capitals too; heavy emphasis tends to make today's models apply a rule too widely.

What is in Claude Code's context before you type?

When a session starts, Claude Code loads:

Your first prompt lands on top of all that, and the pile keeps growing. Every file Claude reads in your session, every search result, every command's output, such as a test run, and every reply Claude writes stays in the context until you clear the session or it is compacted.

To see the real pile, type /context in a session. It sorts what is loaded into categories, names the CLAUDE.md and memory files, and suggests what to trim.

Why does a long session get worse?

As the window fills, a model gets worse at using what is in it: across the experiments of an 18-model test, performance fell as input grew. A long session also keeps leftovers, such as a corrected wrong guess or old logs, in front of the model.

Hitting the ceiling is unusual now. Most current models hold a million tokens, and near the limit Claude Code summarizes the older conversation by itself (compaction). You can also run it early with instructions on what to keep, such as /compact focus on the auth bug fix. Clutter hurts long before that, and the fix is cheap. Start fresh with /clear whenever the next task has nothing to do with the last. After two failed corrections, clear and write one better prompt.

Where should an instruction that lasts go?

Anything you retype every session belongs in a file, and the three kinds differ in who decides when they load:

How do you turn a pasted checklist into a skill?

A skill is a folder under .claude/skills/ holding a file named SKILL.md: a short header with a description, then the instructions. Below, a pull-request checklist becomes a skill in a throwaway folder. Paste it into a Mac or Linux terminal; it needs no sign-in and no Claude Code. The checklist is our own wording, untested with Claude.

mkdir -p ~/skill-practice/.claude/skills/pr-checklist
cd ~/skill-practice
cat > .claude/skills/pr-checklist/SKILL.md <<'EOF'
---
description: Checklist to run before opening a pull request.
---
Before opening a pull request:
1. Run the full test suite and report the result.
2. Remove debug prints and commented-out code.
3. Update the README if a command or setting changed.
4. Write a summary: what changed, why, and how to test it.
EOF
head -n 3 .claude/skills/pr-checklist/SKILL.md
find . -name SKILL.md

While you paste, zsh may show heredoc> at the start of lines; that is normal. The last two commands print the header and the path. The folder name, pr-checklist, becomes the skill's name. Once it is a skill, the list no longer rides in every prompt; only its description waits in the context.

Now do the same with a checklist from your own work, with private details such as names, hosts and keys changed: in your project's .claude/skills/ folder, or in ~/.claude/skills/ to use it in every project.

Where is the full answer?

Check your skill folder