Prompt Engineering Tip: Claiming Code Ownership Improves Claude's Refactoring
Simon Willison highlighted an Anthropic prompt engineering tip for Claude Fable 5.2 showing that declaring code ownership significantly changes model behavior. Specifically, telling Claude 'This codebase is yours' increased code-merging and refactoring rates dramatically compared to when no ownership was stated. This technique provides developers with a high-value, actionable method to make LLMs more proactive and effective at cleaning up technical debt instead of blindly adding redundant code. It demonstrates how subtle framing changes in prompts can profoundly impact AI coding assistants. In Anthropic's testing on small coding tasks, Claude Fable 5.2 merged repeated code in about half of the attempts when told the codebase belonged to it, compared to under a tenth of the attempts without that specific framing sentence.
## BACKGROUND
Prompt engineering is the process of structuring an instruction so that an AI model can interpret and understand it clearly to produce optimal results. Large language models like Claude respond deeply to contextual framing, meaning that instructions establishing roles, ownership, or persona can drastically alter their functional output.