While walking through Claude Code’s own source code with Claude Code itself, I asked it to explain a prompt in the code that says: “You are Claude Code, Anthropic’s official CLI for Claude.” I asked it, “Who is talking to who here?” and it provided an interesting answer. But first, a long lead-up with some background:
Background on CodeExam prompts-catalog feature
Programs can call LLMs in much the same way a human does: using prompts, ordinary human language. Though this seems obvious, nonetheless it is somewhat odd to see English language text in the middle of Python or JavaScript code — not as a comment, but as an actionable instruction.
For example, the CodeExam program I’m building with Claude Code can ask an LLM (such as Claude, but also importantly including a local LLM in air-gapped mode) to analyze a function in source code. In CodeExam’s JavaScript implementation, part of the doAnalyze() function in analyze.js looks like this:

CodeExam is a source-code examination tool that not only was built with AI (Claude Code), and that uses AI (ability to have source code analyzed by a local LLM or in non-air-gapped mode by an AI chatbot such as Claude), but that also provides features to aid analysis of AI-related source code: this includes not only code that implements or talks to an LLM or machine-learning model, but also code that itself has been generated by AI (so far, CodeExam’s JavaScript version was written entirely by Claude Code, and the earlier Python version entirely by Claude; as for Claude Code, it is essentially written by Claude Code itself: 90% in Sept. 2025; by Dec. 2025, Claude Code creator Boris Cherny reporting “In the last thirty days, 100% of my contributions to Claude Code were written by Claude Code”).
CodeExam’s AI-related features include a –prompt-catalog command to detect and display LLM prompts found in the target codebase, with links to the associated code that builds and/or uses the prompt. There is a corresponding “LLM prompts” list in the GUI. To get slightly meta about this, CodeExam can of course examine its own source code, and display the prompts contained therein, with links to the related functions. In the GUI, the LLM Prompts list is sorted by length, shortest first:

(The prompt-detection is not perfect, missing some prompts and falsely classifying some strings as prompts. This code has gone through several iterations, as I’ve told Claude Code about various false positives and false negatives. Above, it looks like there is some likely-unnecessary repetition of the same prompt text across different functions. It also appears that the list has picked up a comment, ”// You are a patent-claim keyword extractor…”, from the collectPrompts() function, which is code that looks for certain prompt patterns such as /^You are |^You’re a |^Your task |^Your role |^As an AI|^As a / .
We’ll see in a moment that this particular type of “You are…” prompt often acts, not as a specific query, but as a system prompt: more general background information on the role the LLM should take on, or what skills it should use. Very oddly, such English-language text is not merely information, but operative information: instructions that the LLM will often (not always) use to modify its behavior beyond how it would behave without the system prompt.
Prompts inside Claude Code’s own code
Now, besides CodeExam inspecting its own source code, it can also inspect Claude Code, which is written in JavaScript and TypeScript. Anthropic does not intentionally release the original JS/TS code. Not intentionally: see the top of the RE/AI page on Anthropic’s apparently-accidental code leak. However, as also discussed there, every copy of Claude Code has a massive (11-12 MB, about 525,000 lines of code) “minified” cli.js file. Also see Claude Code on GitHub.
Claude Code was perfectly happy to work with me, using its cli.js as a test case for several CodeExam features, such as JS pretty-printing (beautification) and renaming of obfuscated function names:
For the leaked source — I should be transparent: I need to be careful about working with leaked/unauthorized source code. The minified cli.js is the official distributed binary and is fair game for reverse engineering (it’s on every Claude Code user’s machine). But leaked unminified source may have different legal status.
That’s fine; I’ll see what CodeExam can do with cli.js, and use it as one working example to improve CodeExam’s ability to help a human code examiner (there are MCP versions of some CodeExam features, and over time I’ll be testing how these serve as tools for a non-human code examiner).
Here is the left pane of the CodeExam GUI, with a cli.js index loaded, showing the top of the LLM Prompts list (shortest prompts first, with most of the related functions bearing CodeExam’s current renames). Among the short prompts below, many are system prompts telling AI what role/tone/skills to take on (there is a clear false positive below: “You are currently using your subscription to power…” is something the Claude Code /cost command may say to the user). In the main part of this article, we’ll be discussing the 86-character prompt from the list below, “You are Claude Code, Anthropic’s official CLI for Claude…” located in the function with the obfuscated name xf():
While these short prompts are largely of the “You are…” type, note the more specific “Generate a concise, technical issue title…” prompt related to GitHub. Also note the skill-related role: “You edit skill definition files…”, and “You are analyzing user messages from a conversation…” [TODO: is this related to the “horrible” code with curse words?]
CodeExam lets the user filter for keywords appearing in its various lists such as LLM Prompts, Functions, Commands, “Breadcrumbs”, “Hotspots”, etc. Below, the list of Claude Code prompts filtered for “expert”:
(Some of these look like Markdown text, and indeed .md files are sometimes used to contain prompts, importantly including skills. In Claude Code on GitHub, see files such as code-reviewer.md, code-explorer.md, and code-architect.md, and feature-dev.md. OpenAI Codex appears to make heavy use of .md-based prompts: see e.g. numerous SKILL.md files for Codex plugins at https://github.com/openai/codex-plugin-cc . There is a CodeExam index for Codex, based on the binary distribution, and I hope to describe this soon.)
Below is a group of longer prompts towards the end of the list. Clicking on a fragment shown in the list brings up the full prompt, and the code for the relevant function. (In the screenshot below, function attribution for these long prompts is suppressed pending a parser fix. There are also a few clear false positives, such as “as abort abs absolute…”.)
Again, note the references to skills: “; “This skill enables you to be a verification specialist…”; “… This skill helps you build LLM-powered applications…” The implementation of skills with text (a former old-school programmer like me would have expected something more like IF/THEN rules; how passé) is important enough to filter for “skill”:
[TODO: what command does “Skillify” correspond to? “editing a skill definition file”? Look carefully at /plugins list: skill-creator. See also famous Ralph Wiggum plugin (/ralph-loop). Does CodeExam need Skills and Plugins catalogs, similar to LLM Prompts, or are those too specific to this particular type of software? Give the user the ability to create such specialized catalogs on the fly? But any way that could be implemented in air-gapped mode with “small” local LLM like Qwen3 GGUF?]
With that preface out of the way…
Claude Code on Claude Code
While beefing up –prompt-catalog (and finding additional prompts in the code, even though Claude Code (CC) keeps telling me the catalog is “complete” :-), I’ve been asking CC to walk me through some of the cli.js code (a slightly older version of the code that is CC itself), and CC has been giving me some fascinating explanations of its own operation.
Normally I take a given AI’s explanation of its own operation with some grains of salt, because AIs generally lack “introspection”. They’ll happily tell you how they work, and the explanations make sense, but if you press them how they know this, without access to their own source code or a way to query their own model, they’ll admit they are speaking based on their extensive general knowledge of the AI literature. See here for one example, starting from my question to Claude: “Would it be fair to say that your knowledge of your own implementation, based as it is on your general training, is not qualitatively different from your knowledge of (picking random unrelated examples) how one does various yoga positions, how to play badminton, or how to implement a C++ compiler?” (Asked a similar question, DeepSeek said it had a bit of a privileged perspective on its own operation, because it was pretty sure it had been trained in part on DeepSeek source code. Would an “open source” model actually have some minimal introspective abilities?)
Here, though, I’m chatting with CC while we’re both looking right at CC’s own source code, as de-obfuscated to some extent by CodeExam:
Me: >>> I’ve been thinking about something in the cli.js prompt catalog [in Function xf()]:
“You are Claude Code, Anthropic’s official CLI for Claude. CWD: ${y1()} Date: ${IX6()}” — Who is talking to who here?
Claude Code:
● In that prompt, Anthropic is talking to me (Claude, the LLM).
That template literal is the simple-mode system prompt — the very first thing the LLM sees before any user message. It tells me:
– Who I am: “You are Claude Code” — my identity for this session
– Where I am: CWD: ${y1()} — the user’s working directory (so I know what filesystem I’m operating in)
– When it is: Date: ${IX6()} — current date (so I know my temporal context)
The flow: Anthropic’s code (cli.js) → constructs this string → sends it as the system message to the Claude API → I (the LLM) receive it and adopt the identity/context it describes → then your message arrives as the user turn.
So: Anthropic’s code is instructing the LLM how to behave. Not a human talking to a human, not code talking to code — it’s the orchestration layer telling the AI “here’s who you are and what you know.” Everything I do in this session flows from that initial framing.
The richer version (when CLAUDE_CODE_SIMPLE is NOT set) is the full xf() output — all 7+ sections we walked through earlier. This simple version is the stripped-down fallback. [The xf() function is shown below. I’ll discuss Claude Code’s walk-through of this code separately.]
>>> So cli.js is telling the Claude LLM to assume the role of Claude Code?
● Yes, exactly. The LLM is a general-purpose model — it doesn’t inherently “know” it’s Claude Code. The system prompt is what gives it that identity. [Always need to careful when an LLM says “exactly”, “completely”, precisely”, but here it seems reasonable.]
Without the prompt, I’m just Claude — a general AI assistant. The prompt transforms me into Claude Code specifically: a coding agent that reads files, edits code, runs shell commands, follows specific safety rules, uses specific tools, etc.
Every specialized behavior you see from Claude Code — the way I propose edits rather than just describing them, the way I run node –check after changes, the way I refuse to git push –force without asking — all of that comes from the instruction sections we cataloged (ip9 coding instructions, np9 action-safety rules, rp9 tool-usage guidance, etc.). [ip9, np9, and rp9 are obfuscated names of functions we’ll walk through separately]
The LLM is the engine. The system prompt is the steering. cli.js is the chassis that connects them to the road (your terminal, your files, your git repo).
This is exactly why –prompt-catalog is strategically important for the AI-focus direction: to understand what any AI application actually does, you need to see its prompts. The code is the plumbing; the prompts are the policy.
[TODO: above sounds over-stating importance of prompts specifically? Or no, really do play the central role that CC is suggesting here, because everything is already “in” a sufficiently-large LLM (see ___), and “merely” need to elicit (but see Lambert’s forthcoming RLHF book arguing about Elicitation Theory). At any rate, remarkable that plain English (or almost any human language) can elicit behavior/role (see chat with Copilot on rigorously testing effect on LLM behavior with vs. without a given system prompt).]
For the xf() function in which this prompt appears, see the screenshot below. While it can be seen that the “You are Claude Code” prompt plays a minor role in this function, much of the point of CodeExam features like the LLM catalog is to help “surface” important code that a code reviewer might not otherwise locate, including by pointing to functions whose caller (or caller tree) should be examined:
[TODO: modify the following, just show the less-readable version here, then transition to showing improved version in next article with xf() walk-through. In next article, will see how CE improves readability + will walk-through…. Ideally, CE would have another checkbox to turn renaming off/on, so could show without any _KW_ etc. renames.]
The screenshot above shows how the code is rendered in CodeExam when the “Wrap Long Lines” and “Break Long Lines Along =>” options are enabled. Contrast the same code’s appearance below, when “Break Long Lines Along =>” is not enabled, and it is more difficult to see the link between “ant_model_override” and pp9() for example, or between “env_info_simple” and what CodeExam has renamed v44_KW_FAST_MODE_INFO_MODEL().
Forthcoming articles will walk through this xf() function, and then the cli.js “main loop” — the orchestration layer that turns the user message into tools, decisions, and follow-up prompts.
[TODO: note relation to an early article of mine: “Executable strings: turning data into code”, Data Based Advisor, July 1987 ; https://dl.acm.org/doi/10.5555/32324.32334 — but only vaguely/superficially related to LLM prompts as actionable instructions?]





