Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Summary

OpenClaw plugin exposing 0 skills across openclaw-weixin.

Install to Claude Code

openclaw plugin add Qiue-G/Claw-X

Run in Claude Code. Add the marketplace first with /plugin marketplace add Qiue-G/Claw-X if you haven't already.

README.md

ClawX

ClawX 是一个以"按周演进"为组织方式的 AI 助手平台工程:通过补丁系统逐步叠加能力,最终形成清晰分层的核心架构(Contract v1、权限分类、多模式 Bridge、配置驱动 Cache、性能基线回归、可观测性增强)。

当前版本: v2.4 (Week 22 完成:CLI Contract v1 + 可观测性 + 配置注入)

生产就绪: ✅ 是(Week 21-22 平台化完成)

快速开始

ClawX Assistant 位于 .openclaw/skills/clawx_assistant/

CLI(推荐)

标准模式(向后兼容)

python3 .openclaw/skills/clawx_assistant/cli.py --help
python3 .openclaw/skills/clawx_assistant/cli.py "git status"
python3 .openclaw/skills/clawx_assistant/cli.py --yes "bash rm -rf /tmp/test"

OpenClaw Contract v1 模式(Week 22 标准)

# 从 stdin 读取 JSON 请求
echo '{"command":"bash_command_handler","args":{"cmd":"echo hello"},"context":{"trace_id":"abc123"}}' | \
  python3 .openclaw/skills/clawx_assistant/cli_contract_v1.py

# 自动确认危险命令
echo '{"command":"bash_command_handler","args":{"cmd":"rm -rf /tmp/test"},"context":{"confirmed":true}}' | \
  python3 .openclaw/skills/clawx_assistant/cli_contract_v1.py

说明:

  • --yes/-y/--confirmed:自动确认危险命令(写入 context.confirmed=true
  • ONESHOT 模式输出会通过 Bridge 统一格式化,并返回标准退出码
  • Week 22: cli_contract_v1.py 是 OpenClaw 宿主调用的标准入口,输出 Contract v1 JSON

Python 方式调用(调试/集成)

python3 - <<'PY'
import sys
from pathlib import Path

clawx_dir = Path('.openclaw/skills/clawx_assistant').resolve()
sys.path.insert(0, str(clawx_dir))

from clawx_integration import ClawXAssistant

assistant = ClawXAssistant(lazy=False)
print(assistant.command_system.execute_command('git_status_handler', args={}, context={}))
PY

测试

运行系统级测试套件(Week 20):

python3 - <<'PY'
import sys
from pathlib import Path

clawx_dir = Path('.openclaw/skills/clawx_assistant').resolve()
sys.path.insert(0, str(clawx_dir))

from clawx_integration import ClawXAssistant

assistant = ClawXAssistant(lazy=False)
res = assistant.command_system.execute_command('skill_suite', args={'command': '--run full_integration'}, context={})
print(res.get('data', {}).get('raw', {}).get('stats'))
PY

性能基线(Week 21)

生成性能基线(含 cold start、命令耗时、缓存命中):

python3 .openclaw/skills/clawx_assistant/generate_baseline.py generate
python3 .openclaw/skills/clawx_assistant/generate_baseline.py generate --output .openclaw/skills/clawx_assistant/data/baseline_A.json
python3 .openclaw/skills/clawx_assistant/generate_baseline.py generate --output .openclaw/skills/clawx_assistant/data/baseline_B.json

对比两次基线:

python3 .openclaw/skills/clawx_assistant/generate_baseline.py compare --old .openclaw/skills/clawx_assistant/data/baseline_A.json --new .openclaw/skills/clawx_assistant/data/baseline_B.json

可观测性(Week 22)

JSONL 日志

# 查看当日日志
cat /tmp/clawx_logs/clawx_$(date +%Y-%m-%d).jsonl

# 过滤特定 trace_id
cat /tmp/clawx_logs/clawx_*.jsonl | grep "test_trace_001"

Metrics Snapshot 导出

from core.observability_enhanced import get_metrics

metrics = get_metrics()
metrics.export_to_file('/path/to/metrics.json')

配置注入(OpenClaw 宿主)

# 通过环境变量注入配置
export OPENCLAW_CONFIG='{"cache":{"enabled":false,"ttl":600},"permission":{"auto_confirm":["git status"]}}'
python3 cli_contract_v1.py

架构与路线图

📊 Week 实现统计(截至 2026-04-06)

基于实际代码自动检验,ClawX 项目当前实现状态:

总体统计(修正后)

| 指标 | 数值 | 百分比 | |------|------|--------| | 已确认实现 | 19/22 | 86.4% | | 可能整合 | 2/22 | 9.1% | | Patch 模式 | 12 个 Week | - | | 直接实现 | 2 个 Week | - | | Core 组件 | 3 个 Week | - | | lib/整合 | 2 个 Week | - |

说明:

  • Week 2: 已实现,整合到 lib/persistent_session.py + lib/token_aware_context.py
  • Week 4: 已实现,质量保证测试(无独立文件)
  • Week 8: 可能整合到 lib/mcp_client.py(需确认)
  • Week 11: 可能整合到最终架构(需确认)

详细调查: 阅读 WEEK_STATUS_INVESTIGATION.md 了解 Week 状态谜团。

分阶段统计

| 阶段 | Week 范围 | 已实现 | 总数 | 完成率 | |------|-----------|--------|------|--------| | 阶段 1: 基础功能 | Week 1-10 | 9 | 10 | 90% | | 阶段 2: 技能扩展 | Week 11-16 | 5-6 | 6 | 83-100% | | 阶段 3: 核心架构 | Week 17-19 | 3 | 3 | 100% | | 阶段 4: 测试与生产化 | Week 20-22 | 3 | 3 | 100% |

详细报告: 阅读 WEEKS_FULL_IMPLEMENTATION_REPORT.md 了解每个 Week 的文件列表、模块说明和实现类型。

Week 23 发展方向

Week 23 聚焦于 Skill 能力深度优化,在 Week 21-22 完成的平台化基础上,进一步提升 Skill 的智能水平和专业能力:

1. 复杂任务编排

  • 多步骤工作流支持(任务依赖管理、条件分支、并行执行)
  • 错误恢复机制(自动重试、回滚策略、降级处理)
  • 任务状态持久化(断点续执行、进度追踪)

2. 上下文理解增强

  • 多轮对话记忆(跨命令上下文传递、意图识别优化)
  • 用户行为学习(偏好记忆、常用命令推荐)
  • 智能命令补全(基于历史上下文的参数推荐)

3. 性能极致优化

  • 启动速度优化(懒加载深化、模块预编译、缓存预热)
  • 执行效率提升(并发执行、结果缓存、批量处理)
  • 资源占用优化(内存管理、连接池优化、垃圾回收调优)

4. 专业领域 Skill

  • 代码理解专家(深度代码分析、架构理解、重构建议)
  • DevOps 自动化(CI/CD 集成、部署自动化、监控告警)
  • 数据分析助手(数据清洗、可视化、统计分析报告)

目标:将 ClawX 从"功能齐全的工具箱"升级为"智能专业的 AI 助手"

Related plugins

Browse all →