Claudeclaw customize
Add new capabilities or modify ClaudeClaw behavior. Use when user wants to add channels (Telegram, Slack, email input), change triggers, add integrations, modify the router, or make any other customizations. This is an interactive skill that asks questions to understand what the user wants.
git clone https://github.com/sbusso/claudeclaw
T=$(mktemp -d) && git clone --depth=1 https://github.com/sbusso/claudeclaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/customize" ~/.claude/skills/sbusso-claudeclaw-customize && rm -rf "$T"
skills/customize/SKILL.mdClaudeClaw Customization
This skill helps users add capabilities or modify behavior. Use AskUserQuestion to understand what they want before making changes.
Mode Detection
Check if
.claude-plugin/plugin.json exists in cwd:
cat .claude-plugin/plugin.json 2>/dev/null | grep '"name": "claudeclaw"' && echo "DEVELOPER_MODE" || echo "PLUGIN_MODE"
If plugin mode, offer the user a choice via AskUserQuestion:
- Fork to developer mode (Recommended) — Clone the repo into a new directory, copy state, full self-improvement and customization
- Continue in plugin mode — Limited to channel setup and config changes (no code editing)
If "Fork to developer mode" is chosen, run the migration flow below. Otherwise, proceed with the normal workflow (limited to invoking existing skills like
/add-slack, /add-telegram).
Migration: Plugin → Developer Mode
- AskUserQuestion: "To customize ClaudeClaw fully, you need your own fork. First, fork sbusso/claudeclaw on GitHub. What's your GitHub username?"
- AskUserQuestion: "Where should I clone the repo?" (default:
)~/Code/claudeclaw
Service name: Derived from the directory name:
(macOS) /com.claudeclaw.<dirname>(Linux). For example, if cwd isclaudeclaw-<dirname>, the service ismy-assistant. Determine the correct service name before running service commands below.com.claudeclaw.my-assistant
- Stop running service (service name derived from current directory name):
- macOS:
launchctl unload ~/Library/LaunchAgents/com.claudeclaw.<dirname>.plist - Linux:
systemctl --user stop claudeclaw-<dirname>
- macOS:
- Clone:
git clone https://github.com/<username>/claudeclaw.git <clone-path> - Copy state from current data directory:
cp -r store groups .env <clone-path>/ - AskUserQuestion: "Copy logs too?" If yes:
cp -r logs <clone-path>/ - Clear stale sessions:
sqlite3 <clone-path>/store/messages.db "DELETE FROM sessions" - Install and build:
cd <clone-path> && npm install && npm run build - Set up upstream:
cd <clone-path> && git remote add upstream https://github.com/sbusso/claudeclaw.git - Run service setup:
cd <clone-path> && npx tsx setup/index.ts --step service - Print: "Migration complete! Run
to use developer mode. Removecd <clone-path> && claude
from your Claude Code invocation."--plugin-dir
Workflow
- Understand the request - Ask clarifying questions
- Plan the changes - Identify files to modify. If a skill exists for the request (e.g.,
for adding Telegram), invoke it instead of implementing manually./add-telegram - Implement - Make changes directly to the code
- Test guidance - Tell user how to verify
Key Files
| File | Purpose |
|---|---|
| Service entry: loads channels/extensions, starts message loop |
| Plugin entry: non-blocking, loaded by Claude Code |
| Core loop: poll, trigger, queue, dispatch agents |
| STATE_ROOT, paths, trigger pattern, runtime selection |
| Channel self-registration |
| Extension system (IPC, DB schema, startup hooks) |
| TypeScript interfaces (Channel, RegisteredGroup, AgentConfig) |
| Database initialization and queries |
| Global memory/persona |
Common Customization Patterns
Adding a New Input Channel (e.g., Telegram, Slack, Email)
Questions to ask:
- Which channel? (Telegram, Slack, Discord, email, SMS, etc.)
- Same trigger word or different?
- Same memory hierarchy or separate?
- Should messages from this channel go to existing groups or new ones?
Implementation pattern:
- Create
implementing thesrc/channels/{name}.ts
interface fromChannel
(seesrc/orchestrator/types.ts
for reference)src/channels/whatsapp.ts - Add the channel instance to
inmain()
and wire callbacks (src/index.ts
,onMessage
)onChatMetadata - Messages are stored via the
callback; routing is automatic viaonMessageownsJid()
Adding a New MCP Integration
Questions to ask:
- What service? (Calendar, Notion, database, etc.)
- What operations needed? (read, write, both)
- Which groups should have access?
Implementation:
- Add MCP server config to the container settings (see
for how MCP servers are mounted)src/orchestrator/container-runner.ts - Document available tools in
groups/CLAUDE.md
Changing Assistant Behavior
Questions to ask:
- What aspect? (name, trigger, persona, response style)
- Apply to all groups or specific ones?
Simple changes → edit
src/orchestrator/config.ts
Persona changes → edit groups/CLAUDE.md
Per-group behavior → edit specific group's CLAUDE.md
Adding New Commands
Questions to ask:
- What should the command do?
- Available in all groups or main only?
- Does it need new MCP tools?
Implementation:
- Commands are handled by the agent naturally — add instructions to
or the group'sgroups/CLAUDE.mdCLAUDE.md - For trigger-level routing changes, modify
inprocessGroupMessages()src/index.ts
Changing Deployment
Questions to ask:
- Target platform? (Linux server, Docker, different Mac)
- Service manager? (systemd, Docker, supervisord)
Implementation:
- Create appropriate service files
- Update paths in config
- Provide setup instructions
After Changes
Always tell the user:
# Rebuild and restart npm run build # macOS: launchctl unload ~/Library/LaunchAgents/com.claudeclaw.plist launchctl load ~/Library/LaunchAgents/com.claudeclaw.plist # Linux: # systemctl --user restart claudeclaw
Example Interaction
User: "Add Telegram as an input channel"
- Ask: "Should Telegram use the same @Andy trigger, or a different one?"
- Ask: "Should Telegram messages create separate conversation contexts, or share with WhatsApp groups?"
- Create
implementing thesrc/channels/telegram.ts
interface (seeChannel
)src/channels/whatsapp.ts - Add the channel to
inmain()src/index.ts - Tell user how to authenticate and test