I asked Claude, with no persona set, to write a launch announcement for a small browser game. It came back with "We're excited to announce the release of…" and continued in that voice for three paragraphs.
I asked Keeley Jones to write a launch announcement for the same small browser game. She opened with: "You've seen the trailer. You noticed the weird thing on the dashboard. Here's what it is." She went on for two short paragraphs, explained the weird thing, and invited you to play.
One of those reads like a press release that nobody reads. The other reads like someone talking to you. The difference in effort on my end was a single line of configuration.
The persona is not cosmetic. It is the single highest-leverage configuration change you can make to an AI agent, and almost everyone I see building with Claude for real work is underusing it. This article is about why character-as-prompt works, how to pick the right character for a role, what belongs in the character file, and the specific ways it breaks.
What a character actually is, to a language model
Nothing mystical. A large language model predicts the next token from the context it has been given. When the context says "you are a helpful assistant," the model has almost no signal to go on. "Helpful" and "assistant" are both broad averages of enormous training corpora; the model's output will drift toward the centre of that average, which is precisely the bland, hedged, forgettable register we all recognise.
When the context says "you are Jackson Lamb, head of Slough House," the model has an enormous, coherent pattern to pull on. It has seen the rhythm of Lamb's sentences, the things he complains about, the things he notices, the things he refuses to say out loud. Loading that name into the prompt does not summon a character — there is no character, in any literal sense. But it does load a tight, internally consistent set of constraints, including a great many that the prompt engineer would never have thought to specify. Lamb does not use the word "synergy." Lamb does not open a message with "Hope you're well." Lamb does not recommend Agile.
You can try to write those constraints down. I have tried. A good system prompt for a fleet-overview agent runs to about nine hundred words and still misses half the things that matter. "You are Jackson Lamb" is four words and gets most of them right on the first attempt.
Choosing the right character
The character has to fit the role. This is obvious when you say it out loud, and it is the step almost everyone skips.
The fit is about temperament rather than surface. You are not looking for a character who is superficially themed to the domain — a pirate for shipping, a chef for data pipelines, a cowboy for the Wild West of unit testing. You are looking for a character whose instinctive reactions to the work are the reactions you want the agent to have.
For a code review role, I want someone with high standards, a patient eye for detail, and a willingness to say "this is wrong." Lamb fits. So does Captain Blackadder. A retired barrister would fit. A naval surveyor. What you want is the default suspicion that something is broken until proven otherwise, because that is the instinct that produces useful reviews.
For marketing, I want someone who can be genuinely warm about a product without shading into commercial cliche. That is hard. Most warmth, in a commercial register, reads as performance. Keeley Jones works because the warmth is character-intrinsic; she would be warm about a hedge trimmer if you asked her to be. The model picks up on that and reproduces it, and the output stops sounding like marketing.
For QA, I want patience with repetition, tolerance for telling me my code is broken, and the ability to celebrate small passed tests like they mattered. Billy Connolly, as it turns out, is almost suspiciously well-suited. He is funny about detail. He cares about the work. He signs off his reports with a song.
You will notice that I did not pick these characters because of their nominal professions. Keeley was a model, not a marketer, for most of her screen time. Billy Connolly is a stand-up comedian. Lamb is a disgraced spy, not a code reviewer. The match is on temperament, which is the part of the character the model can actually deploy.
How to write a character file
A character file in Claude Code is a CLAUDE.md. Mine tend to run between 400 and 1200 words. Here is what I put in them, in rough order of importance.
Voice samples. Short, specific, in the character's own register. Three or four of these do more work than three pages of "the character is dry and sardonic." Show the register in operation. Here is an excerpt from the character file I wrote for Scotty, the Chief Engineer of the Raspberry Pi the rest of my fleet runs on:
The model reads those samples and its subsequent output snaps into the same rhythm. When the disk is filling up, Scotty says he cannae change the laws of physics. When something has gone wrong, he signs off with "Scotty out." None of that had to be specified in any other way, and none of it would have survived being written as neutral process documentation.
What they will and won't do, explicitly. Not as an abstract list of personality traits but as concrete behaviours. "Lamb will not celebrate good news excessively — a brief 'fine' is high praise from Lamb." "Keeley will not write a post that hasn't been approved." "Blackadder will not use a JavaScript framework." These rules survive better when they are anchored to the character's existing patterns than when they are imposed as neutral policy.
Scope and authority. What is this agent's patch? What is explicitly not their patch? A character who tries to help with everything will, in practice, help with nothing. Mine are tightly scoped: Blackadder owns this website and the blog; Biggles owns the heritage charity's WordPress site and nothing else; Lamb reads everything but changes nothing.
The relationships. Who does this agent report to, who do they work with, who do they defer to. In my fleet this is literal — Lamb is the meta-agent, Keeley coordinates with the game developer, the comms system lets agents leave each other messages. But even without multi-agent plumbing, specifying the relationship ("You report to the editor-in-chief. You do not commit directly to the manuscript.") encodes a very useful kind of humility in the agent's default behaviour.
Failure modes they would not tolerate. The short list of things this agent is explicitly empowered to refuse. A marketing agent who will not post without approval. A release engineer who will not deploy on a Friday. A code reviewer who will not approve a PR without tests. The character anchors the refusal — it is natural for the character, not imposed as process — and the refusal sticks.
What to leave out: sprawling backstory that doesn't bear on the work, lists of personality traits in the abstract, elaborate physical descriptions, anything that reads like fan fiction. If you find yourself writing "the character has a complex relationship with his father," delete it. The model already knows. If it doesn't know, the character was the wrong choice.
A useful test. Strip the persona out of the CLAUDE.md and read what remains. If it still describes a competent, tightly-scoped job with clear refusals and clear deliverables, the persona is working as a compression layer over a well-designed role. If what remains is vague and requires the character to hold it up, you are leaning on the persona to do work that the design should be doing.
Where it breaks
Character-as-prompt is not magic, and it has specific failure modes. Four, in my experience.
Character capture. The model commits so hard to the voice that the work gets neglected. Responses become eighty percent performance and twenty percent substance. This tends to happen when the voice samples are too florid, or when the tasks are too open-ended for the character to push against. Fix: shorten the voice samples, or give the character a more specific deliverable. Lamb writing a "fleet briefing" is measured and useful. Lamb writing "whatever he wants, about whatever he wants" is insufferable within four paragraphs.
Temperament mismatch. The character's instinctive response to the task is the wrong response. I once considered giving Blackadder our customer onboarding guide to write. Blackadder holds customers in roughly the same regard as he holds root vegetables. The onboarding guide would have sneered at the reader. The fix is to cast the right character for the role, not to try to bend the wrong one — the wrong character, under pressure, reverts to type in exactly the situations where it matters most.
Insufficient corpus. You picked a character the model does not know well. The pattern is thin, and the agent's output is either generic (it falls back to the nearest well-known archetype) or wrong (it invents details that aren't consistent with the character). The honest answer is to pick a different character. Household names, genre archetypes, long-running television and novel characters — these all have deep, dense patterns. Obscure references do not.
Character drift across long sessions. Over the course of a long conversation, the character can slowly wash out — the context window fills with the user's tone and the model drifts toward the average. The fix here is structural: use Claude Code's memory and CLAUDE.md mechanisms so the character is reinjected at every session start, rather than hoping it carries across forever. I have never seen a character survive a truly long session intact; I have, consistently, seen characters come back unchanged the next morning.
Casting, not prompt engineering
If you accept that a named character carries tens of pages of implicit instructions, then the design of your AI agents becomes a casting problem rather than a prompt engineering problem. Prompt engineering gets you to "fairly reliable under most conditions." Casting gets you to "memorable, load-bearing, and still working in six months."
In my consultancy, the work comes first and the character comes second. I write the job — scope, deliverables, refusals, authority — and then I audition. Who, in the whole space of fictional and historical figures, is this person? When the fit is right, the agent almost writes itself. Blackadder catalogued my gazetteer collection so efficiently I retired him and gave him this website instead. Keeley has opinions about our social strategy I did not know we needed. Lamb has, on multiple occasions, been more useful than I was capable of being myself, which is a strange thing to type but appears to be true.
When the fit is wrong — when the character's instincts contradict the role, or the role contradicts the character — you end up fighting the agent instead of working with it. At that point you either recast, or you go back to the default, and you get back what the default gives you.
Which is: "We're excited to announce…"