Analysis updated 2026-05-18
Compile a small C program where an AI generates the assembly output for fun or experimentation.
Write plain-English magic blocks inside C code and have Claude fill in the implementation.
Run the surprise.c example to see a randomly generated program produced by the model.
| ascpixi/claudec | alx-code/lingbot-video-1.3b-fp8 | andrevicencio/tmux-flash | |
|---|---|---|---|
| Stars | 7 | 7 | 7 |
| Language | Python | Python | Python |
| Setup difficulty | easy | — | easy |
| Complexity | 2/5 | — | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Python, Claude Code, the Claude Agent SDK, and an active Claude subscription.
claudec is a joke project that replaces a normal C compiler with Claude itself. It is a Python script that hands your C source code to Claude and asks it to produce assembly, instead of using a traditional compiler like gcc or clang. Because an AI model is doing the compiling rather than following fixed rules, the author is upfront that all behavior is undefined when you use it. The project's main feature is a compiler extension called magic, which lets you write a block of plain English inside your C code and have claudec turn that description into working code. For example, you can describe wanting the next number in the Fibonacci sequence printed, and claudec will generate code that does it. The magic blocks work in languages other than English too, including Chinese, since the underlying model just needs to understand the instruction. The README includes a benchmark table comparing claudec to gcc, showing that a small hello world program that compiles in under 300 milliseconds with gcc takes about 21 seconds with claudec, and slightly larger programs take well over a minute. This is presented with humor rather than as a competitive claim. To use it you need Python, Claude Code installed, the Claude Agent SDK Python package, and an active Claude subscription, since the compiler calls out to Claude to do its work. Running it looks like calling the script with a C file and an output path, similar to how you would invoke a real compiler. The examples folder includes a file called surprise.c that just asks the model to create something wacky, and running it produces a different silly program each time, such as an ASCII art Mandelbrot renderer or a bouncing ball animation with fun facts. The README closes with a clear warning that this is a joke project which will consume real API tokens or subscription usage every time you compile something, and it is not meant to be used as an actual production compiler.
claudec is a joke C compiler that uses Claude to translate C code, including plain-English magic blocks, into assembly instead of a real compiler.
Mainly Python. The stack also includes Python, Claude Agent SDK, C.
No license information is provided in the README.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.