skills/disabled/openclaw-config/SKILL.md
# OpenClaw 配置全局规范 ## 概述 本文档定义了 OpenClaw 配置的标准规范,确保所有配置修改都正确、安全、可追溯。 **版本**: OpenClaw 2026.2.1 **最后更新**: 2026-02-02 --- ## 📁 配置文件结构 ### 主要配置文件 | 文件路径 | 用途 | 格式 | |---------|------|------| | `~/.openclaw/openclaw.json` | 主配置文件 | JSON5 | | `~/.openclaw/agents/main/agent/models.json` | Agent 模型配置 | JSON | | `~/.openclaw/agents/main/agent/auth-profiles.json` | API 密钥和认证 | JSON | | `~/.openclaw/agents/main/agent/agent.json` | Agent 特定配置 | JSON | ### 配置文件层级 ``` ~/.openclaw/ ├── openclaw.json
npx skillsauth add aaaaqwq/agi-super-team skills/disabled/openclaw-configInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
本文档定义了 OpenClaw 配置的标准规范,确保所有配置修改都正确、安全、可追溯。
版本: OpenClaw 2026.2.1 最后更新: 2026-02-02
| 文件路径 | 用途 | 格式 |
|---------|------|------|
| ~/.openclaw/openclaw.json | 主配置文件 | JSON5 |
| ~/.openclaw/agents/main/agent/models.json | Agent 模型配置 | JSON |
| ~/.openclaw/agents/main/agent/auth-profiles.json | API 密钥和认证 | JSON |
| ~/.openclaw/agents/main/agent/agent.json | Agent 特定配置 | JSON |
~/.openclaw/
├── openclaw.json # 主配置(Gateway + Channels + Agents)
├── .env # 环境变量(可选)
├── agents/
│ └── main/
│ └── agent/
│ ├── models.json # 模型定义
│ ├── auth-profiles.json # 认证配置
│ └── agent.json # Agent 配置
├── credentials/
│ └── whatsapp/ # WhatsApp 认证
└── logs/ # 日志目录
# 查看配置
openclaw config get <path>
# 设置配置
openclaw config set <path> <value>
# 删除配置
openclaw config unset <path>
# 模型相关
openclaw models set <provider/model>
openclaw models fallbacks add <provider/model>
openclaw models aliases set <alias> <provider/model>
# 获取配置(包含 hash)
openclaw gateway call config.get --params '{}'
# 部分更新(推荐)
openclaw gateway call config.patch --params '{
"raw": "{ channels: { telegram: { enabled: true } } }",
"baseHash": "<hash-from-config.get>"
}'
# 完整替换(谨慎使用)
openclaw gateway call config.apply --params '{
"raw": "<完整配置>",
"baseHash": "<hash>"
}'
⚠️ 注意事项:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bakopenclaw doctoropenclaw gateway restart{
// 元数据(自动管理)
"meta": {
"lastTouchedVersion": "2026.2.1",
"lastTouchedAt": "2026-02-02T12:00:00.000Z"
},
// 环境变量
"env": {
"vars": {
"OPENROUTER_VIP_API_KEY": "sk-xxx",
"ZAI_API_KEY": "xxx"
}
},
// 认证配置
"auth": {
"profiles": {
"github-copilot:github": {
"provider": "github-copilot",
"mode": "token"
},
"zai:default": {
"provider": "zai",
"mode": "api_key"
}
}
},
// 模型配置
"models": {
"mode": "merge",
"providers": {
"<provider-name>": {
"baseUrl": "https://api.example.com",
"apiKey": "sk-xxx",
"auth": "api-key", // api-key | oauth | token
"api": "anthropic-messages", // anthropic-messages | openai-completions
"models": [
{
"id": "model-id",
"name": "Display Name",
"reasoning": false,
"input": ["text"], // text | image
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 8192
}
]
}
}
},
// Agent 配置
"agents": {
"defaults": {
"model": {
"primary": "provider/model",
"fallbacks": ["provider/model2", "provider/model3"]
},
"models": {
"provider/model": {
"alias": "shortname"
}
},
"workspace": "/home/aa/clawd",
"compaction": {
"mode": "safeguard"
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
}
},
// 消息配置
"messages": {
"ackReactionScope": "group-mentions",
"queue": {
"mode": "collect",
"debounceMs": 1000,
"cap": 20
}
},
// 命令配置
"commands": {
"native": "auto",
"nativeSkills": "auto"
},
// 钩子配置
"hooks": {
"internal": {
"enabled": true,
"entries": {
"boot-md": { "enabled": true },
"command-logger": { "enabled": true },
"session-memory": { "enabled": true }
}
}
},
// 通道配置
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"selfChatMode": true,
"allowFrom": ["+xxx"],
"groupPolicy": "allowlist",
"mediaMaxMb": 50
},
"telegram": {
"enabled": true,
"dmPolicy": "allowlist",
"botToken": "xxx:xxx",
"allowFrom": ["user_id"],
"groupPolicy": "allowlist",
"streamMode": "partial"
}
},
// Gateway 配置
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"auth": {
"mode": "token",
"token": "xxx"
},
"tailscale": {
"mode": "off",
"resetOnExit": false
}
},
// Skills 配置
"skills": {
"install": {
"nodeManager": "npm"
}
},
// 插件配置
"plugins": {
"entries": {
"whatsapp": { "enabled": true },
"telegram": { "enabled": true }
}
}
}
# CLI 方式(推荐)
openclaw models set anapi/opus-4.5
# 验证
openclaw models status
openclaw models aliases set opus45 anapi/opus-4.5
openclaw models fallbacks add <provider>/glm-4.7
openclaw models fallbacks add github-copilot/claude-sonnet-4-5
在 ~/.openclaw/openclaw.json 的 models.providers 中添加:
"<provider-name>": {
"baseUrl": "https://api.example.com",
"apiKey": "sk-xxx",
"auth": "api-key",
"api": "anthropic-messages", // 或 "openai-completions"
"models": [
{
"id": "model-id",
"name": "Model Name",
"reasoning": false,
"input": ["text"],
"contextWindow": 200000,
"maxTokens": 8192
}
]
}
"channels": {
"telegram": {
"enabled": true,
"botToken": "BOT_TOKEN",
"dmPolicy": "allowlist",
"allowFrom": ["USER_ID"],
"groupPolicy": "allowlist",
"streamMode": "partial"
}
}
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"selfChatMode": true,
"allowFrom": ["+PHONE_NUMBER"],
"groupPolicy": "allowlist",
"mediaMaxMb": 50
}
}
在修改任何配置前,必须确认:
${VAR_NAME}openclaw doctor 验证配置openclaw gateway restart 重启生效| 类型 | 存储位置 |
|------|---------|
| 模型 API Key | ~/.openclaw/openclaw.json → models.providers.<name>.apiKey |
| OAuth Token | ~/.openclaw/agents/main/agent/auth-profiles.json |
| 环境变量 | ~/.openclaw/.env 或 env.vars |
{
"models": {
"providers": {
"custom": {
"apiKey": "${CUSTOM_API_KEY}"
}
}
}
}
# 查看详细错误
openclaw doctor
# 自动修复
openclaw doctor --fix
# 检查状态
openclaw gateway status
# 查看日志
openclaw logs
# 强制重启
openclaw gateway restart --force
# 检查模型状态
openclaw models status
# 检查认证
openclaw models auth status
每次修改配置时,记录以下信息:
### 配置变更 - YYYY-MM-DD HH:MM
**修改内容**:
- 修改了 xxx
**修改原因**:
- 因为 xxx
**影响范围**:
- 影响 xxx 功能
**验证结果**:
- [ ] doctor 通过
- [ ] 功能测试通过
**回滚方法**:
- 恢复备份:`cp ~/.openclaw/openclaw.json.bak ~/.openclaw/openclaw.json`
| 版本 | 日期 | 变更 | |------|------|------| | 1.0 | 2026-02-02 | 初始版本 |
本规范由小a维护,确保所有配置修改都正确、安全、可追溯。
development
Technology-agnostic prompt generator that creates customizable AI prompts for scanning codebases and identifying high-quality code exemplars. Supports multiple programming languages (.NET, Java, JavaScript, TypeScript, React, Angular, Python) with configurable analysis depth, categorization methods, and documentation formats to establish coding standards and maintain consistency across development teams.
tools
Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.
data-ai
Prompt for creating detailed feature implementation plans, following Epoch monorepo structure.
tools
Interactive prompt refinement workflow: interrogates scope, deliverables, constraints; copies final markdown to clipboard; never writes code. Requires the Joyride extension.