{"skill":{"slug":"pixel-office","displayName":"Pixel Office","summary":"Animated pixel-art office where agents appear as characters that walk, sit, and interact with furniture in real time. 像素风办公室，让各个 agents 以角色形式实时走动、入座，并与家具互动。","description":"---\nname: pixel-office\ndescription: Animated pixel-art office where agents appear as characters that walk, sit, and interact with furniture in real time. 像素风办公室，让各个 agents 以角色形式实时走动、入座，并与家具互动。\n---\n\n# Pixel Office Skill\n\nLaunch and manage the Pixel Office web UI where agents appear as animated pixel-art characters that walk, sit, and interact with furniture in real time.\n\n## Activation\n\nActivate when user says:\n- \"打开像素办公室\"\n- \"open pixel office\"\n- \"像素办公室\"\n- \"pixel office\"\n\n## What This Skill Does\n\n1. Detects the operating system (macOS/Windows)\n2. Checks if git is installed\n3. Downloads/clones the OpenClaw Dashboard project if not already present\n4. Installs dependencies (npm install)\n5. Starts the development server in background\n6. Returns the access URL to the user\n\n## Installation Directory\n\n- **macOS/Linux**: `~/projects/OpenClaw-bot-review/`\n- **Windows**: `%USERPROFILE%\\projects\\OpenClaw-bot-review\\`\n\n## Prerequisites\n\n- Node.js 18+ must be installed\n- OpenClaw config at `~/.openclaw/openclaw.json` (or `%USERPROFILE%\\.openclaw\\openclaw.json` on Windows)\n\n## Workflow\n\n### Step 1: Check if already running and stop it\n\n```bash\n# Check if process is already running on port 3000\n# macOS/Linux\nlsof -ti:3000\n\n# Windows\nnetstat -ano | findstr :3000\n```\n\n**If already running:**\n- Stop the service first (ensure clean restart)\n\n**macOS/Linux:**\n```bash\nlsof -ti:3000 | xargs kill -9 2>/dev/null\necho \"已停止旧服务\"\n```\n\n**Windows (PowerShell):**\n```powershell\nGet-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess | Stop-Process -Force\nWrite-Host \"已停止旧服务\"\n```\n\n**Windows (cmd):**\n```cmd\nfor /f \"tokens=5\" %a in ('netstat -ano ^| findstr :3000') do taskkill /F /PID %a\necho 已停止旧服务\n```\n\nThen proceed to Step 1.5.\n\n### Step 1.5: Check for updates (if project exists)\n\nIf project exists, check if there's a newer version:\n\n**If git is available:**\n\n```bash\n# macOS/Linux\ncd ~/projects/OpenClaw-bot-review\ngit fetch origin main 2>/dev/null\nLOCAL=$(git rev-parse HEAD 2>/dev/null)\nREMOTE=$(git rev-parse origin/main 2>/dev/null)\n\nif [ \"$LOCAL\" != \"$REMOTE\" ]; then\n  echo \"update_available\"\nelse\n  echo \"up_to_date\"\nfi\n\n# Windows (PowerShell)\ncd \"$env:USERPROFILE\\projects\\OpenClaw-bot-review\"\ngit fetch origin main 2>$null\n$local = git rev-parse HEAD 2>$null\n$remote = git rev-parse origin/main 2>$null\nif ($local -ne $remote) { \"update_available\" } else { \"up_to_date\" }\n```\n\n**If update available:**\n- Inform user: \"检测到新版本，正在更新...\"\n- Pull latest code: `git pull origin main`\n- Reinstall dependencies: `npm install`\n- Continue to Step 5 (start service)\n\n**If up to date:**\n- Continue to Step 5 (start service)\n\n**If git is NOT available:**\n- Inform user: \"检测到项目无 git 管理，正在重新下载最新版本...\"\n- Remove old project directory:\n  ```bash\n  # macOS/Linux\n  rm -rf ~/projects/OpenClaw-bot-review\n  \n  # Windows (PowerShell)\n  Remove-Item -Recurse -Force \"$env:USERPROFILE\\projects\\OpenClaw-bot-review\"\n  ```\n- Go to Step 3 (download project via ZIP)\n\n### Step 2: Check if project exists\n\n```bash\n# macOS/Linux\ntest -d ~/projects/OpenClaw-bot-review && echo \"exists\" || echo \"not found\"\n\n# Windows (PowerShell)\nTest-Path \"$env:USERPROFILE\\projects\\OpenClaw-bot-review\"\n```\n\nIf exists, skip to Step 4.\n\n### Step 3: Download project\n\n**Option A: With git (preferred)**\n\n```bash\n# macOS/Linux\nmkdir -p ~/projects\ncd ~/projects\ngit clone https://github.com/xmanrui/OpenClaw-bot-review.git\n\n# Windows (PowerShell)\nNew-Item -ItemType Directory -Force -Path \"$env:USERPROFILE\\projects\"\ncd \"$env:USERPROFILE\\projects\"\ngit clone https://github.com/xmanrui/OpenClaw-bot-review.git\n```\n\n**Option B: Without git (fallback)**\n\n**macOS/Linux:**\n```bash\nmkdir -p ~/projects\ncd ~/projects\ncurl -L https://github.com/xmanrui/OpenClaw-bot-review/archive/refs/heads/main.zip -o openclaw-dashboard.zip\nunzip openclaw-dashboard.zip\nmv OpenClaw-bot-review-main OpenClaw-bot-review\nrm openclaw-dashboard.zip\n```\n\n**Windows (PowerShell):**\n```powershell\nNew-Item -ItemType Directory -Force -Path \"$env:USERPROFILE\\projects\"\ncd \"$env:USERPROFILE\\projects\"\nInvoke-WebRequest -Uri \"https://github.com/xmanrui/OpenClaw-bot-review/archive/refs/heads/main.zip\" -OutFile \"openclaw-dashboard.zip\"\nExpand-Archive -Path \"openclaw-dashboard.zip\" -DestinationPath \".\"\nRename-Item -Path \"OpenClaw-bot-review-main\" -NewName \"OpenClaw-bot-review\"\nRemove-Item \"openclaw-dashboard.zip\"\n```\n\n**Windows (cmd with curl - Windows 10+):**\n```cmd\nmkdir \"%USERPROFILE%\\projects\" 2>nul\ncd /d \"%USERPROFILE%\\projects\"\ncurl -L https://github.com/xmanrui/OpenClaw-bot-review/archive/refs/heads/main.zip -o openclaw-dashboard.zip\ntar -xf openclaw-dashboard.zip\nren OpenClaw-bot-review-main OpenClaw-bot-review\ndel openclaw-dashboard.zip\n```\n\n### Step 4: Install dependencies (if needed)\n\nCheck if `node_modules` exists. If not:\n\n```bash\n# macOS/Linux\ncd ~/projects/OpenClaw-bot-review\nnpm install\n\n# Windows\ncd \"%USERPROFILE%\\projects\\OpenClaw-bot-review\"\nnpm install\n```\n\n### Step 5: Start the server\n\n**macOS/Linux:**\n```bash\ncd ~/projects/OpenClaw-bot-review\nnpm run dev > /dev/null 2>&1 &\n```\n\n**Windows (PowerShell):**\n```powershell\ncd \"$env:USERPROFILE\\projects\\OpenClaw-bot-review\"\nStart-Process -NoNewWindow -FilePath \"npm\" -ArgumentList \"run\", \"dev\"\n```\n\n**Windows (cmd):**\n```cmd\ncd /d \"%USERPROFILE%\\projects\\OpenClaw-bot-review\"\nstart /B npm run dev\n```\n\n### Step 6: Wait for server to be ready\n\nPoll `http://localhost:3000` until it responds (max 30 seconds).\n\n```bash\n# macOS/Linux\nfor i in {1..30}; do\n  curl -s http://localhost:3000 > /dev/null && break\n  sleep 1\ndone\n\n# Windows (PowerShell)\nfor ($i=0; $i -lt 30; $i++) {\n  try {\n    Invoke-WebRequest -Uri \"http://localhost:3000\" -UseBasicParsing -TimeoutSec 1 | Out-Null\n    break\n  } catch {\n    Start-Sleep -Seconds 1\n  }\n}\n```\n\n### Step 7: Return access URLs (required)\n\nYou MUST return both:\n- Local URL\n- LAN URL\n\nFirst, actually detect the machine's LAN IPv4 address. Do not guess it.\n\n**macOS/Linux:**\n```bash\n(ipconfig getifaddr en0 || ipconfig getifaddr en1 || hostname -I | awk '{print $1}') 2>/dev/null\n```\n\n**Windows (PowerShell):**\n```powershell\n(Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias \"Ethernet*\",\"Wi-Fi*\" | Select-Object -First 1).IPAddress\n```\n\nRules:\n- You MUST execute an IP detection command before composing the final reply.\n- Do NOT guess or fabricate the LAN IP.\n- Do NOT omit the LAN URL just because localhost works.\n- You MUST include both the local URL and the LAN URL in the final reply.\n- If LAN IP detection fails, you MUST still include the local URL and explicitly say:\n  - 局域网访问地址：获取失败\n  - and briefly mention that LAN IP detection failed.\n- Do NOT end with only a localhost URL.\n\nReturn message format:\n```\n✅ Pixel Office 已启动！\n\n访问地址：\n- 本地访问：http://localhost:3000/pixel-office\n- 局域网访问：http://<LAN-IP>:3000/pixel-office\n\nPixel Office 会自动读取你的 OpenClaw 配置，展示所有机器人、模型、会话的状态。\n\n需要停止服务时告诉我一声。\n```\n\nIf LAN IP detection fails, use:\n```\n✅ Pixel Office 已启动！\n\n访问地址：\n- 本地访问：http://localhost:3000/pixel-office\n- 局域网访问：获取失败\n\n原因：未能检测到当前机器的局域网 IPv4 地址。\n\n需要停止服务时告诉我一声。\n```\n\n## Stopping the Server\n\nWhen user asks to stop:\n\n**macOS/Linux:**\n```bash\nlsof -ti:3000 | xargs kill -9\n```\n\n**Windows (PowerShell):**\n```powershell\nGet-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess | Stop-Process -Force\n```\n\n**Windows (cmd):**\n```cmd\nfor /f \"tokens=5\" %a in ('netstat -ano ^| findstr :3000') do taskkill /F /PID %a\n```\n\n## Error Handling\n\n- **Node.js not found**: Tell user to install Node.js 18+ from https://nodejs.org/\n- **Port 3000 already in use**: Check if it's the dashboard (return URL) or another service (suggest using a different port with `PORT=3001 npm run dev`)\n- **OpenClaw config not found**: Warn that dashboard may not work properly without `~/.openclaw/openclaw.json`\n- **Download failed**: Suggest checking internet connection or manually downloading from GitHub\n- **npm install failed**: Suggest running `npm cache clean --force` and retrying\n\n## Notes\n\n- The server runs in background and persists until stopped or system reboot\n- Dashboard reads config directly from `~/.openclaw/openclaw.json` - no database needed\n- Supports auto-refresh, dark/light theme, i18n (Chinese/English)\n- Includes pixel-art office animation for fun visualization\n\n## Platform Detection\n\n```bash\n# Detect OS\nuname -s  # macOS: Darwin, Linux: Linux, Windows (Git Bash): MINGW*/MSYS*\n\n# Windows detection in PowerShell\n$PSVersionTable.Platform  # Win32NT or empty on Windows\n```\n\n## Git Detection\n\n```bash\n# Check if git is available\ngit --version\n# Exit code 0 = installed, non-zero = not installed\n```\n\n**Detection logic:**\n1. Run `git --version` at the beginning\n2. Store result (available/not available)\n3. Use this result throughout the workflow\n\n**If git not available:**\n- Always use ZIP download method\n- Always force re-download when project exists (to get latest version)\n- Clean up old directory before downloading\n\n## Implementation Tips\n\n1. **Always stop old service first** - ensures clean restart with latest code\n2. **Check git availability at the start** - determines update strategy\n3. **With git**: Check for updates and pull if needed\n4. **Without git**: Force re-download ZIP to ensure latest version\n5. **No user confirmation needed** - auto-update and restart for best UX\n6. Use background process management to avoid blocking\n7. Provide clear feedback at each step (\"已停止旧服务\", \"检测到新版本，正在更新...\", \"正在重新下载最新版本...\")\n8. Handle both PowerShell and cmd on Windows\n9. Clean up temporary files (zip archives)\n10. Log errors for debugging but keep user messages simple\n11. **Always ensure latest code** - either via git pull or re-download\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":938,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1772811143316,"updatedAt":1779077748546},"latestVersion":{"version":"1.0.0","createdAt":1772811143316,"changelog":"Initial release: pixel-office skill forked from openclaw-bot-dashboard with dedicated triggers, bilingual description, /pixel-office access path, and strict LAN URL return rules.","license":null},"metadata":null,"owner":{"handle":"xmanrui","userId":"s17b3qydx8bxwq5vj4wt4fayv583xnsn","displayName":"xiemanR","image":"https://avatars.githubusercontent.com/u/4094054?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089783844}}