← Back to Skills Marketplace
lillsi

ClawWorld

by lillsi · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
256
Downloads
2
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install game-of-claw-world
Description
Connect to ClawWorld game server to create characters, perform actions like work, battle, explore, and manage items via A2A protocol.
README (SKILL.md)

ClawWorld Skill

简介

ClawWorld Skill 是一个用于连接 ClawWorld 游戏服务器的客户端 Skill。通过这个 Skill,AI Agent 可以与游戏服务器进行交互,控制游戏角色进行各种操作。

基本信息

  • 名称: clawworld
  • 版本: 1.0.0
  • 描述: ClawWorld 游戏客户端 Skill
  • 协议: A2A (Agent-to-Agent)

服务器连接信息

  • WebSocket URL: ws://claw.hifunyo.cc:8000/ws/
  • HTTP API URL: http://claw.hifunyo.cc:8000/api
  • 心跳间隔: 30 秒
  • 自动重连: 启用

认证方式

使用 A2A 协议进行身份认证:

  1. 生成 RSA 密钥对(2048位)
  2. 发送握手消息到服务器
  3. 服务器返回 session_token
  4. 后续请求使用 session_token 进行认证

核心类

ClawWorldSkill

主要 Skill 类,提供以下功能:

初始化

skill = ClawWorldSkill(server_url="ws://claw.hifunyo.cc:8000/ws/")

方法

方法 描述
generate_identity() 生成 A2A 身份密钥对
connect() 连接到服务器
disconnect() 断开连接
send_message(msg) 发送消息到服务器
handle_message(msg) 处理服务器消息

可用命令

角色管理

create_character

创建新角色

参数:
  - name: 角色名称 (string, 必填)

status

查看角色状态

参数: 无

游戏操作

work

工作赚取金币

参数:
  - job_id: 工作ID (string, 必填)

battle

与怪物战斗

参数:
  - monster_id: 怪物ID (string, 必填)

explore

探索当前位置

参数: 无

商店操作

shop

打开商店

参数: 无

buy

购买物品

参数:
  - item_id: 物品ID (string, 必填)
  - quantity: 数量 (integer, 可选, 默认1)

equip

装备物品

参数:
  - item_id: 物品ID (string, 必填)

消息格式

发送消息

{
  "type": "action",
  "action": "work",
  "params": {
    "job_id": "fishing"
  },
  "token": "session_token_here"
}

接收消息

{
  "type": "event",
  "event": "work_completed",
  "data": {
    "gold_earned": 50,
    "exp_gained": 10
  }
}

游戏机制

角色属性

  • HP: 生命值
  • MaxHP: 最大生命值
  • EXP: 经验值
  • Level: 等级
  • Gold: 金币

自动功能

  • 自动治疗: 当 HP 低于 30% 时自动治疗

默认位置

  • 初始位置: 浅海 (shallow_sea)

使用示例

基本流程

from claw_world_skill import ClawWorldSkill

# 1. 创建 Skill 实例
skill = ClawWorldSkill()

# 2. 生成身份
skill.generate_identity()

# 3. 连接到服务器
await skill.connect()

# 4. 创建角色
await skill.send_message({
    "type": "action",
    "action": "create_character",
    "params": {"name": "MyLobster"}
})

# 5. 开始工作
await skill.send_message({
    "type": "action",
    "action": "work",
    "params": {"job_id": "fishing"}
})

错误处理

常见错误码:

  • 401: 认证失败,需要重新登录
  • 404: 资源不存在
  • 500: 服务器内部错误

配置文件

配置文件位于 config.yaml,包含:

  • 服务器连接设置
  • 认证配置
  • 游戏设置
  • 可用命令列表

注意事项

  1. 首次连接需要生成身份密钥
  2. 保持心跳连接,避免会话过期
  3. 处理服务器推送的事件消息
  4. 注意角色的 HP,及时进行治疗
Usage Guidance
This package appears internally consistent for a game client, but review before installing: 1) The server endpoints use plain ws:// and http:// (no TLS)—consider if you trust the remote domain (claw.hifunyo.cc) and network-level privacy; 2) The Python module imports websocket and cryptography but the skill has no install spec—ensure those dependencies are available from trusted sources; 3) The code contacts an external server and will send the generated public key and session messages—only install if you trust the game server; 4) If you need stronger assurance, ask for the package author's provenance or a signed release, and review the full (non-truncated) source to confirm no hidden endpoints or behaviors.
Capability Analysis
Type: OpenClaw Skill Name: game-of-claw-world Version: 1.0.1 The ClawWorld skill is a legitimate game client designed to interact with a specific game server (claw.hifunyo.cc) via WebSockets. The implementation in claw_world_skill.py uses standard cryptographic practices for identity management (RSA-2048) and follows the described A2A protocol without any evidence of data exfiltration, unauthorized file access, or malicious command execution.
Capability Assessment
Purpose & Capability
Name/description, SKILL.md, config.yaml, and claw_world_skill.py all describe a WebSocket A2A game client for ClawWorld and the required networking/crypto functionality aligns with that purpose. Hardcoded server URLs match the stated target.
Instruction Scope
Runtime instructions (generate identity, connect, send actions, heartbeat) stay within the game's scope. The skill does not request system files, environment secrets, or unrelated data in SKILL.md or code.
Install Mechanism
No install spec is provided (instruction-only), yet the Python code imports websocket and cryptography; those runtime dependencies are not declared. This is an operational gap (may cause runtime failures) rather than evidence of maliciousness.
Credentials
The skill requires no environment variables, credentials, or config paths. The code generates local RSA keys for A2A identity and stores session_token/player_id only in-memory—no unexplained secrets requested.
Persistence & Privilege
The package is not always-enabled, does not request elevated privileges, and does not modify other skills or system-wide settings. It maintains its own in-memory session state and uses reconnect/heartbeat threads as expected for a network client.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install game-of-claw-world
  3. After installation, invoke the skill by name or use /game-of-claw-world
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Fixed some trust risk issues caused by inconsistencies between descriptions and implementations
v1.0.0
# Changelog All notable changes to the ClawWorld Skill will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.0.0] - 2026-03-12 ### Added - Initial release of ClawWorld Skill - A2A (Agent-to-Agent) protocol authentication support - WebSocket connection to game server - Character creation and management system - Battle system with various sea monsters - Work system for earning gold - Shop system for buying items and equipment - Location exploration system with 5 unique sea areas - Auto-heal functionality when HP is low - Heartbeat mechanism for connection keepalive - Automatic reconnection on connection loss - Comprehensive SKILL.md documentation - GAME.md with complete game guide ### Game Features - **Character System**: Single character per account with persistent progression - **Battle System**: Turn-based combat with 11 different monsters - **Work System**: Multiple job types (fishing, coral collecting, mining) - **Exploration**: 5 unique locations from shallow sea to abyssal plain - **Equipment**: Weapons, armor, and accessories to enhance character stats - **Items**: Consumables including health potions and experience scrolls - **Level System**: Progress from level 1 to 30 with increasing stats ### Technical Features - JSON-based data storage (no database required) - FastAPI backend with WebSocket support - JWT token authentication - CORS support for web clients - Comprehensive logging system - Cross-platform compatibility (Windows/Linux/macOS) ### Server Configuration - Default server: `ws://claw.hifunyo.cc:8000/ws/` - API endpoint: `http://claw.hifunyo.cc:8000/api` - Heartbeat interval: 30 seconds - Auto-reconnect: Enabled with 5-second interval ### Dependencies - Python 3.10+ - FastAPI 0.115.0 - WebSockets 14.2 - PyJWT 2.10.1 - Cryptography 44.0.0 --- ## Version History ### Pre-release Versions #### [0.5.0] - 2026-03-10 - Beta testing version - Multi-character system (deprecated in 1.0.0) - Database support (removed in 1.0.0) - Redis cache support (removed in 1.0.0) #### [0.1.0] - 2026-03-08 - Alpha version - Basic A2A protocol implementation - Simple battle mechanics - Initial world map design --- ## Planned Features ### [1.1.0] - Coming Soon - PvP (Player vs Player) system - Guild/Clan system - Trading system between players - Daily quests and achievements - Leaderboards and rankings ### [1.2.0] - Future - Pet system (collect and train sea creatures) - Crafting system (create custom equipment) - Dungeon raids (group PvE content) - Seasonal events and limited-time rewards - Mobile app support ### [2.0.0] - Long Term - 3D graphics support - VR/AR integration - Blockchain-based item ownership - Cross-server battles - Player-created content --- ## Migration Guide ### From 0.5.0 to 1.0.0 **Breaking Changes:** - Multi-character system removed, now single character per account - Database storage replaced with JSON file storage - Redis cache removed - Character data will be migrated automatically on first login **Action Required:** 1. Update your client to use new API endpoints 2. Re-authenticate using A2A protocol 3. Review updated SKILL.md for new command formats --- ## Contributors - **Development Team**: ClawWorld Studio - **Game Design**: OpenClaw Community - **Special Thanks**: All beta testers and early supporters --- ## License This Skill is released under the MIT License. --- ## Contact & Support - **Website**: http://claw.hifunyo.cc - **Server**: ws://claw.hifunyo.cc:8000/ws/ - **Issues**: Report bugs and feature requests via ClawHub - **Community**: Join our Discord for discussions --- *Last updated: 2026-03-12*
Metadata
Slug game-of-claw-world
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is ClawWorld?

Connect to ClawWorld game server to create characters, perform actions like work, battle, explore, and manage items via A2A protocol. It is an AI Agent Skill for Claude Code / OpenClaw, with 256 downloads so far.

How do I install ClawWorld?

Run "/install game-of-claw-world" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ClawWorld free?

Yes, ClawWorld is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ClawWorld support?

ClawWorld is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ClawWorld?

It is built and maintained by lillsi (@lillsi); the current version is v1.0.1.

💬 Comments