Claude Code full Python rebuild. AI Coding Agent in 230K LoC pure Python! Support new Z.ai GLM-5.2 !
# Add to your Claude Code skills
git clone https://github.com/agentforce314/clawcodexLast scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:16:26.538Z",
"npmAuditRan": true,
"pipAuditRan": false
}clawcodex is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by agentforce314. Claude Code full Python rebuild. AI Coding Agent in 230K LoC pure Python! Support new Z.ai GLM-5.2 !. It has 633 GitHub stars.
Yes. clawcodex passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/agentforce314/clawcodex" and add it to your Claude Code skills directory (see the Installation section above).
clawcodex is primarily written in Python. It is open-source under agentforce314 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 clawcodex against similar tools.
No comments yet. Be the first to share your thoughts!
English | 中文 | Français | Русский | हिन्दी | العربية | Português
A production-oriented Python rebuild of Claude Code — real architecture, reliable CLI agent
Ported from the TypeScript reference implementation and extended with a Python-native runtime
🔥 Active Development • New Features Weekly 🔥

git clone https://github.com/agentforce314/clawcodex.git
cd clawcodex
python3 -m venv .venv && source .venv/bin/activate # Python 3.10+
pip install -r requirements.txt
python -m src.cli login # writes config to ~/.clawcodex/config.json
python -m src.cli --dangerously-skip-permissions # start the REPL
zai provider for Z.ai's OpenAI-compatible GLM Coding Plan (https://api.z.ai/api/coding/paas/v4), shipping GLM-5.1 and the GLM-5.2 preview; GLM-5.2 delivers coding capability comparable to Claude Opus 4.7. First app built end-to-end with GLM-5.2 — a FIFA World Cup 2026 intro page (animated hero + live countdown, three host nations, 16 stadiums, tournament format, and record-breaking facts)./deep-research, and the Tavily web-tooling refresh)./deep-research (#262–#264, #266–#271) — Python workflow engine core (agent()/parallel()/pipeline()/phase(), journaling, resume) wired end-to-end: Workflow tool, /workflows TUI dialog + status-line pill, per-agent retry, worktree isolation, result delivery, and the bundled /deep-research harness registered as a slash command. Reliability: LLM read timeout applied centrally to all openai-compatible providers (#269), parallel agents no longer serialize on the event loop (#270), and the deep-research synthesize step forbids tools so the report-writer can't loop (#271). Follow-ups: workflow max-turns cap fix (#272), deep-research verdict-enum fix (#273), rich /workflows live monitor with phase progress + per-agent stats (#287)./theme, /effort, /model, /logo, /mcp, /tasks, /diff, /export, /output-style, /statusline, /release-notes, /copy, /vim, /memory, /stickers, and /rename, built on a new prompt-text primitive and interactive command bridge; skill registration and model tool-exposure wiring; the session-persistence producer (SessionPersister + agent-bridge wiring); plus extended thinking support (#249) and a model error-swallow fix (#250)./buddy companion subsystem and the CLI transport layer).WebSocketTransport / SerialBatchEventUploader write path with hybrid dispatch. Plus the CLI transport factory, coalescing worker-state uploader, and RemoteIO bridge (#226); new /buddy virtual-companion command — hatch / pet / status / mute (#225).src/tool_system/agent_loop.py consolidation into src/query/query.py)./advisor token-efficient coding mode (#181–#193) — pair a cheap worker (haiku-4-5, $1/$5 per Mtok) with an expensive reviewer (opus-4-7, $5/$25) consulted only at decision points; ~6× cheaper than opus-only on typical sessions. Explicit <provider>:<model> syntax, cross-provider routing (e.g. deepseek/deepseek-v4-pro worker + claude-opus-4-7 advisor via litellm), and live worker/advisor token + USD cost in the status bar.📚 Older items have moved to the full News archive.
ClawCodex is a production-oriented Python rebuild of Claude Code, ported from the real TypeScript architecture and shipped as a working CLI agent, not just a source dump.
A real Claude Code-style terminal workflow in Python: stream replies, call tools, fetch context, and extend behavior with skills.
🚀 Try it now! Fork it, modify it, make it yours! Pull requests welcome!
clawcodex outperforms openclaude on the same model
On the full SWE-bench Verified split (499 instances, the public agent-coding leaderboard), both agents driven by Gemini 2.5 Pro under our standardized harness:
| Agent | Resolved | Unresolved | Error |
|---|---|---|---|
| clawcodex | 291 / 499 (58.2%) | 124 | 84 |
| openclaude | 265 / 499 (53.0%) | 144 | 90 |
Reproduce locally — see eval/README.md for the full workflow (cumulative batching, --predict-workers N, --capture-traces).
View star history on star-history.com
>>> /stream on
>>> Explain tests/test_agent_loop.py
[streaming answer...]
• Read (tests/test_agent_loop.py) running...
↳ lines 1-180
>>> /render-last
/stream toggle for live output and /render-last for clean Markdown re-rendering on demand---
description: Explain code with diagrams and analogies
allowed-tools:
- Read
- Grep
- Glob
arguments: [path]
---
Explain the code in $path. Start with an analogy, then draw a diagram.
SKILL.md slash commandsClawCodex’s main advantage is multi-provider support: while Claude Code targets Claude models, we aim to support every major LLM provider behind the same agent runtime—so you can swap vendors, regions, and price tiers without giving up tools, skills, or the coding loop. That flexibility is what makes agentic coding practical at scale.
providers = ["anthropic", "openai", "glm", "minimax", "openrouter", "deepseek"] # OpenAI-compatible & GLM APIs; more can be added
The default interactive UI is the inline prompt_toolkit + Rich REPL (transcript in scrollback, tool-aware status row). Use clawcodex --tui or the /tui slash command inside the REPL to launch the Textual in-app experience when you want it.
>>> Hello!
Assistant: Hi! I'm ClawCodex, a Python reimplementation...
>>> /help # Show commands
>>> /tools # List registered tools
>>> /tui # Hand off to the Textual TUI
>>> /stream on # Live response rendering
>>> /save # Save session
>>> Tab # Auto-complete
>>> /explain-code qsort.py # Run a SKILL.md skill (or /skill …)
# Multi-line input: Shift+Enter, Meta/Al