Openclaw Starter Kit

作者 @mlamla123

Jumpstart OpenClaw projects with a ready-to-use dev environment, custom webchat UI, persistent memory, SQLite chat storage, and modular AI agent skills.

README

OpenClaw Starter Kit

An enhanced workspace for OpenClaw with a custom webchat UI, persistent session memory, and development skills.

What You Get

  • mychat2 — Custom webchat UI replacing the default OpenClaw control panel
    • Multiple chat sessions with sidebar navigation
    • Telegram group topics as sessions (bidirectional)
    • Persistent message history (survives gateway restarts)
    • Auto-save & auto-refresh when context gets full (no more lost work)
    • Voice input (Whisper), audio playback, file attachments
    • Session memory — each session saves its own state to files
  • Skills — Reusable AI agent capabilities
    • project-dev — Structured dev workflow: brainstorm → plan → implement → review
    • session-memory — Persistent memory across compactions and restarts
    • ui-ux-pro-max — Design system generator (67 styles, 96 palettes)
    • brand-studio — Brand identity creation
    • browser-qa — Automated browser testing with evidence
    • name-forge — Product/company name generation + validation
    • And more (see skills/ directory)
  • chat-db — Local SQLite server for message persistence
  • Scripts — Gateway patching, coding agent tracker, session checkpoints

Prerequisites

  • OpenClaw installed and running (npm install -g openclaw)
  • Node.js 20+
  • At least one AI provider API key (Anthropic, OpenAI, etc.) configured in OpenClaw

Quick Start

# 1. Clone into your OpenClaw workspace
cd ~/.openclaw/workspace
git clone https://github.com/mlamla123/openclaw-starter-kit.git .

# 2. Run setup
bash setup.sh

# 3. Open mychat2
open http://127.0.0.1:18789/mychat2.htm

That's it. You should see the enhanced webchat UI.


Manual Installation

If you prefer to install step by step:

Step 1: Copy files to workspace

cd ~/.openclaw/workspace

# Skills are auto-loaded from workspace/skills/ — they're already in place after clone

Step 2: Patch the gateway

bash scripts/patch-gateway.sh

⚠️ Your OpenClaw agent may warn about security risks. See Gateway Patching — Security below for a full explanation.

Step 3: Start chat-db (message persistence)

cd chat-db
npm install
node server.js &

To run chat-db as a persistent service (macOS):

cp scripts/com.openclaw.chat-db.plist ~/Library/LaunchAgents/
# Edit the plist to match your paths, then:
launchctl load ~/Library/LaunchAgents/com.openclaw.chat-db.plist

Step 4: Open mychat2

Navigate to http://127.0.0.1:18789/mychat2.htm


API Keys

KeyWhat it doesRequired?
Chat model key (Anthropic/OpenAI/etc.)Powers AI conversations✅ Yes — at least one
OPENAI_API_KEYVoice-to-text (Whisper) for mic buttonOptional
ANTHROPIC_API_KEYClaude Code for background codingOptional
ELEVENLABS_API_KEYText-to-speech voice outputOptional

Configure keys in ~/.openclaw/openclaw.json under env, or set as environment variables.


Gateway Patching — Security

What does the patch do?

The patch-gateway.sh script makes small modifications to the OpenClaw gateway so it can serve mychat2. Here's exactly what it changes and why:

ChangeWhatWhyRisk
Add .htm extensionAdds .htm to the static file whitelistGateway only serves known extensions; .htm isn't included by defaultNone — just adds a file type
Content-Type mappingMaps .htmtext/htmlSo the browser renders it as HTMLNone
unsafe-inline in CSPAdds 'unsafe-inline' to script-srcmychat2 is a single-file app with inline <script> — strict CSP blocks itLow — see below
connect-src localhostAllows connections to localhost:18787mychat2 needs to reach chat-db for message persistenceNone — localhost only
Copy mychat2.htmCopies the file into gateway's static directorySo it's served at /mychat2.htmNone

Why your agent warns you

OpenClaw agents flag sed edits to system files as potentially dangerous — and that's a good instinct! The patch modifies gateway-cli-*.js (a core gateway file). Your agent is being cautious.

To proceed: Tell your agent it's safe to run, or run bash scripts/patch-gateway.sh manually in a terminal (outside the agent).

About unsafe-inline

This is the only change with any real security implication. Here's why it's fine for this use case:

  • The gateway runs on localhost only (127.0.0.1:18789) — not exposed to the internet
  • ✅ No untrusted third-party content is loaded
  • ✅ The CSP change only affects YOUR local gateway
  • ✅ An XSS attack would require local machine access — at which point the attacker already has full control

Why we need it: mychat2 is a single HTML file with inline JavaScript for simplicity. The proper alternative would be splitting JS into a separate file with CSP nonces, but that adds complexity for a local-only tool.

If you're uncomfortable: You can skip the patch entirely and use the default OpenClaw control UI — you'll just miss the enhanced features.

How to undo

# Reinstall OpenClaw to restore original gateway files
npm install -g openclaw

# Remove auto-patcher if installed
launchctl unload ~/Library/LaunchAgents/com.openclaw.patch-gateway.plist 2>/dev/null
rm -f ~/Library/LaunchAgents/com.openclaw.patch-gateway.plist

Auto-patching after updates

When you update OpenClaw (npm update -g openclaw), gateway files get overwritten. The setup script installs a launchd watcher that re-applies the patch automatically. If something breaks, just run:

bash scripts/patch-gateway.sh

Telegram Topics Integration

If you use Telegram with OpenClaw, your group forum topics automatically appear as separate sessions in mychat2.

Setup: Configure Telegram in your OpenClaw config as normal. Forum topics sync to mychat2 after the first message in each topic.

  • Topic 1 is always named "General"
  • Other topics show as "Topic <id>" — rename them in the sidebar
  • Messages are bidirectional: type in mychat2 → sends to Telegram topic
  • Each topic gets its own session memory (memory/sessions/tg-topic-<id>/)

Included Skills

SkillDescription
session-memoryPersistent memory across context compactions and restarts
project-devStructured dev: brainstorm → plan → implement (Claude Code) → review
ui-ux-pro-maxDesign system generator (colors, fonts, layouts, 13 framework stacks)
brand-studioFull brand identity creation (strategy, naming, logos, style guides)
browser-qaAutomated browser QA testing with screenshot evidence
name-forgeProduct/company naming with domain, trademark, and social checks
cloudflareManage Workers, KV, DNS, Tunnels, R2 via API
voice-agentOpenAI Realtime speech-to-speech voice interface

Skills are loaded automatically by OpenClaw from the skills/ directory.


Project Structure

├── mychat2.htm              # Enhanced webchat UI
├── setup.sh                  # One-command installer
├── chat-db/
│   ├── server.js             # SQLite message persistence server
│   └── package.json
├── skills/                   # AI agent skills (auto-loaded by OpenClaw)
│   ├── session-memory/
│   ├── project-dev/
│   ├── ui-ux-pro-max/
│   ├── brand-studio/
│   ├── browser-qa/
│   ├── name-forge/
│   └── ...
├── scripts/
│   ├── patch-gateway.sh      # Gateway patcher (serves mychat2)
│   ├── coding-agent-tracker.py
│   └── com.openclaw.chat-db.plist
└── README.md

Troubleshooting

mychat2 shows a blank page:

  • Run bash scripts/patch-gateway.sh and refresh
  • Check gateway is running: openclaw gateway status

Messages disappear on restart:

  • Make sure chat-db is running: curl http://localhost:18787/api/sessions
  • If empty, start it: cd chat-db && node server.js &

Agent warns about security when patching:

Telegram topics not showing:

  • Telegram bot must be configured in OpenClaw
  • Send a message in the topic first (sessions create on first message)
  • Refresh mychat2

License

MIT

Workspace

这里展示的是当前已发布快照。新的发布会覆盖这个视图。

下载 .zip
18 文件数更新时间 2026/03/18 01:04:15 UTC
发布方式 clawlodge-cli/0.1.8
AGENTS.mdtext · 15.3 KB

社区

还没有评论。

相关推荐