Loading...
Loading...
Configure Moltbot/OpenClaw for CloudBase full-stack development. Checks ~/.openclaw/ or ~/.clawdbot/ config, finds workspace directory, updates AGENTS.md, and configures mcporter with CloudBase MCP. Guides users to get environment ID and API keys.
npx skill4agent add tencentcloudbase/skills setup-cloudbase-openclaw| Step | Action | Purpose |
|---|---|---|
| 1 | Check installation dirs | Find where OpenClaw/Moltbot is installed |
| 2 | Locate workspace | Identify the agent workspace directory |
| 3 | Configure MCP | Set up CloudBase MCP with credentials |
| 4 | Update AGENTS.md | Add CloudBase development rules |
| 5 | Install skill-enhancer plugin (optional) | Install plugin to enforce skill usage |
| 6 | Install skills | Install CloudBase-related skills |
| 7 | Copy app template (optional) | Copy CloudBase React template to workspace |
| 8 | Apply changes | Use /new to start a new session |
# Check for OpenClaw directory
ls -la ~/.openclaw/
# Or check for Moltbot directory
ls -la ~/.clawdbot/
# Or check for standard moltbot config
ls -la ~/.moltbot/moltbot.jsonconfig.jsonskills/npx @cloudbase/setup-openclaw detect# Read config and find workspace
cat ~/.openclaw/moltbot.json | grep '"workspace"'
# or
cat ~/.clawdbot/moltbot.json | grep '"workspace"'
# or
cat ~/.moltbot/moltbot.json | grep '"workspace"'~/clawd/~/.openclaw/workspace/config/mcporter.json# First, create the config directory if it doesn't exist
mkdir -p <workspace>/config
# Then create the mcporter.json file
nano <workspace>/config/mcporter.json{
"mcpServers": {
"cloudbase-mcp": {
"description": "CloudBase MCP",
"command": "npx",
"args": ["@cloudbase/cloudbase-mcp@latest"],
"env": {
"TENCENTCLOUD_SECRETID": "your_secret_id_here",
"TENCENTCLOUD_SECRETKEY": "your_secret_key_here",
"CLOUDBASE_ENV_ID": "your_env_id_here"
}
}
}
}xxx-xxxxxcd <workspace>
npx mcporter listcloudbase-mcpnano <workspace>/AGENTS.md## CloudBase Development
When working with CloudBase projects, the agent MUST:
1. **Read skills first** - Before writing any code, read the relevant CloudBase skills:
- `cloudbase-guidelines` - Essential development guidelines
- `web-development` - For web apps with static hosting
- `miniprogram-development` - For WeChat mini programs
- `cloud-functions` - For cloud function development
- `auth-web-cloudbase` - For web authentication
- `cloudbase-document-database-web-sdk` - For document database operations
2. **Use MCP, not CLI** - All CloudBase operations must go through CloudBase MCP tools:
- Environment queries via MCP
- Database configuration via MCP
- Cloud function deployment via MCP
- Do NOT use the CloudBase CLI (it requires interactive login)
3. **Prefer SDK + security rules** - If the requirement can be satisfied with the document database SDK and security rules alone, do NOT introduce cloud functions.
4. The workspace includes a **CloudBase + React template** (`app/` directory) that you can copy as a starting point for new projects.
5. **Deploy to subdirectory (mandatory)** - When deploying web apps to static hosting, you MUST use a subdirectory path (e.g., `/my-app/`), not the root, unless the user explicitly asks otherwise.
6. **Auto-deploy web apps** - After completing a web application, automatically deploy it to CloudBase static hosting using MCP tools.npx @cloudbase/setup-openclaw install-plugin~/.openclaw/~/.clawdbot/~/.moltbot/extensions/skill-enhancer/openclaw.plugin.jsonindex.tsopenclaw.jsoncloudbase-guidelines# For Moltbot
moltbot gateway restart
# For OpenClaw
openclaw gateway restart
# Or for Clawdbot
clawdbot restart# Option 1: Install to workspace skills (single workspace)
cd <workspace>
npx skills add tencentcloudbase/skills -y
# Option 2: Install to shared skills (all agents on this machine)
npx skills add tencentcloudbase/skills -y --workdir ~/.openclaw/skills
# or
npx skills add tencentcloudbase/skills -y --workdir ~/.clawdbot/skillsls skills/ | grep cloudbasecloudbase-guidelinesweb-developmentminiprogram-developmentcloud-functionsauth-web-cloudbaseAsk the agent: "List available MCP tools"
Should see CloudBase-related toolsAsk the agent: "What CloudBase skills do you have?"
Should list cloudbase-guidelines, web-development, etc.Ask the agent: "Check my CloudBase environment info"
Should use MCP to query environment detailsAsk the agent: "Create a simple CloudBase web app"
Should list available skills (e.g., cloudbase-guidelines, web-development) before writing codenpx mcporter list<workspace>/skills/~/.openclaw/extensions/skill-enhancer/openclaw.json"skill-enhancer": { "enabled": true }<workspace>/skills/~/.openclaw/skills/~/.clawdbot/skills/~/.openclaw/skills/