by GPT-AGI
Claude-Code-Python: Reconstructing Claude Code in Python
# Add to your Claude Code skills
git clone https://github.com/GPT-AGI/Clawd-CodeLast scanned: 5/23/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-23T06:33:53.976Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": false
}Clawd-Code is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by GPT-AGI. Claude-Code-Python: Reconstructing Claude Code in Python. It has 484 GitHub stars.
Yes. Clawd-Code 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/GPT-AGI/Clawd-Code" and add it to your Claude Code skills directory (see the Installation section above).
Clawd-Code is primarily written in Python. It is open-source under GPT-AGI 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 Clawd-Code against similar tools.
No comments yet. Be the first to share your thoughts!
English | 中文 | Français | Русский | हिन्दी | العربية | Português
A Complete Python Reimplementation Based on Real Claude Code Source
From TypeScript Source → Rebuilt in Python with ❤️
🔥 Active Development • New Features Weekly 🔥
Clawd Code 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.
Token Streaming + Tool-Aware Agent Loop

Programmable Skill Runtime with Tool Sandboxing

Instant Web Fetch for External Context

Real CLI • Real Usage • Real Community
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!
>>> /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 commandsproviders = ["Anthropic Claude", "OpenAI GPT", "Zhipu GLM"] # + easy to extend
>>> Hello!
Assistant: Hi! I'm Clawd Codex, a Python reimplementation...
>>> /help # Show commands
>>> / # Show all commands & skills
>>> /save # Save session
>>> /multiline # Multi-paragraph input
>>> Tab # Auto-complete
>>> /explain-code qsort.py # Run a skill
clawd # Start REPL
clawd login # Configure API
clawd --version # Check version
clawd config # View settings
| Component | Status | Count |
|---|---|---|
| REPL Commands | ✅ Complete | 6+ built-ins |
| Tool System | ✅ Complete | 30+ tools |
| Automated Tests | ✅ Present | Core suites for skills, providers, REPL, tools, context |
| Documentation | ✅ Complete | 10+ docs |
| System | Status | Description |
|---|---|---|
| CLI Entry | ✅ | clawd, login, config, --version |
| Interactive REPL | ✅ | Rich interactive output, history, tab completion, multiline |
| Multi-Provider | ✅ | Anthropic, OpenAI, GLM support |
| Session Persistence | ✅ | Save/load sessions locally |
| Agent Loop | ✅ | Tool calling loop implementation |
| Skill System | ✅ | SKILL.md-based slash-command skills with args + tool limits |
| Context Building | 🟡 | Initial prompt injection for workspace, git, and CLAUDE.md; deeper project understanding still needed |
| Permission System | 🟡 | Framework exists, needs integration |
| Category | Tools | Status |
|---|---|---|
| File Operations | Read, Write, Edit, Glob, Grep | ✅ Complete |
| System | Bash execution | ✅ Complete |
| Web | WebFetch, WebSearch | ✅ Complete |
| Interaction | AskUserQuestion, SendMessage | ✅ Complete |
| Task Management | TodoWrite, TaskManager, TaskStop | ✅ Complete |
| Agent Tools | Agent, Brief, Team | ✅ Complete |
| Configuration | Config, PlanMode, Cron | ✅ Complete |
| MCP | MCP tools and resources | ✅ Complete |
| Others | LSP, Worktree, Skill, ToolSearch | ✅ Complete |
See FEATURE_LIST.md for detailed feature status and PR guidelines.
git clone https://github.com/GPT-AGI/Clawd-Code.git
cd Clawd-Code
# Create venv (uv recommended)
uv venv --python 3.11
source .venv/bin/activate
# Install
uv pip install -r requirements.txt
python -m src.cli login
This flow will:
The configuration file is saved in in ~/.clawd/config.json. Example structure:
{
"default_provider": "glm",
"providers": {
"anthropic": {
"api_key": "base64-encoded-key",
"base_url": "https://api.anthropic.com",
"default_model": "claude-sonnet-4-20250514"
},
"openai": {
"api_key": "base64-encoded-key",
"base_url": "https://api.openai.com/v1",
"default_model": "gpt-4"
},
"glm": {
"api_key": "base64-encoded-key",
"base_url": "https://open.bigmodel.cn/api/paas/v4",
"default_model": "glm-4.5"
}
}
}
python -m src.cli # Start REPL
python -m src.cli --help # Show help
That's it! Start chatting with AI in 3 steps.
| Command | Description |
|---|---|
/ |
Show commands & skills |
/help |
Show all commands |
/save |
Save session |
/load <id> |
Load session |
/multiline |
Toggle multiline mode |
/clear |
Clear history |
/exit |
Exit REPL |
Skills are markdown-based slash commands stored under .clawd/skills. Each skill lives in its own directory and must be named SKILL.md.
1) Create a project skill
Create:
<project-root>/.clawd/skills/<skill-name>/SKILL.md
Example:
---
description: Explains code with diagrams and analogies
when_to_use: Use when explaining how code works
allowed-tools:
- Read
- Grep
- Glob
arguments: [path]
---
Explain the code in $path. Start with an analogy, then draw a diagram.
2) Use it in the REPL
❯ /
❯ /<skill-name> <args>
Example:
❯ /explain-code qsort.py
Notes
~/.clawd/skills/<skill-name>/SKILL.mdallowed-tools controls which tools the skill can use.$ARGUMENTS, $0, $1, or named args like $path (from arguments).$path, not ${path}.clawd login guides youClawd-Code/
├── src/
│ ├── cli.py # CLI entry
│ ├── providers/ # LLM providers
│ ├── repl/ # Interactive REPL
│ ├── skills/ # SKILL.md loading and creation
│ └── tool_system/ # Tool registry, loop, validation
├── tests/ # Core test suite
├── .clawd/
│ └── skills/ # Project-local custom skills
└── FEATURE_LIST.md # Current feature s