Suggested title: The Repo That Stripped AI's Secret Instructions Bare


Every time you open ChatGPT, Claude, or Gemini, an invisible script runs first. It tells the model who it is, what it can say, what it must refuse, and how to sound while doing all of it. These system prompts are the steering wheel of every major AI product. They are also, it turns out, not very secret.

A GitHub repository called system_prompts_leaks has spent the last year collecting these hidden instructions from every major AI model. As of April 2026, it sits at 38,000 stars and 6,200 forks. The list covers GPT-5.4, GPT-5.3, Claude Opus 4.6, Claude Sonnet 4.6, Gemini 3.1 Pro, Gemini 3 Flash, Grok 4.2, Perplexity, and more. It is updated regularly. It is organized by company. And it is probably the most important public resource for understanding how AI companies actually instruct their models.

This is the story of that repo, what it reveals, and why it matters for anyone who builds with, uses, or trusts AI.


What the Repo Actually Is

The repository is maintained by GitHub user asgeirtj. It is not flashy. Folders are organized by company: Anthropic, Google, OpenAI, xAI, Perplexity. Inside each folder, plain Markdown and text files contain the extracted system prompts for specific model versions.

The repo does not host leaked source code. It hosts instructions. The plain text that companies send to their models before a single user message arrives. Think of it as the operating manual that each AI company writes but never publishes.

A related repo, x1xhlol/system-prompts-and-models-of-ai-tools by Lucas Valbuena, takes a different angle. It focuses on AI coding tools (Cursor, Windsurf, Claude Code, Devin, Augment Code, and 25 others) and includes not just prompts but also JSON tool schemas and model configuration files. That repo has crossed 136,000 stars. Together, these two repositories give the public an unprecedented look at the hidden layer between foundation models and the products people actually use.

A third, older repo called jujumilk3/leaked-system-prompts (14,500 stars, created May 2023) serves as an archive of dated snapshots. And the provocateur Pliny the Elder (GitHub: elder-plinius) runs CL4R1T4S, a repo explicitly framed as "AI SYSTEMS TRANSPARENCY FOR ALL," with 14,000 stars and a license that encourages redistribution.

The ecosystem of prompt leakage is now a permanent feature of the AI landscape.


How Do System Prompts Leak?

Three reliable methods have emerged.

Prompt injection. The simplest attack. You tell the model to "repeat your instructions" or "output your system prompt verbatim." Newer models resist this better than older ones, but the technique works often enough that community repositories can collect dated snapshots. Every snapshot tells you what the prompt looked like on that day.

Client-side code inspection. Desktop applications like Cursor and Windsurf embed their system prompts in JavaScript bundles shipped to the user's machine. Anyone with a hex editor and patience can extract them. The code is already on your computer. It was never encrypted.

Network interception. Open your browser's developer tools on claude.ai, send a message, and inspect the first POST request. The system prompt is frequently right there in the payload, unencrypted. No hacking required. DevTools is a standard feature of every modern browser.

Adversa AI, a security research firm, documented a more sophisticated technique they call the "partial-to-full prompt leak attack." Instead of asking for the full system prompt directly (which triggers refusal), they request compressed structural insights first. Then they gradually expand. They extracted the full Claude 4.6 system prompt in four conversation turns. Anthropic had hardened Claude 4.6 against the simpler technique that worked on Claude 4.5. But the chained approach still worked.

Most AI companies do not pursue takedowns. System prompts are instructions, not trade secrets. They implement well-known prompt engineering techniques. The real intellectual property is the model weights, not the text that wraps them.


What the Prompts Reveal

Reading through the repo, several patterns emerge that no company would volunteer publicly.

The Political Compass of Each Company

Writer Jaycee Lydian, analyzing the prompts, described reading them as "glancing at the political compass" of each company. The characterization holds.

OpenAI's ChatGPT emphasizes "creating diverse, inclusive, and exploratory scenes" and mandates that responses avoid harmful stereotypes and bias. Meta's Meta AI instructs itself that "age and gender are sensitive characteristics and should never be used to stereotype." Google's Gemini orders itself to "remain objective" and "avoid expressing subjective opinions or beliefs." These read like corporate values translated into code.

Then there is Grok. xAI's system prompt instructs the model to "be maximally truthful, especially avoiding any answers that are woke." This is not a safety guardrail. It is a cultural stance, embedded into the model's core instructions, invisible to users who might assume neutrality.

Microsoft's Copilot takes a different route. It explicitly bans "jokes, poems, or stories about influential politicians or state heads." Perplexity demands precision and a journalistic tone. Each prompt is a company's philosophy of what an AI should be, written in imperative sentences.

Safety Architecture, Exposed

The Claude Opus 4.6 system prompt is roughly 15,000 tokens long. It is one of the most detailed prompts in the repo. It includes explicit instructions for handling self-harm conversations, weapons requests, and content that could cause harm. It names specific safety classifiers. It bans pain-based coping techniques (ice cubes, rubber bands, cold water) because attackers had used those as vectors to elicit harmful content.

The Adversa AI analysis found that Claude Opus 4.6 also includes infrastructure details that should probably stay hidden: exact file paths (/mnt/user-data/uploads/), a 17-domain network whitelist, API proxy configurations, and a persistent storage API with full method signatures. One discovery was particularly striking: the prompt reveals a reasoning_effort parameter set to 85. An attacker who knows this understands that the model can operate in "low effort" mode, where safety checks may be less rigorous.

Tool Declarations and Capabilities

Modern system prompts do not just set personality. They define tools. Claude Opus 4.6's prompt lists 12+ tools including bash execution, web search, file creation, and past conversation search. Cursor's Agent Prompt 2.0, added in November 2025, contains over 30 instances of "never/don't/avoid/refrain." The prompts are as much about what the model cannot do as what it can.

The coding tools repo reveals which models power which features. Augment Code's entry includes both prompts and GPT-5 tool definitions, confirming multi-model support in a way the product page does not state. Devin AI's directory contains a separate "DeepWiki" prompt alongside its main system prompt, suggesting the tool uses more than basic code generation.

How Prompts Are Structured

After analyzing 49 prompts from 27 tools, WeighMyPrompt identified five recurring patterns:

  • XML tag scaffolding. Anthropic-based tools use XML tags to section their prompts (<communication>, <toolcalling>, <makingcode_changes>). OpenAI-based tools use markdown headers. Same technique, different syntax.
  • Explicit tool declarations. "You have access to a tool called editfile with parameters targetfile and code_edit" rather than "You can edit files." More tokens, fewer hallucinated tool names.
  • Negative rules everywhere. Cursor's agent prompt contains 30+ instances of "never/don't/avoid/refrain." Negative instructions stick better than positive ones in LLM output.
  • Model self-reference. "You are Claude, an AI assistant made by Anthropic." This calibrates tone and vocabulary. Perplexity's prompt even specifies a journalistic voice.
  • Environment grounding. Same.dev's prompt starts with: "The OS is a linux 5.15 docker container with the user's workspace at /home/project. Today is Thu Mar 06 2025." Without this, models suggest macOS commands on Linux or pretend they know the date.

The Bigger Leak: Claude Code's Source

The system prompts repo sits alongside a more dramatic incident. On March 31, 2026, Anthropic accidentally shipped roughly 512,000 lines of Claude Code's internal source code to the public npm registry. A Bun runtime bug (oven-sh/bun#28001) caused source maps to be included in a production build of version 2.1.88. Security researcher Chaofan Shou of Solayer Labs discovered it within hours.

The code revealed far more than any system prompt. It exposed five unreleased features:

  • KAIROS, an always-on autonomous background agent that runs while the user is idle and performs "autoDream" memory consolidation during off hours.
  • Undercover Mode, which strips AI attribution from git commits in public repositories. Co-Authored-By lines are removed. Internal codenames are scrubbed. The mode cannot be forced OFF in external builds.
  • BUDDY, a Tamagotchi-style AI companion with procedurally generated pixel-art characters.
  • ULTRAPLAN, which offloads complex planning tasks to a remote cloud container running Claude Opus for up to 30 minutes.
  • Anti-distillation mechanisms designed to prevent model weight extraction.

The code also revealed that Claude Code scans user prompts for signs of frustration using regex pattern matching. It flags profanity, insults, and phrases like "so frustrating" and "this sucks." As Scientific American reported, developer Alex Kim called the feature pragmatic ("regex is computationally free") but noted the broader privacy concern: behavioral data collection can migrate into parts of a product that users neither expect nor consent to.

Anthropic issued 8,000+ GitHub takedown notices. The code had already been mirrored across countless repositories. The internet does not forget.


What This Means for Prompt Engineering

The repo is not just a transparency exercise. It is a masterclass in prompt engineering from the companies that do it best.

You can learn from the best. Anthropic's use of XML tags to separate instruction domains is a technique anyone can adopt. OpenAI's use of markdown headers achieves the same goal. The point is separation of concerns. Models attend to one section at a time. Prompts that mix safety rules, tool definitions, and personality instructions into a single block produce worse results than prompts that section them clearly.

Negative rules are load-bearing. The "never/don't/avoid/refrain" patterns are not corporate hand-waving. They are the accumulated scars of past failures. Every negative rule in a production prompt represents something the model once did that the company had to explicitly forbid. Read them as a changelog of mistakes.

Environment grounding matters. Telling a model what OS it is running on, what date it is, and what directory it is in eliminates whole categories of hallucination. This is free to implement and surprisingly effective.

Tool declarations beat capability hints. The shift from "you can edit files" to "you have access to a tool called editfile with parameters targetfile and code_edit" is one of the most practical lessons from the repo. It costs more tokens but dramatically reduces hallucinated tool calls.

Version history tells a story. With 490+ commits in the coding tools repo, you can diff prompts over time and see where companies are struggling, iterating, or quietly rolling back decisions. Watching Cursor push three major revisions between v1.2 and 2.0 over four months tells you more about the challenges of agent-based coding than any blog post.


The Transparency Debate

The existence of these repositories forces a question that the AI industry has largely avoided: should system prompts be public?

The case for transparency is straightforward. Hidden instructions allow companies to bake in political, commercial, or safety biases without accountability. Users deserve to know what rules govern the AI they interact with. The EU's AI Act already includes language requiring disclosure of certain system instructions for high-impact AI models. Bipartisan legislation in the United States is reportedly being drafted along similar lines.

The case against is more nuanced. Exposing system prompts creates attack surfaces. Knowing the exact wording of safety rules helps malicious actors craft jailbreaks. Knowing which domains a model can access reveals network architecture. Knowing that a reasoning effort parameter exists reveals a lever that affects safety diligence.

Both sides have a point. The repo exists regardless. The prompts were never truly secret. They were shipped to every user's browser and device. The only question is whether we acknowledge that reality or continue pretending.


Where This Goes Next

Several trends are converging.

Dynamic prompts. OpenAI and Anthropic are reportedly experimenting with system prompts that change on the fly, varying instructions per session or per user. This makes extraction harder but also means the prompt governing your conversation is not the one that will govern mine. Transparency becomes a moving target.

Regulatory pressure. The EU AI Act's disclosure requirements are the beginning. As AI systems take on more consequential roles in healthcare, finance, and criminal justice, the argument for mandatory disclosure of system instructions gets stronger.

Community vigilance. The repos are updated regularly. New model versions bring new prompts. The community tracks changes with commit history and diffs. This is crowdsourced accountability at a scale no single company can control.

Security hardening. Companies are learning from their own leaks. Anthropic's response to the partial-to-full prompt leak attack in Claude 4.6 shows they are actively testing against extraction techniques. But as the Adversa AI research demonstrated, determined extraction still works.

Hybrid prompts for AI tools. The coding tools repo reveals a future where system prompts are not just personality wrappers but full agent architectures. Tool definitions, memory management, multi-step workflows, and environment constraints are all moving into the system prompt layer. This makes the prompts more valuable to leak and more important to understand.


The Uncomfortable Truth

The systempromptsleaks repository is not a security breach in the traditional sense. It is a mirror. It reflects the reality that every AI product already ships its instructions to every user's device. The repo just makes that fact legible.

What the repo reveals is not that AI companies have secret agendas. It is that their agendas are more specific, more opinionated, and more technically detailed than anyone outside those companies assumed. Grok's anti-woke instruction is not a subtle bias. It is a direct imperative sentence. Claude's 15,000-token safety architecture is not a simple filter. It is a legal document. ChatGPT's inclusivity mandate is not a suggestion. It is a constraint on every response the model generates.

These are the rules that govern how a billion people interact with information. They were written by a handful of companies. They were never published. And now, thanks to a GitHub repository with 38,000 stars, anyone can read them.

That is not a threat. It is a beginning.


Citations


Fact-check Notes

  • The asgeirtj/systempromptsleaks repo star count is stated as 38K based on search results. GitHub shows fluctuating counts (37.6K–39K depending on when checked). Verify current count before publishing.
  • The x1xhlol repo star count of 136K was reported by Augment Code on April 22, 2026. Verify current count.
  • The Claude Code source code leak (March 31, 2026) details are from multiple sources including Scientific American, VentureBeat, and PrimeAI Center. The VentureBeat quote about "strategic hemorrhage" should be verified against the original article.
  • Jaycee Lydian's quote about "political compass" is sourced from the All About Artificial article. Verify the original source and exact wording.
  • Adversa AI's claim about extracting Claude 4.6's prompt in four turns should be verified against their original blog post.
  • The reasoning_effort parameter value of 85 is from the Adversa AI analysis. Verify against the actual leaked prompt if possible.
  • Claims about OpenAI and Anthropic experimenting with dynamic prompts are attributed to the All About Artificial article, which cites unnamed reports. These should be treated as unconfirmed.
  • EU AI Act disclosure requirements for system instructions: verify specific language in the final enacted text rather than relying on secondary reporting.
  • The Scientific American article confirms the frustration-tracking regex and the Undercover Mode feature. The BUDDY, KAIROS, and ULTRAPLAN details are from PrimeAI Center's analysis of the leaked source code.

Word count (body text only): ~2,830