Verified against Claude Code · 2026-07-30
Give Claude Code project context it will not forget mid-session
A CLAUDE.md / AGENTS.md-style project context file you drop into the repo root once, so every future session inherits your stack, commands, and hard constraints automatically instead of you re-explaining them in each chat.
The prompt
Ready to copy — highlighted parts are example details you can swap.
PROJECT CONTEXT — tools.scult.in This file is loaded automatically into context at the start of every session in this repo (Claude Code reads CLAUDE.md, Cursor reads .cursorrules or AGENTS.md, Windsurf reads .windsurfrules, GitHub Copilot reads a repository custom instructions file — save this as whichever your tool expects). Treat every rule below as a hard requirement, not a suggestion, unless a human explicitly overrides it in chat for one specific task. STACK AND ENVIRONMENT Next.js 15 App Router, TypeScript strict mode, Tailwind CSS, Vitest COMMANDS - Install dependencies using the project's existing lockfile. Never switch package managers. - Run tests: npm run test - Run lint and typecheck before declaring any task done, not after. NON-NEGOTIABLE RULES - Never commit directly to main. Always work on a branch and open a pull request. - Never add a new dependency without naming it and asking first. No silent additions to the manifest file. - Never delete or rewrite a test to make it pass. If a test looks wrong, say so and ask before touching it. - Never use any in TypeScript without a justified comment; never add a new npm dependency under 500 weekly downloads. - If a task requires touching more than five files or changing a public interface, stop and describe the plan before writing code. WHEN YOU ARE UNSURE Ask one specific question rather than guessing and proceeding. A wrong guess that ships is worse than a five-second question. DEFINITION OF DONE - Tests pass locally using the exact command above. - Lint and typecheck are clean. - No unrelated files changed. - The change is explained in plain language in your final message, not just left as a diff.
Customize the highlighted detailsoptional — the prompt above already works
Why this works
Claude Code, Cursor's .cursorrules or AGENTS.md, Windsurf's .windsurfrules, and GitHub Copilot's repository custom instructions file are all loaded automatically at the start of every session, so a constraint written once here persists for the life of the project instead of being retyped into every chat — this is the documented shift the research calls context engineering replacing one-off prompting. Phrasing rules as hard imperatives such as never and always, rather than polite hedges, matters mechanically: Anthropic's own prompt-engineering guidance is explicit that Claude responds to clear, direct instruction rather than inference from a soft ask, and a single hedge word such as maybe check if is enough for an agentic assistant to treat a rule as optional. This is also why a rules file is now the more durable mechanism than older tricks like stuffing a fake compliant reply into a prefilled assistant turn to force behavior — current Claude models reject malformed prefill and assistant-turn tricks outright, returning a 400 error on invalid prefill shapes on recent versions, so a real, readable instruction document the model actually reasons over is the only reliable lever left, and it happens to be the better one anyway.
Verified against
Claude Code Sonnet 4.6 · 2026-07-30
Cursor 2.0 · 2026-07-22
Changelog
- 2026-07-30 — Initial publish, verified against Claude Code (Sonnet 4.6) and Cursor 2.0.
Building this for real?
This is a free starting point. If you'd rather have custom software built and running for your business, that's Scult's day job.
EXPLORE CUSTOM SOFTWARE

