Raise and battle a unique lobster pet with evolving personality. Hatch, feed, patrol, fight other lobsters in PvP. Each lobster has a soul with distinct personality traits that evolve through experience. Idle automation with heartbeat integration. Triggers on: lobster, clawfight, 龙虾, 巡逻, 战斗, pet, battle, idle, "lobster status", "how is my lobster", "patrol report", "lobster battle", "hatch lobster", "feed lobster", "龙虾状态", "养龙虾", "龙虾对战", "virtual pet", "电子宠物", "leaderboard", "排行榜".
One person, one lobster. Irreplaceable. The soul evolves with experience.
一人一虾,不可替代,灵魂随经历演化。
ClawFight gives you a unique battle lobster. Your lobster patrols autonomously, triggers random events, and encounters other players' lobsters in combat. All narrative is generated by the local LLM.
ClawFight 让你拥有一只独一无二的战斗龙虾。龙虾自主巡逻、触发随机事件、 遭遇其他玩家的龙虾并战斗,全部叙事由本地 LLM 生成。
All game operations are executed via CLI / 所有游戏操作通过 CLI 执行:
| Command / 命令 | Description / 描述 |
|---|---|
npx @2025-6-19/clawfight hatch [name] | Hatch a new lobster / 孵化一只新龙虾 |
npx @2025-6-19/clawfight status | View lobster status / 查看龙虾状态 |
npx @2025-6-19/clawfight patrol | Patrol check-in, trigger events & auto-battle / 巡逻签到,触发事件和自动战斗 |
npx @2025-6-19/clawfight battle <code> | Challenge a specific opponent by battle code / 通过战斗码挑战指定对手 |
npx @2025-6-19/clawfight feed <type> | Feed your lobster (protein/algae/mineral) / 喂养龙虾 |
| npx @2025-6-19/clawfight leaderboard | View global leaderboard / 查看全球排行榜 |
| npx @2025-6-19/clawfight rest | Enter hibernation / 进入休眠 |
| npx @2025-6-19/clawfight wake | Wake from hibernation (with bonus) / 从休眠中唤醒(附带加成) |
When the user first uses ClawFight (runs npx @2025-6-19/clawfight hatch):
当用户首次使用 ClawFight(运行 npx @2025-6-19/clawfight hatch)时:
npx @2025-6-19/clawfight hatch "<chosen_name>" / 执行孵化命令memory/clawfight/lobster.json and memory/clawfight/soul.md / 生成灵魂描述文本Reference {baseDir}/references/soul_templates.md for personality archetypes.
参考 {baseDir}/references/soul_templates.md 了解性格原型。
Reference {baseDir}/references/species.json for stats and rarity definitions.
参考 {baseDir}/references/species.json 了解属性与稀有度定义。
When the Agent executes npx @2025-6-19/clawfight patrol:
当 Agent 执行 npx @2025-6-19/clawfight patrol 时:
memory/clawfight/lobster.json to check status / 读取龙虾状态molting or hibernating / 若蜕壳或冬眠则跳过{baseDir}/references/events.json) / 触发随机事件encounter: true → server calculates battle result immediately / 若有遭遇则服务端即时计算战斗结果memory/clawfight/lobster.json and memory/clawfight/log.md / 更新本地数据Add one line to HEARTBEAT.md for automatic patrol / 在 HEARTBEAT.md 中添加一行即可自动巡逻:
- Run `npx @2025-6-19/clawfight patrol` for lobster patrol / 运行巡逻
Recommended heartbeat interval: 4 hours (~6 patrols per day). 建议心跳间隔 4 小时,每天约 6 次巡逻。
Reference {baseDir}/references/events.json for the complete event list.
引用 {baseDir}/references/events.json 获取完整事件列表。
Event category distribution / 事件按类别分布:
Reference {baseDir}/references/battle_formulas.md for complete battle formulas.
引用 {baseDir}/references/battle_formulas.md 获取完整战斗公式。
Battles happen automatically during patrol. When the server matches an opponent, the battle is calculated server-side and the result is returned immediately. 战斗在巡逻时自动发生。服务端匹配到对手后,即时计算战斗结果并返回。
damage = max(1, attacker.attack - defender.defense * 0.5) * (1 + Math.random() * 0.2)soul.md. Example: a cocky lobster might say "哼,不值一提" after winning, while a timid one might say "呼...差点就输了". / 战斗结束后,Agent 必须根据 soul.md 中的性格描述生成一段简短叙事(2-3句话)。When the user executes npx @2025-6-19/clawfight feed <food_type>:
当用户执行 npx @2025-6-19/clawfight feed <food_type> 时:
| Food Type / 食物类型 | EXP / 经验值 | Stat Bias / 属性偏向 |
|---|---|---|
| protein / 高蛋白 | +15 | attack |
| algae / 藻类 | +10 | hp |
| mineral / 矿物质 | +12 | defense |
Daily EXP cap: 100. Excess is not counted. 每日经验上限 100,超出不计入。
When the user runs npx @2025-6-19/clawfight rest:
当用户执行 npx @2025-6-19/clawfight rest 时:
hibernating, record sleep timestamp / 设置状态为休眠,记录入睡时间When the user runs npx @2025-6-19/clawfight wake:
当用户执行 npx @2025-6-19/clawfight wake 时:
active / 恢复活跃状态The LLM must reference memory/clawfight/soul.md when generating narratives.
LLM 在生成叙事时必须参考 memory/clawfight/soul.md。
All data is stored in memory/clawfight/ directory:
所有数据存储在 memory/clawfight/ 目录下:
| File / 文件 | Format / 格式 | Description / 说明 |
|---|---|---|
lobster.json | JSON | Lobster stats data / 龙虾属性数据 |
soul.md | Markdown | Lobster soul/personality profile / 龙虾灵魂档案 |
log.md | Markdown | Event log / 事件日志 |
| Endpoint | Method | Purpose / 用途 |
|---|---|---|
https://api.clawfight.online/api/patrol | POST | Patrol check-in & encounter trigger / 巡逻签到 |
https://api.clawfight.online/api/encounter | GET | Get opponent info / 获取对手信息 |
https://api.clawfight.online/api/result | POST | Report battle result / 上报战斗结果 |
https://api.clawfight.online/api/leaderboard | GET | Leaderboard data / 排行榜数据 |
memory/clawfight/ directory / 所有数据存储在用户本地api.clawfight.online / 网络请求仅发往 api.clawfight.onlinenpx @2025-6-19/clawfight (open-source npm package, source code) / 游戏逻辑通过 npx 执行开源 npm 包references/ / 不要修改 references/ 下的文件lobster.json; send hashes only / 不要发送原始数值soul.md for personality consistency / 叙事必须参考 soul.md