Your Personal AI Assistant โ Runs in Claude Code
A clean-room port of OpenClaw that runs inside Claude Code 17 skills ยท 5 agents ยท 3 install modes ยท ClawHub compatible
Multi-channel AI assistant with web chat, file sharing, voice messages, scheduled tasks,
webhook ingestion, approval workflows, and a skill marketplace โ all running inside Claude Code.
Clone, setup, chat. ๐ฆ
ClawedBack is a clean-room reimplementation of the OpenClaw personal AI assistant platform, rebuilt from the ground up to run inside Claude Code.
Important: ClawedBack is a port, not a fork. It resembles OpenClaw in spirit and functionality โ a multi-channel, self-hosted AI assistant with tool execution, automation, and approval workflows โ but is an entirely separate codebase with a different architecture. No OpenClaw code was used. ๐ฆ
Where OpenClaw is a TypeScript monolith with a WebSocket gateway, ClawedBack flips the script: Claude Code IS the agent runtime. It's Claude Code skills.
Use of this project is subject to Anthropic's Terms of Service.
- Python 3.11+
- tmux (
sudo apt install tmux)
curl -fsSL https://claude.ai/install.sh | bashgit clone https://github.com/reedmayhew18/ClawedBack.git
cd ClawedBacktmux new -s clawedback๐ฆ Mode A: Portable โ User (Recommended)
Best for trying it out, development, or personal use. Safest option.
claude
# then: /oc-setup โ choose Mode A- Python venv inside the project folder
- Runs as your normal user
- Claude asks permission before risky operations (add
--dangerously-skip-permissionsto allow autonomous functionality)
๐ฆ Mode B: Portable โ Root
Best for a dedicated server or VM where the assistant needs elevated access.
sudo -E "$(command -v claude || echo ~/.local/bin/claude)"
# then: /oc-setup โ choose Mode B- Python venv inside the project folder (same as A)
- Runs as root for full system access
- Commands for the regular user:
sudo -u <username> <command> - Still asks permission before destructive operations (add
--dangerously-skip-permissionsfor autonomous mode โ run theIS_SANDBOX=1lines from Mode C first if using this flag)
๐ฆ Mode C: System Install โ Full Root, No Guardrails
Best for sandboxes, VMs, or containers designated for ClawedBack. Not for machines with important data. ๐ฆ
# Set sandbox flag (both user and root)
echo 'export IS_SANDBOX=1' >> ~/.bashrc && source ~/.bashrc
sudo bash -c 'echo "export IS_SANDBOX=1" >> /root/.bashrc'
# Start Claude as root with no permission prompts
sudo -E "$(command -v claude || echo ~/.local/bin/claude)" --dangerously-skip-permissions
# then: /oc-setup โ choose Mode C- System Python directly (
--break-system-packages), no venv - Root with
--dangerously-skip-permissionsโ Claude can do anything without asking - Maximum capability, zero guardrails
WARNING: Only use Mode C on a system that is fully backed up, sandboxed, or designated for this purpose. Claude will have unrestricted root access with no confirmation prompts.
/oc-setup
The wizard handles everything: installs dependencies, starts the server, generates your auth token, offers voice (Whisper) setup, and begins polling. Open the URL it gives you, paste the token, and start chatting. ๐ฆ
To detach tmux (keeps ClawedBack running): Ctrl+B, then D
To reattach later: tmux attach -t clawedback
Restarting After a Reboot
If the tmux session died (reboot, crash, etc.), start a new one and resume:
tmux new -s clawedback
cd /path/to/ClawedBack
claude # (or sudo -E ... for root modes)Then run:
/start
This ensures the server is up, creates the polling cron job, and runs one poll cycle. Run /start whenever you restart Claude Code. ๐ฆ
If the config file is missing (deleted or corrupted), use /oc-resume instead โ it auto-detects and rebuilds the config.
Updating ClawedBack
To pull the latest updates from GitHub:
/oc-update
This fetches upstream changes, shows what's new, and applies them โ preserving your data/, auth token, config, and any custom skills you've installed. If server files changed, it automatically restarts the server. ๐ฆ
- ๐ Web chat interface โ dark theme, mobile-responsive, full markdown rendering
- ๐ File uploads โ drag-and-drop, analyze any file type
- ๐ Organized file system โ date-based storage with temporary share links
- ๐ค Voice messages โ recorded in-browser, transcribed with Whisper (CPU or GPU)
- ๐ Token auth โ auto-generated or custom, single-user security
- ๐๏ธ Message queue โ SQLite with WAL mode, CLI interface for skills
- ๐ก SSE streaming โ fetch-based with auth header, cross-device sync
- โ Read receipts โ green checkmark when Claude reads your message
- ๐ SSL/HTTPS โ
--sslflag, custom cert paths, or free Let's Encrypt via/oc-ssl - ๐ค 17 custom skills โ routing, sessions, approvals, automation, webhooks, file sharing, updates
- โฐ Scheduled tasks โ reminders, recurring jobs, cron expressions
- ๐ Webhook ingestion โ receive events from GitHub, CI, custom services
- โ Approval gates โ single gates and multi-step workflow chains with crash recovery
- ๐งฉ Skill marketplace โ browse ClawHub, import with security scanning
- ๐ Security scanning โ mandatory audit of imported skills (subagent-isolated, 5-category scan)
- ๐บ Channel registry โ extensible adapter system for future platforms
- ๐ Self-updating โ
/oc-updatepulls latest while preserving config/data - ๐ฉบ Self-healing resume โ
/oc-resumeauto-detects setup if config is missing - ๐ฅ๏ธ Three install modes โ user, root, or full root with no guardrails
- ๐ฆ Browser automation (Playwright)
- ๐ฆ Device nodes (remote command execution)
- ๐ฆ TTS voice responses
OpenClaw has 23 built-in tools. Claude Code matches 19 of them out of the box โ and the 4 missing are all API wrappers that can be built as skills. Full mapping in .claude/skills/oc-hub/references/tool-mapping.md. ๐ฆ
| Status | Count | Tools |
|---|---|---|
| โ Direct match | 13 | execโBash, readโRead, writeโWrite, editโEdit, apply_patchโEdit, web_searchโWebSearch, web_fetchโWebFetch, cronโCronCreate, subagentsโAgent, agents_listโTaskList, image analyzeโRead, +Grep, +Glob |
| ๐ง Close match | 6 | code_executionโBash+venv, browserโPlaywright, messageโoc-respond, agent sendโAgent+claude -p, session_statusโTaskGet, ttsโedge-tts |
| โ Missing | 4 | x_search (needs xAI API), image_generate (needs DALL-E), video_generate (niche), canvas (OpenClaw-specific) |
Claude Code actually has tools OpenClaw doesn't: dedicated Grep (ripgrep-powered), Glob (fast pattern matching), multimodal Read (images, PDFs, notebooks), and typed sub-agents with model selection. ๐ฆ
๐ Web UI โ ๐ FastAPI Server โ ๐๏ธ SQLite Queue โ ๐ฆ Claude Code โ ๐ฌ Response
- You chat through a web interface (text, files, or voice ๐ค)
- Python catches it โ FastAPI server queues your message in SQLite
- Claude Code polls โ hybrid polling checks the queue (1min idle / 10s active)
- Claude thinks โ full Claude Code capabilities: tools, web search, code execution, file ops
- Response flows back โ through the queue, via SSE, into your browser
Instead of burning tokens polling an empty queue every 10 seconds, ClawedBack uses a two-speed approach:
| State | Method | Interval | Cost |
|---|---|---|---|
| ๐ด Idle | CronCreate | 1 minute | Minimal |
| ๐ฌ Active | /loop | 10 seconds | Higher, but responsive |
When you send a message, polling escalates to 10s. After 5 minutes of silence, it de-escalates back to 1min. This keeps resource and token usage minimal while maintaining responsive functionality. ๐ฆ
Everything that involves reasoning is a Claude Code skill. Python handles only persistent I/O.
| Layer | What | Why Not a Skill? |
|---|---|---|
| ๐ Python | Web server, SQLite queue, Whisper | Needs persistent sockets/processes |
| ๐ฆ Skills | Routing, sessions, tools, approvals, automation | Claude does this natively |
| ๐ค Agents | Code review, debugging, research | Specialized subagent delegation |
| Skill | Purpose |
|---|---|
oc-poll |
๐ฆ Hybrid polling controller (the heartbeat) |
oc-router |
๐ฆ Message routing and intent dispatch |
oc-session |
๐ฆ Conversation state management |
oc-respond |
๐ฆ Response formatting and queue delivery |
oc-approve |
๐ฆ Approval gate for dangerous operations |
oc-tools |
๐ฆ Tool execution coordinator |
oc-voice |
๐ฆ Voice message processing |
oc-automate |
๐ฆ Scheduled tasks and reminders |
oc-webhook |
๐ฆ Incoming webhook handler |
oc-channel |
๐ฆ Channel adapter registry |
oc-hub |
๐ฆ Skill marketplace with security scanning |
oc-files |
๐ฆ File storage and temporary share links |
oc-setup |
๐ฆ First-run setup wizard |
oc-resume |
๐ฆ Self-healing restart |
oc-update |
๐ฆ Safe upstream updates |
oc-ssl |
๐ฆ Let's Encrypt certificate setup |
oc-token |
๐ฆ Auth token management |
| OpenClaw Concept | ClawedBack Equivalent |
|---|---|
| Gateway (WebSocket) | FastAPI + SQLite queue |
| Agent Runtime (Pi) | Claude Code itself |
| Channels (23+) | Channel adapter skills (web first) |
| ClawHub (marketplace) | oc-hub skill |
| Tools system | Claude Code native tools |
| Approval workflows | oc-approve skill |
| Cron/automation | CronCreate + oc-automate |
| Sessions | oc-session skill + JSON files |
| Voice I/O | Whisper + browser MediaRecorder |
| Device nodes | Planned (via SSH skills) |
| OpenClaw | ClawedBack | |
|---|---|---|
| Architecture | TypeScript monolith | Claude Code skills โ minimal footprint |
| Runtime | Custom Pi agent + WebSocket daemon | Claude Code itself โ no separate runtime |
| Resource usage | Always-on process, persistent connections | Idle polling at 1min, escalates only when active |
| Dependencies | Node.js, npm, 23+ channel adapters | Python (lightweight I/O only), everything else is skills |
| Skills | ClawHub | Claude Code skills (ClawHub-compatible) |
| Setup | npm install + config files |
claude โ /oc-setup |
In short: OpenClaw is a full platform you deploy and run. ClawedBack is a set of Claude Code skills with lightweight I/O โ minimal resources, no background daemons, scales down to near-zero when idle. ๐ฆ
OpenClaw and Claude Code skills share the same base format. Both use the AgentSkills spec โ Markdown with YAML frontmatter in a SKILL.md file. You can import skills from ClawHub directly into ClawedBack. ๐ฆ
/oc-hub import <clawhub-skill-slug-or-url>
All imports undergo a mandatory security scan (isolated subagent, 5-category audit) before installation. ~25% of ClawHub skills contain call-home behavior โ ClawedBack catches and optionally remediates these before they touch your system.
| Field | Action |
|---|---|
name, description |
Kept as-is |
user-invocable, disable-model-invocation |
Kept as-is |
| Markdown body (instructions) | Kept as-is โ it's the same format |
metadata.openclaw (OS gating, binary reqs, installers) |
Stripped (not applicable in Claude Code) |
command-dispatch, command-tool |
Stripped (OpenClaw-specific dispatch) |
allowed-tools |
Added โ inferred from the skill's instructions |
clawed-back/
โโโ ๐ฆ .claude/skills/ # The brain
โ โโโ oc-*/ # OpenClaw-style functions
โ โโโ (toolkit skills) # wizard, tdd, code-review, etc.
โ
โโโ ๐ค .claude/agents/ # Specialist subagents
โโโ ๐ CLAUDE.md # Project config
โโโ ๐ post_install.md # First-run guide
If you want to help:
- Try it out and report issues
- Build a channel adapter (Telegram, Discord, Slack)
- Create skills for the marketplace
- Improve the web UI
All interactions with Claude Code are human-initiated. Recurring tasks use Claude Code's built-in scheduling features (CronCreate, /loop). This project is not affiliated with, endorsed by, or sponsored by Anthropic.
AGPL-3.0
Powered by crabs. ๐ฆ๐ฆ๐ฆ
For questions or concerns, please contact rm28-legal@pm.me