ClaudeClaw 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: com.claudeclaw.<dirname> (macOS) / claudeclaw-<dirname> (Linux). For example, if cwd is my-assistant, the service is com.claudeclaw.my-assistant. Determine the correct service name before running service commands below.
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>
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 cd <clone-path> && claude to use developer mode. Remove --plugin-dir from your Claude Code invocation."
Workflow
- Understand the request - Ask clarifying questions
- Plan the changes - Identify files to modify. If a skill exists for the request (e.g.,
/add-telegram for adding Telegram), invoke it instead of implementing manually.
- Implement - Make changes directly to the code
- Test guidance - Tell user how to verify
Key Files
| File |
Purpose |
src/service.ts |
Service entry: loads channels/extensions, starts message loop |
src/index.ts |
Plugin entry: non-blocking, loaded by Claude Code |
src/orchestrator/message-loop.ts |
Core loop: poll, trigger, queue, dispatch agents |
src/orchestrator/config.ts |
STATE_ROOT, paths, trigger pattern, runtime selection |
src/orchestrator/channel-registry.ts |
Channel self-registration |
src/orchestrator/extensions.ts |
Extension system (IPC, DB schema, startup hooks) |
src/orchestrator/types.ts |
TypeScript interfaces (Channel, RegisteredGroup, AgentConfig) |
src/orchestrator/db.ts |
Database initialization and queries |
groups/CLAUDE.md |
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
src/channels/{name}.ts implementing the Channel interface from src/orchestrator/types.ts (see src/channels/whatsapp.ts for reference)
- Add the channel instance to
main() in src/index.ts and wire callbacks (onMessage, onChatMetadata)
- Messages are stored via the
onMessage callback; routing is automatic via ownsJid()
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
src/orchestrator/container-runner.ts for how MCP servers are mounted)
- 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
groups/CLAUDE.md or the group's CLAUDE.md
- For trigger-level routing changes, modify
processGroupMessages() in 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
src/channels/telegram.ts implementing the Channel interface (see src/channels/whatsapp.ts)
- Add the channel to
main() in src/index.ts
- Tell user how to authenticate and test
1---2name: customize3description: 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.4---56# ClaudeClaw Customization78This skill helps users add capabilities or modify behavior. Use AskUserQuestion to understand what they want before making changes.910## Mode Detection1112Check if `.claude-plugin/plugin.json` exists in cwd:13```bash14cat .claude-plugin/plugin.json 2>/dev/null | grep '"name": "claudeclaw"' && echo "DEVELOPER_MODE" || echo "PLUGIN_MODE"15```1617If plugin mode, offer the user a choice via AskUserQuestion:18- **Fork to developer mode (Recommended)** — Clone the repo into a new directory, copy state, full self-improvement and customization19- **Continue in plugin mode** — Limited to channel setup and config changes (no code editing)2021If "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`).2223### Migration: Plugin → Developer Mode24251. AskUserQuestion: "To customize ClaudeClaw fully, you need your own fork. First, fork sbusso/claudeclaw on GitHub. What's your GitHub username?"262. AskUserQuestion: "Where should I clone the repo?" (default: `~/Code/claudeclaw`)27> **Service name:** Derived from the directory name: `com.claudeclaw.<dirname>` (macOS) / `claudeclaw-<dirname>` (Linux). For example, if cwd is `my-assistant`, the service is `com.claudeclaw.my-assistant`. Determine the correct service name before running service commands below.28293. Stop running service (service name derived from current directory name):30 - macOS: `launchctl unload ~/Library/LaunchAgents/com.claudeclaw.<dirname>.plist`31 - Linux: `systemctl --user stop claudeclaw-<dirname>`324. Clone: `git clone https://github.com/<username>/claudeclaw.git <clone-path>`335. Copy state from current data directory: `cp -r store groups .env <clone-path>/`346. AskUserQuestion: "Copy logs too?" If yes: `cp -r logs <clone-path>/`357. Clear stale sessions: `sqlite3 <clone-path>/store/messages.db "DELETE FROM sessions"`368. Install and build: `cd <clone-path> && npm install && npm run build`379. Set up upstream: `cd <clone-path> && git remote add upstream https://github.com/sbusso/claudeclaw.git`3810. Run service setup: `cd <clone-path> && npx tsx setup/index.ts --step service`3911. Print: "Migration complete! Run `cd <clone-path> && claude` to use developer mode. Remove `--plugin-dir` from your Claude Code invocation."4041## Workflow42431. **Understand the request** - Ask clarifying questions443. **Plan the changes** - Identify files to modify. If a skill exists for the request (e.g., `/add-telegram` for adding Telegram), invoke it instead of implementing manually.454. **Implement** - Make changes directly to the code465. **Test guidance** - Tell user how to verify4748## Key Files4950| File | Purpose |51|------|---------|52| `src/service.ts` | Service entry: loads channels/extensions, starts message loop |53| `src/index.ts` | Plugin entry: non-blocking, loaded by Claude Code |54| `src/orchestrator/message-loop.ts` | Core loop: poll, trigger, queue, dispatch agents |55| `src/orchestrator/config.ts` | STATE_ROOT, paths, trigger pattern, runtime selection |56| `src/orchestrator/channel-registry.ts` | Channel self-registration |57| `src/orchestrator/extensions.ts` | Extension system (IPC, DB schema, startup hooks) |58| `src/orchestrator/types.ts` | TypeScript interfaces (Channel, RegisteredGroup, AgentConfig) |59| `src/orchestrator/db.ts` | Database initialization and queries |60| `groups/CLAUDE.md` | Global memory/persona |6162## Common Customization Patterns6364### Adding a New Input Channel (e.g., Telegram, Slack, Email)6566Questions to ask:67- Which channel? (Telegram, Slack, Discord, email, SMS, etc.)68- Same trigger word or different?69- Same memory hierarchy or separate?70- Should messages from this channel go to existing groups or new ones?7172Implementation pattern:731. Create `src/channels/{name}.ts` implementing the `Channel` interface from `src/orchestrator/types.ts` (see `src/channels/whatsapp.ts` for reference)742. Add the channel instance to `main()` in `src/index.ts` and wire callbacks (`onMessage`, `onChatMetadata`)753. Messages are stored via the `onMessage` callback; routing is automatic via `ownsJid()`7677### Adding a New MCP Integration7879Questions to ask:80- What service? (Calendar, Notion, database, etc.)81- What operations needed? (read, write, both)82- Which groups should have access?8384Implementation:851. Add MCP server config to the container settings (see `src/orchestrator/container-runner.ts` for how MCP servers are mounted)862. Document available tools in `groups/CLAUDE.md`8788### Changing Assistant Behavior8990Questions to ask:91- What aspect? (name, trigger, persona, response style)92- Apply to all groups or specific ones?9394Simple changes → edit `src/orchestrator/config.ts`95Persona changes → edit `groups/CLAUDE.md`96Per-group behavior → edit specific group's `CLAUDE.md`9798### Adding New Commands99100Questions to ask:101- What should the command do?102- Available in all groups or main only?103- Does it need new MCP tools?104105Implementation:1061. Commands are handled by the agent naturally — add instructions to `groups/CLAUDE.md` or the group's `CLAUDE.md`1072. For trigger-level routing changes, modify `processGroupMessages()` in `src/index.ts`108109### Changing Deployment110111Questions to ask:112- Target platform? (Linux server, Docker, different Mac)113- Service manager? (systemd, Docker, supervisord)114115Implementation:1161. Create appropriate service files1172. Update paths in config1183. Provide setup instructions119120## After Changes121122Always tell the user:123```bash124# Rebuild and restart125npm run build126# macOS:127launchctl unload ~/Library/LaunchAgents/com.claudeclaw.plist128launchctl load ~/Library/LaunchAgents/com.claudeclaw.plist129# Linux:130# systemctl --user restart claudeclaw131```132133## Example Interaction134135User: "Add Telegram as an input channel"1361371. Ask: "Should Telegram use the same @Andy trigger, or a different one?"1382. Ask: "Should Telegram messages create separate conversation contexts, or share with WhatsApp groups?"1393. Create `src/channels/telegram.ts` implementing the `Channel` interface (see `src/channels/whatsapp.ts`)1404. Add the channel to `main()` in `src/index.ts`1415. Tell user how to authenticate and test