Overview
Use Claude Code inside the Claude Desktop app to build a small programming language step by step (lexer, parser, interpreter or bytecode runtime), with a test suite of example programs that every change must pass before you accept it.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Desktop · Claude Code · Git
- Prerequisites
- Claude Desktop on a plan that includes Claude Code (check yours) and a local Git repository.
How It Works
Write a one-page language specification first: the syntax for variables, functions, conditionals and loops, the value types, and five or six example programs with their expected output. In Claude Desktop, open a Claude Code session on an empty Git repository and give it the specification. Ask for the work in stages: a lexer with tests, then a parser that produces a syntax tree, then a tree-walking interpreter, and only later a bytecode compiler and virtual machine if you want one. At each stage, ask Claude to add the example programs as end-to-end tests and run the whole suite. Review the local code changes in the app before accepting them, read the parts you do not understand with Claude's help, and commit only when all tests pass. Add a new language feature only after the previous one has tests.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Desktop.
- Connect the toolsConnect the tools this workflow relies on: Claude Desktop, Claude Code, Git.
- Check the prerequisitesClaude Desktop on a plan that includes Claude Code (check yours) and a local Git repository.
- Gather your detailsCollect what the prompt asks for: Specification file, Name of your language, Language to implement it in, Stage to build.
- Run the starter promptPaste the starter prompt below into Claude Desktop and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at claude.com before you rely on it.
Practical Starter Prompt: Build the next stage of my toy language
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Read [Specification file]. We are building [Name of your language] in [Language to implement it in]. Implement only the [Stage to build] stage, with unit tests, and add every example program from the specification that this stage can run as an end-to-end test. Run the full test suite and show me the results and a short summary of the design. Wait for my review and approval before committing, and do not start the next stage.Review the code changes in the desktop app and approve the commit only when all tests pass and you understand the design. Move to the next stage with a new prompt.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Anthropic's download page says Claude Code runs directly in the desktop app, where you can preview running servers and review local code changes, and that some features are only available on paid plans. The page does not mention compilers or language runtimes, so how far Claude takes the project and the quality of the generated code depend on your specification, tests and review.
Limitations and Considerations
A language implementation grows quickly; reviewing each stage as it lands is far easier than reading thousands of generated lines at the end. Keep the end-to-end example programs as the definition of correct behaviour and add a test for every bug you find. Check whether Claude Code is included in your Claude plan before you start. Long sessions use more of your plan's usage. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Sources
- Download Claude | Claude by Anthropic (opens in a new tab)
Project documentation · claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Claude Code runs directly in the desktop app; you can preview running servers, review local code changes, and monitor pull request status without leaving the app.
- Claude apps are available to all plan types: Free, Pro, Max, Ultra, Team, and Enterprise. Some features are only available to paid plans.