leak

What Claude Code's Leaked Source Code Means for You

March 31, 2026

What was leaked and why it matters

On March 31, 2026, a security researcher discovered that Anthropic accidentally shipped a source map file inside their npm package for Claude Code. That file contained the full source code. 1,900 files. Over 512,000 lines of TypeScript. Everything Anthropic built under the hood was suddenly public.

This guide breaks down the three most useful things inside that leak, shows you how to start using each one today, and gives you the exact prompts to turn them into custom Claude Code skills that run automatically.

1. Study the system prompt to write better prompts

What was revealed

Every time you open Claude Code, it receives a massive set of instructions before you type a single word. The leaked source shows exactly what those instructions look like.

Anthropic structures their system prompt into three layers.

Tool constraints tell the AI which tools to use and when. For example, the prompt says "must use FileReadTool to read files, bash is not allowed for that." This prevents Claude from taking shortcuts that could break things.

Risk controls force the AI to slow down before dangerous actions. The prompt includes rules like "must double confirm before deleting data." This is why Claude Code asks you for permission before certain operations.

Output specs shape how Claude responds. Instructions like "give the conclusion first, then explain" are baked directly into the prompt. That's why Claude Code leads with answers instead of long buildups.

What you can do with this

You can use the same three layer structure when you write your own prompts for any AI tool.

Define tool constraints. Tell the AI exactly what it should and should not do. Instead of saying "help me write an email," say "write a cold outreach email. Do not use any greetings longer than one sentence. Do not include a P.S. line. Keep the body under 100 words."

Add risk controls. If there are things the AI should never do or should always check first, say it upfront. "Before suggesting any changes to the database, list what will be affected and wait for my confirmation."

Set output specs. Tell the AI how you want the response shaped. "Lead with the recommendation. Then give me three bullet points explaining why. Keep the total response under 200 words."

Turn this into a Claude Code skill

Paste this into Claude Code and it will build the skill for you automatically:

Build me a Claude Code skill called prompt-architect. Save it at ~/.claude/skills/prompt-architect/SKILL.md. The skill should trigger when I'm writing any prompt, system instruction, or AI directive. When invoked, it should ask me what the prompt is for, then walk me through building it in three layers: first tool constraints (what the AI should and should not do), then risk controls (what it should check or confirm before acting), then output specs (how I want the response shaped). Show me each layer for approval before combining them into a final structured prompt.

Once Claude builds it, type /prompt-architect any time you need to write a prompt and it handles the structure for you.

2. Break complex work into single purpose tools

What was revealed

Claude Code runs on roughly 40 separate tools, each designed to do one specific thing. FileReadTool reads files. FileEditTool makes changes. BashTool runs terminal commands. WebFetchTool pulls information from the internet. AgentTool spawns smaller AI agents to handle subtasks.

Each tool has its own permission gate. Dangerous tools like BashTool require your approval. Safe tools like FileReadTool can run without asking. When Claude Code spawns multiple agents, each one has to request authorization through a central queue before doing anything risky.

What you can do with this

When you ask AI to do something complex, break it into single purpose steps the same way Anthropic does.

Identify the separate jobs. If you're asking AI to "research competitors and write a report," that's actually two different tasks. Research is one job. Writing is another.

Run them separately. Give your AI one clear job at a time. First: "Research the top 5 competitors in my space. For each one, give me their pricing, main features, and biggest weakness." Then after that's done: "Using this research, write a one page competitive analysis."

Add permission checkpoints. Before the AI moves from one step to the next, have it check in with you. "After completing the research step, show me your findings before writing the report."

Turn this into a Claude Code skill

Paste this into Claude Code:

Build me a Claude Code skill called task-decomposer. Save it at ~/.claude/skills/task-decomposer/SKILL.md. The skill should trigger when I'm facing a complex or multi-step task. When invoked, it should ask what the full task is, identify every separate job inside it, order them by dependency, define a checkpoint between each one, then execute them one at a time. After each step, show me the output and get my approval before moving to the next step. Never run multiple jobs at once.

Type /task-decomposer before any complex request and Claude automatically breaks it into focused steps with checkpoints.

3. Work with AI memory instead of against it

What was revealed

Claude Code has a system for deciding what information to keep, what to compress, and what to throw away. This explains why AI sometimes "forgets" what you told it.

MEMORY.md is a lightweight index file that Claude Code keeps loaded at all times. It contains short one line pointers to topic files. Think of it like a table of contents that's always in the AI's head.

Context compression happens in three layers. MicroCompact quietly removes old tool outputs in the background. AutoCompact kicks in near the context limit and writes a summary of up to 20,000 tokens. Full Compact compresses the entire conversation and keeps only the most critical files.

What you can do with this

Front load the important stuff. The beginning and most recent messages survive compression longest. Put your most critical context at the very start of any conversation.

Use a table of contents approach. Give the AI a short summary of what you're working on, then go deeper one topic at a time. This mirrors how MEMORY.md works.

Start fresh conversations for new topics. If you're switching to something completely unrelated, start a new conversation. You get a full context window instead of fighting compressed leftovers.

Restate critical information periodically. If something is critical in a long session, say it again. This pushes it back into recent context where it survives compression.

Turn this into a Claude Code skill

Paste this into Claude Code:

Build me a Claude Code skill called context-manager. Save it at ~/.claude/skills/context-manager/SKILL.md. The skill should trigger when starting long AI sessions, switching topics mid-conversation, or when AI seems to have forgotten earlier context. When invoked, it should ask what the session is about, help me build an opening brief with my identity, project, constraints and non-negotiables, create a table of contents of every topic for the session, agree on when to start a new conversation instead of continuing, then begin with topic one. It should also remind me to restate critical information when sessions get long.

Type /context-manager at the start of any long session and Claude structures everything so it holds onto the right information as the conversation grows.

What is a Claude Code skill

A skill is a markdown file that lives on your computer. When you invoke it, Claude Code reads the file and follows the instructions inside it. Think of it like giving Claude a playbook for a specific type of work.

You invoke a skill by typing /skill-name in Claude Code. Claude reads the playbook and follows it step by step. The three prompts above have Claude build the skills for you automatically. You don't need to create any files yourself.

A guide is one thing. A whole system is what you actually need.

The people saving 20+ hours per week and making $10k+/mo with AI right now are doing more than downloading guides they try to put together to get something that's useful. Instead they're running systems that lock in their AI foundation and give them step by step instructions to get real results right now.

If you are serious about getting real results with AI but don't have a clear path to do it, I built a full system with you in mind. That system is Zero Day AI and this is my invite to come see if it's for you.

Here's what Wendy and Mitch said about Zero Day AI

Wendy's testimonial about Zero Day AI Mitch's testimonial about Zero Day AI

Here's some of the things included in the Zero Day AI system:

01Foundational missions that give AI context about you
Your AI learns who you are, what you do, who you serve, and what you are building. Every mission after this is personalized to your situation.
02Step by step system to find and launch your one big idea
AI walks you through identifying your highest leverage opportunity and builds the plan to launch it. Not a brainstorm. A real launch sequence.
03Personal dashboard with immediate access to every mission
All 75 missions in one place. Search by category, difficulty, or time. Track your progress and pick up where you left off.
04Ground Zero Calibration Report
AI analyzes your intake data and produces a detailed report on where you stand, what to build first, and the fastest path to results.
05AI Revenue Calculator
Input your current numbers. AI models exactly how much time and money you save by automating the tasks you identified in your intake.
06Clone Your Brain portable vault
AI extracts everything it learned about you into a portable file. Take it to any AI tool and it already knows your business, your voice, and your goals.
07Priority Launch Review
After your foundation is set, AI reviews your situation and recommends the exact missions to tackle first based on impact and effort.
08Private community of builders
Connect with other people building real systems with AI. Share wins, ask questions, and see what others are deploying.
09Constant updates on the most important AI developments
AI moves fast. We filter the noise and send you only the developments that actually matter for what you are building.

Want to see everything included in the Zero Day AI system?

Click here