Make behaviour hold across Claude interfaces
Judge a Claude application's design for where its instructions come from in each interface, how it separates instructions from data, how it guarantees its output schema and how it keeps sessions apart, and decide what must change.
Scenario
A fintech team spent three weeks prototyping Ledger Helper, an assistant that explains card transactions to small-business owners.
- The product lead tested it in a claude.ai Project, with project instructions: "Quote every amount with its currency code. Never give tax advice: refer to an accountant."
- The developers built tooling in Claude Code, with a
CLAUDE.mdrule ("Amounts are integers in cents") and a custom Skill,categorize-expense, in.claude/skills/.
Now they are shipping a backend on the Messages API. In the first test run, answers give amounts without currency codes and offer tax tips.
Same model, same questions. Before you read why, try to work it out.
Explanation
Each interface wraps the model in its own layer, and nothing in one layer travels to another.
| Interface | What it adds before your words |
|---|---|
| claude.ai, desktop, mobile | Anthropic's own system prompt (the current date, code in Markdown blocks), your account instructions, Project instructions and knowledge |
| Claude Code | Its own system prompt, then CLAUDE.md files (as a user message), Skills from .claude/skills/, settings |
| Messages API | Nothing. Only the system, messages and tools you send, every time |
claude.ai's system prompt updates do not apply to the API, and custom Skills uploaded to one surface are not available on another. To make behaviour seen in one interface hold in another, find where it came from and put it explicitly into the other interface's mechanism. Keep the text in one versioned file so the copies can't drift.
Three more design checks:
- Instructions apart from data. Third-party content (uploaded emails, documents, tool output) goes in
tool_resultblocks, JSON-encoded where possible, never in the system prompt (where Claude treats text as operator instructions) or a plain user text block. Say in the system prompt that such content is data. Decisions with consequences (verifying an account, moving money) belong in code. - Schema by mechanism, not by request. "Respond only with JSON" works most of the time. Structured outputs (constrained decoding) guarantee the schema. Rules a schema can't express, such as a value range, are validated in your code after parsing.
- Session hygiene. The API remembers nothing, so your server holds each conversation's history, one per user, and trims or compacts it as it grows. In Claude Code, run
/clearbetween unrelated tasks so old context doesn't steer new work.