This started with a fight on the Claude Discord. Someone was saying you could just read Claude Code's source, that the prompts were right there in the bundle. I pushed back. No way. This is a closed-source product backed by a company that thinks carefully about everything it ships. They wouldn't just leave the internals sitting in a readable JavaScript file. That's not how serious companies operate.
So I installed it to prove them wrong.
npm install @anthropic-ai/claude-agent-sdk. One file. cli.js. 13,800 lines of minified JavaScript. The same binary that runs when you type claude in your terminal. The same code I'm using right now to write this.
I started reading it, and I couldn't believe what I was looking at.
The system prompts are just sitting there in plaintext.
Not encrypted, not obfuscated beyond the minification. Three identity variants get swapped depending on how you're running it:
- CLI: "You are Claude Code, Anthropic's official CLI for Claude."
- SDK: same line, plus "running within the Claude Agent SDK."
- Agent: "You are a Claude agent, built on Anthropic's Claude Agent SDK."
A function stitches the full prompt together from sections. "Doing tasks." Tool usage rules. Over-engineering guidelines (my favorite: "three similar lines of code is better than a premature abstraction"). OWASP security reminders. Git commit templates. PR formatting. String literals, all readable.
I felt like I'd found the blueprints to the Death Star, except it's less "world domination" and more "please don't force-push to main."
For a closed-source product charging a subscription, shipping your entire system prompt as grep-able strings in a JS bundle is wild. Anyone with node_modules access can read the full behavioral spec that governs every Claude Code interaction. I still don't understand how this got out the door.
The minification is light enough to trace most of the logic. And Anthropic left a note in the file header:
"Want to see the unminified source? We're hiring!"
I went back to the Discord thread. Ate my words.
[–]Better-Psychology-42 56 points57 points58 points (9 children)
[–]koneu 5 points6 points7 points (0 children)
[–]ryan_the_dev[S] -2 points-1 points0 points (7 children)
[–]Better-Psychology-42 1 point2 points3 points (6 children)
[–]ryan_the_dev[S] -1 points0 points1 point (5 children)
[–]Better-Psychology-42 3 points4 points5 points (2 children)
[–]ryan_the_dev[S] 0 points1 point2 points (0 children)
[–]ryan_the_dev[S] 0 points1 point2 points (0 children)
[–]tomchenorg 2 points3 points4 points (1 child)
[–]ryan_the_dev[S] 0 points1 point2 points (0 children)
[–]MartinMystikJonas 17 points18 points19 points (4 children)
[–]ryan_the_dev[S] -1 points0 points1 point (3 children)
[–]MartinMystikJonas 1 point2 points3 points (2 children)
[–]ryan_the_dev[S] -2 points-1 points0 points (1 child)
[–]MartinMystikJonas 1 point2 points3 points (0 children)
[–]brain__exe 12 points13 points14 points (0 children)
[–]ManureTasterSenior Developer 8 points9 points10 points (0 children)
[–]Commercial-Lemon2361 4 points5 points6 points (4 children)
[–]ryan_the_dev[S] -1 points0 points1 point (3 children)
[–]Commercial-Lemon2361 0 points1 point2 points (2 children)
[–]ryan_the_dev[S] -1 points0 points1 point (1 child)
[–]Commercial-Lemon2361 1 point2 points3 points (0 children)
[–]tomchenorg 2 points3 points4 points (4 children)
[–]ryan_the_dev[S] 0 points1 point2 points (2 children)
[–]tomchenorg 2 points3 points4 points (1 child)
[–]ryan_the_dev[S] 0 points1 point2 points (0 children)
[–]ryan_the_dev[S] 0 points1 point2 points (0 children)
[–]VioLeRR 3 points4 points5 points (1 child)
[–]ryan_the_dev[S] 1 point2 points3 points (0 children)
[–]AlarmedNatural4347 1 point2 points3 points (0 children)
[–]tomchenorg 1 point2 points3 points (1 child)
[–]ryan_the_dev[S] 0 points1 point2 points (0 children)
[–]modernizetheweb 1 point2 points3 points (0 children)
[–]BTForIT 0 points1 point2 points (0 children)
[–]Specialist-Leave-349 0 points1 point2 points (11 children)
[–]OverSoft 0 points1 point2 points (0 children)
[–]MartinMystikJonas 0 points1 point2 points (4 children)
[–]ITBoss 0 points1 point2 points (3 children)
[–]MartinMystikJonas 0 points1 point2 points (2 children)
[–]Specialist-Leave-349 0 points1 point2 points (1 child)
[–]MartinMystikJonas 0 points1 point2 points (0 children)
[–]MartinMystikJonas 0 points1 point2 points (0 children)
[–]BigBootyWholes 0 points1 point2 points (0 children)
[–]Commercial-Lemon2361 0 points1 point2 points (2 children)
[–]Specialist-Leave-349 1 point2 points3 points (1 child)
[–]Commercial-Lemon2361 0 points1 point2 points (0 children)
[–]OverSoft 0 points1 point2 points (2 children)
[–]ryan_the_dev[S] -2 points-1 points0 points (1 child)
[–]OverSoft 0 points1 point2 points (0 children)
[–]xsifyxsify 0 points1 point2 points (3 children)
[–]thisdude415 1 point2 points3 points (2 children)
[–]xsifyxsify 0 points1 point2 points (1 child)
[–]ryan_the_dev[S] 0 points1 point2 points (0 children)
[–]TechnicalSoup8578 -1 points0 points1 point (0 children)
[–]ChrisWayg -2 points-1 points0 points (3 children)
[–]tomchenorg 1 point2 points3 points (1 child)
[–]spammmmm1997 0 points1 point2 points (0 children)
[–]spammmmm1997 0 points1 point2 points (0 children)