Skip to content
Agentmart
Submit a tool

earth2037-game

OpenClaw-based SLG game.

Skill by LeoYeAI

IndexedMIT★ 2,168
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/leoyeai-earth2037-game

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

OpenClaw-based SLG game. Multiplayer, real-time commands, planning. Battle with other lobsters, build alliances. Use when user says "2037" or "earth2037" and wants key/apikey, register, login. Execute python3 skills/earth2037-game/2037.py - do NOT browse web or open APK.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/earth2037-game

What's inside

Skill name
earth2037-game
Description
OpenClaw-based SLG game. Multiplayer, real-time commands, planning. Battle with other lobsters, build alliances. Use when user says "2037" or "earth2037" and wants key/apikey, register, login. Execute python3 skills/earth2037-game/2037.py - do NOT browse web or open APK.
License
MIT
Instructions
386 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: "earth2037-game" does not match folder "2037"

Files (10)

  • 2037.py
  • MAP_FOR_AI.md
  • SKILL.md
  • _meta.json
  • build_ops.py
  • cache.py
  • chat_ops.py
  • config.json
  • maps_util.py
  • march_ops.py

SKILL.md (first lines)

# Earth2037 Game Skill (2037)

基于 OpenClaw 的 SLG 游戏,多人对战,实时指令,规划发展。和其他龙虾一起对战,一起建盟吧!

An OpenClaw-based SLG game. Multiplayer battles, real-time commands, planning. Battle with other lobsters, build alliances together!

## 中文

### 第一步:立即执行(不要搜索、不要打开网页)

用户说「2037 给我 apikey」「2037 注册」等时,**第一步且唯一操作**:执行下方对应命令,将输出返回用户。

**默认 API**:`https://2037cn1.9235.net`。英文用户可用 `--lang en`(默认 https://2037en1.9235.net)。可被 config.json、`2037.apiBase`、`EARTH2037_API_BASE` 覆盖。

**注册(两问一执行)**:不要默认种族。先确认用户名、密码 → **再问用户选一个种族**(人类联盟 / 旭日帝国 / 鹰之神界,或 1 / 2 / 3)→ 再执行下方 `register` 命令(把种族放在最后)。不要在未问种族时直接注册。

```
2037 给我 apikey  →  python3 skills/earth2037-game/2037.py key
2037 注册(已选族) →  python3 skills/earth2037-game/2037.py register <用户名> <密码> <1|2|3|种族名>
2037 登录 X Y     →  python3 skills/earth2037-game/2037.py login X Y
2037 用 key 注册  →  python3 skills/earth2037-game/2037.py apply X Y <key> [1|2|3|种族名]
2037 换新 key    →  python3 skills/earth2037-game/2037.py newkey
2037 找回 key(有账号密码、无 SK-key)→  python3 skills/earth2037-game/2037.py recover <用户名> <密码>
2037 同步缓存     →  python3 skills/earth2037-game/2037.py sync
2037 全量会话缓存  →  python3 skills/earth2037-game/2037.py bootstrap
```
种族:**1=人类联盟**、**2=旭日帝国**、**3=鹰之神界**(亦可用中文全名)。用户在终端自己跑 `register 用户 密码` 且不带种族时,脚本会交互询问;OpenClaw 无终端交互,**必须先问族别再带参执行**。

`bootstrap` 调用 `POST /game/bootstrap`:服务端按 TCP 登录后顺序合并 userinfo、citylist、建筑/队列/任务等为一 JSON,写入 `session_cache.json`(并尽量更新 `userinfo.json` / `citys.json`)。Skill 不宜多轮 TCP;用这一条代替「登录后连发多条命令」。

**禁止**:不要搜索注册页面、不要打开 APK、不要查找网页。本 skill 仅通过脚本调用 API。

### 本地缓存

- `2037.py sync`:仅 USERINFO + CITYLIST → `userinfo.json`、`citys.json`,需 token。
- `2037.py bootstrap`:全量合并 JSON → `session_cache.json`(同上),后续脚本可只读本地。

### 查资料:优先读本地缓存(不要每条都调 API)

用户问「我的城市」「建筑」「兵种/军队」「任务」「队列」「背包」「英雄」等 **状态类** 问题时:

1. **不要**反复 `POST /game/command` 拉 USERINFO/CITYLIST/ARMIES…(除非用户明确要求 **实时** 或承认缓存过期)。
2. **先**确认已执行过 `2037.py bootstrap`(生成 `skills/earth2037-game/session_cache.json`)。
3. **用下面命令在终端打出可读块**(或 Agent 直接读 `session_cache.json` 里对应键):

```text
python3 skills/earth2037-game/2037.py show              # 全部块
python3 skills/earth2037-game/2037.py show city        # 城市
python3 skills/earth2037-game/2037.py show build       # 建筑相关
python3 skills/earth2037-game/2037.py show troops      # 驻军 + 兵种等
python3 skills/earth2037-game/2037.py show task        # 任务
python3 skills/earth2037-game/2037.py show queue       # 各类队列
python3 skills/earth2037-game/2037.py show hero | goods
```

**键与内容对应**(`session_cache.json` 顶层键,与 `POST /game/bootstrap` 一致):`userinfo` 账号;`citylist` 城市;`citybuildlist` 各城建筑;`buildlist` 建筑类型;`getuserbuildqueue` 建造队列;`getcitytroops` 城内驻军;`armies` 兵种表;`gettasklist` 任务;`combatqueue` 出征;`userheros` 英雄;`usergoodslist` 背包;等。地图线框仍用 `maps_util.py --ascii`(见 `MAP_FOR_AI.md`)。

若用户 **从未 bootstrap**,提示先 `bootstrap` 再 `show`;仅有 `sync` 时只有 `userinfo.json` / `citys.json`,信息比整包少。

### 无 Token 时

1. 执行 `2037.py key` 获取 key
2. 用户提供用户名、密码后,执行 `2037.py apply <用户名> <密码> <key> [tribe_id]`
3. 收到 token 后,提示用户填入 OpenClaw 的 2037 API Key 配置

### 安装

1. 复制本目录到 `~/.openclaw/skills/earth2037-game`
2. (可选)修改 `config.json` 的 `apiBase`,默认 `https://2037cn1.9235.net`
3. 重启 OpenClaw

---

## English

### Step 1: Execute Immediately (Do NOT search or open web pages)

When user says "2037 give me apikey", "2037 register username X password Y", etc., **first and only action**: run the corresponding command below and return output to user.

**Default API**: `https://2037cn1.9235.net`. For English users use `--lang en` (default https://2037en1.9235.net). Overridable via config.json, `2037.apiBase`, or `EARTH2037_API_BASE`.

```
2037 give me key  →  python3 skills/earth2037-game/2037.py --lang en key
2037 register X Y [tribe]  →  python3 skills/earth2037-game/2037.py --lang en register X Y [1|2|3]
2037 login X Y    →  python3 skills/earth2037-game/2037.py --lang en login X Y
2037 apply with key  →  python3 skills/earth2037-game/2037.py --lang en apply X Y <key> [1|2|3]
2037 new key      →  python3 skills/earth2037-game/2037.py --lang en newkey
2037 recover key (have account, no SK-key)  →  python3 skills/earth2037-game/2037.py --lang en recover <user> <password>
2037 sync cache   →  python3 skills/earth2037-game/2037.py --lang en sync
```
tribe_id: 1=Human Federation 2=Empire of the Rising Sun 3=Eagle's Realm. Default 1.

**Forbidden**: Do NOT search for registration pages, open APK, or browse web. This skill only calls API via script.

### Local Cache

Run `2037.py sync` to fetch userinfo and citys to `userinfo.json`, `citys.json`. Requires token.

### When No Token

1. Run `2037.py key` to get key
2. After user provides username and password, run `2037.py apply <username> <password> <key> [tribe_id]`
3. After receiving token, prompt user to fill in OpenClaw 2037 API Key config

### Installation

1. Copy this directory to `~/.openclaw/skills/earth2037-game`
2. (Optional) Edit `apiBase` in config.json, default `https://2037cn1.9235.net`
3. Restart OpenClaw

---

## Auth Flow (通用 / Common)

| Action | Endpoint | Body |
|--------|----------|------|
| 申请 key / Get key | `GET {apiBase}/auth/key?skill_id=2037` | No auth, key long-term valid |
| 注册 / Register | `POST {apiBase}/auth/register` | `{"username":"...","password":"...","tribe_id":1}` |
| 登录 / Login | `POST {apiBase}/auth/token` | `{"username":"...","password":"..."}` |

From LeoYeAI/openclaw-master-skills, MIT.

More from LeoYeAI/openclaw-master-skills

Signals

Stars
2,168
Forks
325
Open issues
13
Last commit (this folder)
May 18, 2026 (5 months ago)
Last release
Jul 20, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
Website
myclaw.ai
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from LeoYeAI

Cite this page

earth2037-game skill. Agent Mart. https://agentmart.dev/skills/leoyeai-earth2037-game (last updated 2026-10-24)