Yes, Claude Code can decompile itself. Here's the source code.

Yes, Claude Code can decompile itself. Here's the source code.

These LLMs are shockingly good at deobfuscation, transpilation and structure to structure conversions. I discovered this back around Christmas where I asked an LLM to make me an Haskell audio library by transpiling a rust implementation.

An β€œoh fuck” moment in time
Over the Christmas break I’ve been critically looking at my own software development loop, learning a new programming language and re-learning a language I haven’t professionally used in over seven years. It’s now 2025. Software assistants are now a core staple of my day-to-day life as a staff

and here's me using the technique (bellow) to convert an application to a z/80 spectrum tape

Can a LLM convert C, to ASM to specs and then to a working Z/80 Speccy tape? Yes.
Damien Guard nerd sniped me and and other folks wanted more proof that it is now cheap, easy and possible to cheaply rewrite software or clone existing β€œsource available” businesses (see bottom of the post). So, let’s get cracking by creating a toy application by sending this prompt to the

I'm not going to bury the lede, so let's dig right into the real reason why you clicked on this post, here's the source code...

GitHub - ghuntley/claude-code-source-code-transpilation: This is a cleanroom transpilation of the official Claude Code npm package.
This is a cleanroom transpilation of the official Claude Code npm package. - ghuntley/claude-code-source-code-transpilation

What follows in this post is how you can do it yourself and a special surprise insight at the bottom...

Claude Code

The source code for Claude Code is currently "not available". Whilst a GitHub repository has been published, it contains no source code. Claude Code was an unusual announcement to release along side Sonnet 3.7 - I suspect it was/is a marketing gimmick which was built to demonstrate the capability of the new model and to show the world how to build an AI coding agent (and how easy it is) from the creators of the LLM model (they know it best)

GitHub - anthropics/claude-code: Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflo…

Claude Code is authored in TypeScript and was released to NPM. You can install it via..

$ mkdir claude-code && cd claude-code
$ npm i @anthropic-ai/claude-code

After installing the application into a folder you'll be greeted with the following directory structure..

tree 
.
β”œβ”€β”€ node_modules
β”‚   β”œβ”€β”€ @anthropic-ai
β”‚   β”‚   └── claude-code
β”‚   β”‚       β”œβ”€β”€ LICENSE.md
β”‚   β”‚       β”œβ”€β”€ README.md
β”‚   β”‚       β”œβ”€β”€ cli.mjs
β”‚   β”‚       β”œβ”€β”€ package.json
β”‚   β”‚       β”œβ”€β”€ scripts
β”‚   β”‚       β”‚   └── preinstall.js
<snip>
β”œβ”€β”€ package-lock.json
└── package.json

57 directories, 436 files

cli.mjs

This is the meat of the application itself. It is your typical commonjs application which has been compiled from typescript. As part of the process of compilation with Webpack a minifier step combines all the source code into this file and truncates the symbols.

so let's pull it apart

If you want to this at home. Your first task to is open up cli.mjs within your favourite AI coding assistant or even Claude Code itself. Due to the "safety rails and AI alignment" you'll need to strip the top comments from the application otherwise they will kick in unless you use an LLM such as Grok which has no guard rails.

Here's the prompt that I used.

CLI.js is a commonjs typescript application which has been compiled with webpack.
The symbols have been stripped.
Inspect the source code thoroughly (extra thinking) but skip the SentrySDK source code.
Create a specification library of features of the application.
Convert the source code into human readable.
Keep going until you are done!

Because cli.mjs is close to 5mb - which is way bigger than any LLM context window out here. It shouldn't work but it does. You're going to need babysit it for a while and feed it reward tokens of kind words ("your doing good, please continue") and encourage it to keep on going on - even if it gives up. It will time out, lots...

After about two minutes it'll spit out a technical specification which details how the application was built and the features of the application...

At this point it'll timeout for sure. This is when you need to do the "new meta" of asking the LLM to write out the technical specification library. I say new meta because - hi folks - welcome, I haven't talked about this yet publicly yet but the results of this technique when used in combination with the "old meta" are truly absurd. I'll be going deep into this in a follow-up blog post so if you wanna be the first to see it - like, subscribe and click on the bell below below.

Once it has finished dumping out the technical specification library you'll need to feed it this prompt

Now deobfuscate the application.
Split the application into separate files per domain in the SPECS folder.
Provide an overview of the directory structure before starting deobfuscation.
Skip the SENTRYSDK.

After a couple moments you'll be greeted with the skeleton of the deobfuscated outcome...

claude-code/
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE.md
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts                        # Main entry point
β”‚   β”œβ”€β”€ cli.ts                          # CLI argument parsing and commands
β”‚   β”œβ”€β”€ config/                         # Configuration management
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ schema.ts
β”‚   β”‚   └── defaults.ts
β”‚   β”œβ”€β”€ terminal/                       # Terminal interface
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ input.ts
β”‚   β”‚   β”œβ”€β”€ output.ts
β”‚   β”‚   └── rendering.ts
β”‚   β”œβ”€β”€ codebase/                       # Codebase analysis
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ scanner.ts
β”‚   β”‚   β”œβ”€β”€ indexer.ts
β”‚   β”‚   β”œβ”€β”€ search.ts
β”‚   β”‚   └── watcher.ts
β”‚   β”œβ”€β”€ commands/                       # Command processing
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ parser.ts
β”‚   β”‚   β”œβ”€β”€ executor.ts
β”‚   β”‚   └── handlers/
β”‚   β”‚       β”œβ”€β”€ edit.ts
β”‚   β”‚       β”œβ”€β”€ search.ts
β”‚   β”‚       β”œβ”€β”€ explain.ts
β”‚   β”‚       β”œβ”€β”€ git.ts
β”‚   β”‚       └── system.ts
β”‚   β”œβ”€β”€ ai/                             # AI integration
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ client.ts
β”‚   β”‚   β”œβ”€β”€ context.ts
β”‚   β”‚   β”œβ”€β”€ prompts.ts
β”‚   β”‚   └── response.ts
β”‚   β”œβ”€β”€ fileops/                        # File operations
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ reader.ts
β”‚   β”‚   β”œβ”€β”€ writer.ts
β”‚   β”‚   β”œβ”€β”€ diff.ts
β”‚   β”‚   └── vcs.ts
β”‚   β”œβ”€β”€ execution/                      # Command execution
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ shell.ts
β”‚   β”‚   β”œβ”€β”€ sandbox.ts
β”‚   β”‚   └── monitor.ts
β”‚   β”œβ”€β”€ auth/                           # Authentication
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ oauth.ts
β”‚   β”‚   └── tokens.ts
β”‚   β”œβ”€β”€ telemetry/                      # Analytics and telemetry
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ events.ts
β”‚   β”‚   └── reporter.ts
β”‚   β”œβ”€β”€ errors/                         # Error handling
β”‚   β”‚   β”œβ”€β”€ index.ts
β”‚   β”‚   β”œβ”€β”€ types.ts
β”‚   β”‚   β”œβ”€β”€ handlers.ts
β”‚   β”‚   └── formatter.ts
β”‚   └── utils/                          # Utilities
β”‚       β”œβ”€β”€ index.ts
β”‚       β”œβ”€β”€ logger.ts
β”‚       β”œβ”€β”€ async.ts
β”‚       └── formatting.ts
β”œβ”€β”€ scripts/                            # Build and deployment scripts
β”‚   β”œβ”€β”€ build.js
β”‚   └── preinstall.js
└── tests/                              # Test suite
    β”œβ”€β”€ unit/
    β”œβ”€β”€ integration/
    └── fixtures/

Now this is the part where it gets wild. Strap yourself in for another "oh-fuck" moment in time....

As the CLI.js is circa 5Mb in size. What follows is going to require a-lot of patience but the key is to use the following prompt and keep giving it "yeah bb, you doing great. keep going" words of encouragement.

Look at the SPECS library.
Look at CLAUDE-CODE folder.
Look at @CLI.js (do not confuse it with @cli.ts), keep transpiling and implement anything that's not in the SPECS folder that has not been implemented in the CLAUDE-CODE folder.

Seriously, you are going to need to enter that at least 100 times over the next 30 minutes.

that doesn't impress me much...

Deobfuscating [nb. how do we even describe this? Is it deobfuscation?] JavaScript isn't that interesting or impressive though however the resulting source code is highly readable and covers all-the key elements in an coding assistant. We won't know how accurate it is until Anthropic goes through the motions to release the upstream source-code.

Understand dear reader that this technique can be done on any programming language and even from pre-existing binaries themselves. I've transpiled from ASM to specs and achieved below:

Can a LLM convert C, to ASM to specs and then to a working Z/80 Speccy tape? Yes.
Damien Guard nerd sniped me and and other folks wanted more proof that it is now cheap, easy and possible to cheaply rewrite software or clone existing β€œsource available” businesses (see bottom of the post). So, let’s get cracking by creating a toy application by sending this prompt to the

and others have directly converted VB .exe's to Python...

still reading? good it's time for the grand reveal aka what this entire blog post is about...

Now, a sharp mind should have picked up by now the implications of above but I'll spell it out. Using the above technique you can clean-room any software in existence in hours or less.

All those "source available" founders who raised shit-loads-of-cash in the last boom are now screwed, as anyone can re-implement their "proprietary features" which provide them with revenue within hours using the above technique to launch competing startups at lower-operating costs.

All you need is access to their source-code and they have given you the keys to the kingdom on a golden platter by going to market as "commercial open-source" with source-code "protected by restrictive licensing" uploaded directly onto GitHub.

CockroachDB scurries off to proprietary software land
As VC-owned fauxpen source biz yells β€˜show me the money,’ more may follow to the peril of the community

Please understand that restrictive software licenses no longer matter because these LLMs can be driven to behave like Bitcoin mixers that bypass licensing and copyright restrictions using the approach detailed in this blog post.

These zombie companies are about to get harvested if the founders don't "Elon Musk" their companies... fast... especially if they don't have a defensible moat. So, here's to the next generation of builders. May you use these insights wisely and to your advantage. It's an incredible time to be alive if you just do things.

The future belongs to people who can just do things
There, I said it. I seriously can’t see a path forward where the majority of software engineers are doing artisanal hand-crafted commits by as soon as the end of 2026. If you are a software engineer and were considering taking a gap year/holiday this year it would be an

if you aren't losing sleep right now and doing 80+hr weeks of coding right now whyyyyyyyy. there's so much opportunity available right now...

ps. socials for this blog post are below

If you enjoyed reading, give 'em a share please: