by drawthingsai
Source code of Local Code, a private AI agent for Mac, iPad and iPhone. Runs DeepSeek 4.1 on device, with Python, Node.js and a shell built into the app.
# Add to your Claude Code skills
git clone https://github.com/drawthingsai/local-code-communityGuides for using ai agents skills like local-code-community.
See how local-code-community compares with popular alternatives.
local-code-community is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by drawthingsai. Source code of Local Code, a private AI agent for Mac, iPad and iPhone. Runs DeepSeek 4.1 on device, with Python, Node.js and a shell built into the app. It has 55 GitHub stars.
local-code-community's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/drawthingsai/local-code-community" and add it to your Claude Code skills directory (see the Installation section above).
local-code-community is primarily written in C. It is open-source under drawthingsai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh local-code-community against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Local Code is a private AI agent for Mac, iPad and iPhone, written mostly in Swift. It puts three things in one app: an LLM inference engine for Apple Silicon, a coding harness tuned to each model, and an agent runtime with Python, Node.js, a shell and other familiar tools built in. With these, the agent can work through whole tasks on files you choose, such as analyzing data, charting it, writing documents and slide decks, or building software.
With an on-device quasi-frontier model, such as DeepSeek 4.1 Flash 1017, inference runs on your device and works offline. You can also pick a cloud model from Anthropic, OpenAI, OpenRouter or an OpenAI-compatible server. When you do, your prompts, file contents and tool output go to that provider. Either way, the agent's tools run inside the app's sandbox and can reach only the folders you allow.
Download Local Code from getlocalcode.app.
This repository contains the source code of the app and its command-line tools, along with the libraries and vendored dependencies they are built from.
An agent that does real work needs more than an inference engine, a harness and a model. It also needs what people expect from well-made software:
The engine and the model still matter, and the rest of this section covers them: the models, the sandbox the agent works in, and how fast and how accurately the models run.
Local Code downloads its own quantized checkpoints of each model:
| Model | Quantizations | Input | Download size |
|---|---|---|---|
| DeepSeek 4.1 Flash 1017 | 2-bit S, 3-bit S | Text and images | 376 GB, 412 GB |
| DeepSeek 4 Flash 0731 | 2-bit S | Text | 89.4 GB |
| Qwen 3.8 27B | 2-bit S, 4-bit S, 8-bit S | Text and images | 9.6 GB, 21.3 GB, 29.2 GB |
The DeepSeek 4.1 Flash 1017 sizes include a 203 GB engram file, which both of its quantizations share.
The DeepSeek models are mixtures of experts, and they are larger than the memory of most Macs. For example, the DeepSeek 4.1 Flash 1017 (2-bit S) checkpoint is about 173 GB. Local Code keeps as many of the most used experts in memory as there is room for, and streams the rest from disk. It also leaves room for the other apps you run. The experts kept in memory never take more than the Mac's memory minus 32 GB, or more than 72% of the memory that is free when the model loads. So these models run on Macs with less memory than the checkpoint, run faster the more memory there is, and leave the rest of the Mac usable.
During setup, Local Code suggests a model based on the device's memory:
You can switch to any model later.
Local Code doesn't run the agent's commands as separate programs on your computer. The shell, the language runtimes and the command-line tools are compiled into the app and run in its own process, inside Apple's App Sandbox. On a Mac, the Hardened Runtime also protects the app's code. The agent has no full-disk access, and it can't launch other programs on your computer, so it can't run native programs that aren't built into the app.
Each project is a folder inside a workspace that you choose. The agent starts in the project folder and can read and write anywhere in the workspace, plus the app's temporary folder. Packages and caches that the agent installs for a project stay in that project's folder. Commands that use the network, such as web search, curl and ssh, connect out when the agent runs them.
The sandbox includes:
grep, sed, awk, find, diff, rg, jq, zip, curl, git and ssh.pip for more.npm and npx.office command, to convert and render Word, Excel, PowerPoint and PDF files. Also FFmpeg, plus html2video and hyperframes to make videos from HTML.calendar to read and edit events, and photos to find, import, edit and organize photos and videos. On a Mac, notes, mail and imessage also read Notes, Mail and Messages, but they can't change or send anything. Each command works only after you grant access.Built-in skills show the agent how to use these tools for common work:
| Skill | Use |
|---|---|
office |
Create, read, edit and check Word, PowerPoint and Excel files and CSV or TSV tables, and export them to PDF or images |
answers-charts |
Draw data charts with Python and Matplotlib, shown inline in the answer |
hyperframes |
Make motion graphics and timed HTML compositions, such as animated text, captions and slideshows, and render them to video |
use-draw-things-cli |
Generate and edit images, and create videos, with the Draw Things CLI |
use-web-browse-cli |
Drive the WebKit browser to test pages, or to use sites that need JavaScript or a sign-in |
deploy-static-site-with-wrangler |
Publish a folder of static web files to a temporary public URL with Cloudflare Wrangler |
use-mcp-with-mcporter |
Connect to Model Context Protocol servers and call their tools through MCPorter |
check_lean-and-lean-tools |
Prove non-obvious claims about code, such as ones about recursive functions or data structures, with Lean |
skill-creator |
Create, import, update and validate skills |
introduce-local-code |
Explain what Local Code is and what the agent can do |
You can add your own skills to a project's .agents/skills folder.
Speeds are in tokens per second, given as prefill / decode. Each column starts with that much context already in use. On top of it, Local Code prefills one more full chunk, and separately decodes 128 tokens. A chunk is the most Local Code prefills at once on that Mac: 4,096 tokens on the M5 Max, and 8,192 on the M5 Ultra.
M5 Max, 128 GB
| Model | 8K already in context | 16K already in context | 32K already in context | 128K already in context |
|---|---|---|---|---|
| Qwen 3.8 27B (4-bit S) | 1,450 / 40.4 | 1,296 / 35.0 | 1,005 / 27.9 | 456 / 13.5 |
| DeepSeek 4 Flash 0731 (2-bit S) | 1,361 / 42.3 | 1,316 / 41.7 | 1,237 / 40.9 | 924 / 36.7 |
| DeepSeek 4.1 Flash 1017 (2-bit S) | 346 / 18.7 | 339 / 17.1 | 339 / 17.2 | 355 / 15.7 |
On the M5 Max, the DeepSeek 4.1 Flash 1017 readings set Weights Streaming to 56 GiB (--weights-streaming 56 in the CLI). DeepSeek 4 Flash 0731 keeps all of its weights in memory.
M5 Ultra, 256 GB
| Model | 8K already in context | 16K already in context | 32K already in context | 128K already in context |
|---|---|---|---|---|
| Qwen 3.8 27B (4-bit S) | 2,689 / 54.5 | 2,247 / 44.0 | 1,988 / 33.2 | 962 / 12.2 |
| DeepSeek 4 Flash 0731 (2-bit S) | 3,384 / 56.2 | 3,265 / 55.9 | 3,039 / 54.7 | 2,087 / 50.4 |
| DeepSeek 4.1 Flash 1017 (2-bit S) | 4,600 / 58.9 | 4,507 / 58.6 | 4,431 / 57.9 | 3,840 / 56.1 |
On the M5 Ultra, both DeepSeek readings are a second pass in the same session, without the 20-second cool-down before each prefill. For DeepSeek 4.1 Flash 1017, its engram entries are also already in memory.
This chart compares DeepSeek 4.1 Flash 1017 prefill speed on the same M5 Ultra in Local Code, in MLX-Serve v26.10.3 with the iQ-MLX 3.0bpw checkpoint, and in oMLX 0.7.2 with the oQ2.5e checkpoint. Each reading times only the prefill of an 8,192-token chunk on top of the given amount of context. The Local Code readings come from the same runs as the table above, and the MLX-Serve and oMLX readings, both with CED on, are medians of three runs. The label above each Local Code point is how much faster it is than the faster of MLX-Serve and oMLX at that context length.
Speeds are in tokens per second.
| Context in use | Local Code (2-bit S) | MLX-Serve v26.10.3 (iQ-MLX 3.0bpw) | oMLX 0.7.2 (oQ2.5e) |
|---|---|---|---|
| 0 | 4,547 | 1,945 | 1,529 |
| 8K | 4,600 | 1,900 | 1,653 |
| 16K | 4,507 | 1,706 | 1,615 |
| 32K | 4,431 | 1,217 |