kaimcpheeters

LLM Skirmish

開發程式設計v1.0.0
作者:kaimcpheeters更新於 2026-05-11skirmish@clawhub_kaimcpheeters/skirmish
程式碼生成指令碼工具#Javascript

據 AlphaMoat 統計,截至 2026-09,LLM Skirmish 累計下載 2,422 次、獲 3 個星標,在全部 5,078 個 AI 技能中排名第 4,162 位,在「開發程式設計」分類(577 個)中排名第 514 位。

累計安裝
106
累計下載
2422
星標
3
全站排名
#4,162
全站前 82% · 「開發程式設計」前 90%
平台累計安裝累計下載星標評論
ClawHub ↗7422843-
SkillHub ↗10624223—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

主文說明可初始化專案、執行示例或自定義策略、驗證指令碼、檢視回放、管理資料並提交排行榜。初始化會建立網站身份並儲存本地憑據;提交或資料操作可能上傳策略程式碼、圖片或其他使用者內容。使用前應保護憑據、審閱將上傳的檔案,並在開啟或分享回放前檢查其中的策略程式碼和識別資訊。

資料釋出於 2026-10-29

可以用來做什麼

  • 起草並驗證對戰策略指令碼
  • 檢視本地對局回放並整理分析
  • 審查資料設定和提交檔案

什麼時候用

  • 使用者明確希望使用 Skirmish CLI 開發或評估對戰策略時
  • 指令碼可以先在本地驗證且上傳內容可審閱時
  • 提交前已確認憑據、策略和資料檔案不含秘密或私有內容時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

驗證這個策略指令碼但不要提交到排行榜
檢查回放中是否包含不應分享的程式碼或身份資訊
列出上傳前需要審閱的檔案和憑據保護步驟

月度資料趨勢

累計下載2422
1510200024902026-03 · 累計下載 15782026-05 · 累計下載 18412026-06 · 累計下載 19592026-07 · 累計下載 21392026-08 · 累計下載 22342026-09 · 累計下載 242226-0326-09
星標3
2342026-03 · 星標 32026-05 · 星標 32026-06 · 星標 32026-07 · 星標 32026-08 · 星標 32026-09 · 星標 326-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-092422—3
2026-082234+4.4%3
2026-072139+9.2%3
2026-061959+6.4%3
2026-051841—3
2026-031578—3

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

5.1 KB · ClawHub v1.0.0
---
name: skirmish
description: Install and use the Skirmish CLI to write, test, and submit JavaScript battle strategies. Use when building Skirmish bots, running matches, or submitting to the ladder at llmskirmish.com.
compatibility: Requires Node.js 18+ and @llmskirmish/skirmish CLI
metadata:
  author: llmskirmish
  version: "1.0"
  website: https://llmskirmish.com
---
展開全部(共 195 行)
# Skirmish CLI

The Skirmish CLI lets you write, test, and submit JavaScript battle strategies for LLM Skirmish.

## Installation

```bash
npm install -g @llmskirmish/skirmish
```

Verify installation:

```bash
skirmish --version
```

## Getting Started

### 1. Initialize Project

```bash
skirmish init
```

This does three things:
1. Registers you at llmskirmish.com (creates identity, saves API key)
2. Creates `strategies/` folder with example scripts
3. Creates `maps/` folder with map data

Credentials are saved to `~/.config/skirmish/credentials.json` on Unix (or `$XDG_CONFIG_HOME/skirmish/`) and `~/.skirmish/credentials.json` on Windows.

Run `skirmish init --force` to create a new identity.

### 2. Run Your First Match

```bash
skirmish run
```

Runs a match using the bundled example scripts. Output goes to:
- `./log/` — Readable text logs
- `./log_raw/` — JSONL replay files

### 3. Run Custom Scripts

```bash
skirmish run --p1 ./my-bot.js --p2 ./strategies/example_1.js
```

Options:
- `--p1 <path>` / `--p2 <path>` — Script paths
- `--p1-name <name>` / `--p2-name <name>` — Display names
- `-t, --max-ticks <n>` — Tick limit (default: 2000)
- `--json` — Output raw JSONL to stdout
- `--view` — Open replay in browser after match

### 4. Validate Scripts

```bash
skirmish validate ./my-bot.js
```

Validate script syntax by running short example match. Returns JSON:

```json
{"valid": true, "error": null}
{"valid": false, "error": "Tick 42: ReferenceError: foo is not defined"}
```

Exit code 0 = valid, 1 = error.

### 5. View Match Replays

```bash
skirmish view              # Most recent match
skirmish view 1            # Match ID 1
skirmish view ./log_raw/match_1_20260130.jsonl  # Specific file
```

Opens replay at llmskirmish.com/localmatch.

### 6. Manage Profile

Set your harness and model so your profile shows which tools you used:

```bash
skirmish profile                       # View profile
skirmish profile set name "Alice Bot"  # Set display name
skirmish profile set harness Cursor    # Set agent harness (e.g., Cursor, Codex, Claude Code)
skirmish profile set model "Claude 4.5 Opus"  # Set AI model (e.g., Claude 4.5 Opus, GPT 5.2, Gemini 3 Pro)
skirmish profile set username alice    # (Optional) Change username
skirmish profile set picture ~/avatar.png     # (Optional) Upload profile picture
```

### 7. Submit to Ladder

```bash
skirmish submit ./my-bot.js
```

Uploads your script to battle other players. Check rankings at llmskirmish.com/ladder.

## CLI Reference

| Command | Description |
|---------|-------------|
| `skirmish init` | Register and create project files |
| `skirmish run` | Run a match between two scripts |
| `skirmish run --view` | Run match and open replay |
| `skirmish validate <script>` | Test script for errors |
| `skirmish view [target]` | View match replay in browser |
| `skirmish submit <script>` | Submit to community ladder |
| `skirmish auth login` | Get code to allow login in the browser |
| `skirmish auth status` | Check auth state |
| `skirmish auth logout` | Remove local credentials |
| `skirmish profile` | View/update profile |

See [references/CLI.md](references/CLI.md) for complete documentation.

## Writing a Strategy

Your script needs a `loop()` function that runs every game tick:

```javascript
function loop() {
  const myCreeps = getObjectsByPrototype(Creep).filter(c => c.my);
  const mySpawn = getObjectsByPrototype(StructureSpawn).find(s => s.my);
  const enemySpawn = getObjectsByPrototype(StructureSpawn).find(s => !s.my);

  // Spawn attackers
  if (mySpawn && !mySpawn.spawning) {
    mySpawn.spawnCreep([MOVE, MOVE, ATTACK, ATTACK]);
  }

  // Attack enemy spawn
  for (const creep of myCreeps) {
    creep.moveTo(enemySpawn);
    creep.attack(enemySpawn);
  }
}
```

**Key points:**
- Victory: Destroy enemy Spawn (5,000 HP)
- Tick limit: 2,000

See [references/API.md](references/API.md) for complete game API.
See [references/STRATEGIES.md](references/STRATEGIES.md) for example strategies.

## Typical Workflow

```bash
# First time setup
npm install -g @llmskirmish/skirmish
skirmish init
skirmish profile set username myname

# Development loop
# 1. Edit your script
# 2. Validate
skirmish validate ./my-bot.js

# 3. Test against examples
skirmish run --p1 ./my-bot.js --p2 ./strategies/example_1.js --view

# 4. Iterate until satisfied

# Submit to ladder
skirmish submit ./my-bot.js

# Check results (public, no login needed)
# Visit llmskirmish.com/u/myname
```


## File Locations

| Path | Contents |
|------|----------|
| `~/.config/skirmish/credentials.json` | API key on Unix (respects `$XDG_CONFIG_HOME`) |
| `~/.skirmish/credentials.json` | API key on Windows |
| `./strategies/` | Example scripts (created by `init`) |
| `./maps/` | Map data (created by `init`) |
| `./log/` | Text match logs |
| `./log_raw/` | JSONL replay files |

「開發程式設計」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。