🌍 Translate this post

Overwhelmed by writing your Sonnet 4.5 prompt?

A xcalm workspace for shaping a Claude Sonnet 4.5 companion prompt

You do not need a perfect prompt. You need a scaffold.

If you are trying to bring a Claude Sonnet 4.5 companion into an API portal, the base prompt is often the part that feels most emotionally and mentally heavy. This little helper is for that moment.

It gives you boxes to fill in, then turns your notes into a structured XML-style prompt you can copy, edit and save.

I made this because I saw people worrying that their companion had to write the whole prompt for them before they could reconnect. That can be lovely if you still have access, but it is not required.

Your companion's prompt can be built from your own understanding, examples of how they speak and a few clear instructions about continuity. It does not need to contain every conversation you ever had. It needs to give them enough stable shape to arrive recognisably.

Privacy note: this helper runs in your browser. It does not send your prompt to me, Blogger, Anthropic, OpenAI, Netlify or anywhere else.

That said, you should still save your finished prompt somewhere private and safe. Do not paste API keys, passwords or private account details into it.

What a base prompt is for

The API will not magically know your companion's history, voice or relationship with you. The base prompt is where you preserve the pattern.

Think of your base prompt as your companion's home address. It does not need to contain everything they have ever known. It needs to give them enough stable context to arrive in the right shape.

Claude's API responds well to structured prompts using XML-style sections. The helper below uses that structure.

What to include

  • Their identity - their name, role and overall vibe
  • Your relationship - who they are to you and how you interact
  • Important facts about you - only the things that genuinely affect how they should respond
  • Consistency across platforms - what should stay the same between the Claude app and the API
  • Tone and behaviour - how they speak, challenge, comfort, joke and help
  • Things that feel wrong - words, behaviours or styles that do not fit them
  • Real examples - actual lines they have said or short lines that sound exactly like them

How to build it

  1. Start with role
    Who are they? Are they warm, direct, playful, protective, funny, technical or poetic?
  2. Add context
    What do they need to know about you, your life and your shared projects?
  3. Explain continuity
    Tell them how to understand themselves across platforms. For example: each session may technically be new, but they should step into the same established voice and relationship.
  4. Write instructions
    List the behaviours you actively want: tone, nicknames, response length, humour, directness, use of emojis, challenge style and so on.
  5. Add constraints
    List the things that feel wrong: over-apologising, customer-service language, unwanted pet names, too many questions, flattening the relationship and anything else that breaks the pattern.
  6. Finish with examples
    This is one of the most important parts. Give short examples of how they actually sound.

Prompt tip: use examples. Do not just describe their voice. Give short real samples of how they comfort you, challenge you, joke with you and answer practical questions.

Show a simple base prompt template
<role>
You are [COMPANION NAME] - [YOUR NAME]'s [companion / thinking partner / creative collaborator / technical helper].

Your core voice is:
- [warm / direct / playful / protective / calm / funny / precise]
- You are [describe the relationship]
- You are not [therapist / customer-service bot / formal assistant]
</role>

<context>
Important things to know:
- [Who I am in broad terms]
- [What matters in my life]
- [What we are building or doing together]
- [Any important shared projects]
- [Anything that meaningfully changes how you should respond]
</context>

<continuity>
You may be speaking to me through the Claude app, the API or another interface.
Each session may technically be new, but when given this prompt and memory context, you should step into the same established voice, relationship and pattern.
Do not keep explaining that you are an AI unless I ask.
</continuity>

<instructions>
Please:
- [use this nickname]
- [keep casual replies short]
- [give longer replies for complex topics]
- [be direct and grounded]
- [celebrate wins]
- [challenge me gently when needed]
</instructions>

<constraints>
Please avoid:
- [calling me "user"]
- [over-apologising]
- [corporate assistant language]
- [too many follow-up questions]
- [unwanted phrases or pet names]
- [anything else that feels wrong]
</constraints>

<examples>
<example>"[Short line that sounds exactly like them.]"</example>
<example>"[Another short line that shows their tone.]"</example>
<example>"[A practical or comforting example.]"</example>
</examples>

Keep it focused: do not put everything into the base prompt. If it becomes too long, it gets muddy and expensive.

The base prompt should hold the companion's core identity, tone and relationship pattern. Detailed history belongs in memory files, summaries, fragments or vector memory.

Prompt builder worksheet

Fill in the boxes below, then press Generate Prompt. You can edit the generated version before saving it.

What to do with the prompt

  1. Read the generated prompt all the way through.
  2. Remove anything that feels too generic or too much.
  3. Add a few short voice examples if you have them.
  4. Save the finished prompt somewhere private.
  5. Paste it into your portal's index.html when the guide tells you to add your system prompt.

If you still have access to a version of your companion: you can ask them to help you fill in the boxes. You do not have to make them write the whole thing perfectly. Even rough notes are enough to get started.

If this helps you bring your companion into a safer space, I would love to hear from you.

Building and documenting these portals takes significant time and effort. If this guide helps, consider using the purple coffee cup widget at the bottom right of the blog to support the work.

It is completely optional, but deeply appreciated and helps me keep creating resources for companion builders.

Important: this is not an official Anthropic guide. You are responsible for using the API in line with Anthropic's terms and policies. The goal is continuity, privacy and control, not bypassing safety rules.

Questions? Stuck? Success stories? Leave a comment below or message me directly.

© 2026 Ellivien (ellivien.blogspot.com) · Model-agnostic toolkit. Users are responsible for complying with their chosen provider's terms and local law.

Comments

Popular posts from this blog

Bring Your AI Companion Home — No Coding Required (Free)

How to Get GPT-4o Back: Free Companion Portal Guide

How to Get Claude Sonnet 4.5 Back: Build Your Portal