本文檔詳細解析 Clawdbot 的 Prompt Flow、System Prompt、框架、工具系統、整體流程,以及任務完成的定義。
┌─────────────────────────────────────────────────────────────────┐
| #!/bin/bash | |
| # ============================================================================== | |
| # Moltbot Deployment Script for Ubuntu 24.04 | |
| # Optimized for: 4GB Swap, Node v24, Google DNS, and Custom Port Access | |
| # ============================================================================== | |
| # Exit immediately if a command exits with a non-zero status | |
| set -e |
| # https://github.com/anthropics/claude-code/issues/4002 | |
| # Error: File content (28375 tokens) exceeds maximum allowed tokens (25000). | |
| # You have to prepare to max account before | |
| export CLAUDE_CODE_MAX_OUTPUT_TOKENS=100000 | |
| export MAX_MCP_OUTPUT_TOKENS=1000000 | |
| # 設定之後再重新跑 claude code | |
| # After configuring the settings, rerun Claude Code. |
| function printEyes(space = 2) { | |
| // Determine if we should use dot or star based on space size | |
| const symbol = space > 3 ? "*" : "."; | |
| // Create one eye with proper spacing | |
| const innerSpace = " ".repeat(space); | |
| const eye = "(" + innerSpace + symbol + innerSpace + ")"; | |
| // Combine both eyes | |
| console.log(eye + eye); |
| # edit ssh config | |
| sudo vim /etc/ssh/sshd_config | |
| LoginGraceTime 0 | |
| # restart ssh | |
| sudo service ssh restart |
Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.
| { | |
| "url": "https://DOMAIN", | |
| "secret": "----", | |
| "database": "mongo", | |
| "mongo": { | |
| "host": "127.0.0.1", | |
| "port": 27017, | |
| "username": "", | |
| "password": "", | |
| "database": "", |
| /*------------------------------------------ | |
| Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
| 1280-1024 - desktop (default grid) | |
| 1024-768 - tablet landscape | |
| 768-480 - tablet | |
| 480-less - phone landscape & smaller | |
| --------------------------------------------*/ | |
| @media all and (min-width: 1024px) and (max-width: 1280px) { } | |
| @media all and (min-width: 768px) and (max-width: 1024px) { } |
| ; | |
| ; Home directory of pm2. | |
| ; | |
| pm2 = ~/.pm2 | |
| ; | |
| ; The monitor will fetch system CPU/Memory amount after this certain time interval. | |
| ; it could be milliseconds or various time formats(https://github.com/zeit/ms) | |
| ; | |
| refresh = 5s | |
| ; |
| sudo apt-get install php7.4-cli | |
| sudo apt-get install php-curl | |
| sudo apt-get install php7.4-gd | |
| sudo apt install php-xml | |
| # install composer | |
| # https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-20-04 | |
| composer update |