TopRank Skills

Home / Claw Skills / Analyse des données / arknights-operator-gacha
Official OpenClaw rules 54%

arknights-operator-gacha

Generate an Arknights operator agent based on gacha probabilities. Use when user wants to create a random Arknights character agent with authentic lore and personality.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 arknights-operator-gacha 技能。 若已安装,则直接安装 arknights-operator-gacha 技能。

Overview

Skill Key
hg-hg/arknights-operator-gacha
Author
hg-hg
Source Repo
openclaw/skills
Version
-
Source Path
skills/hg-hg/arknights-operator-gacha
Latest Commit SHA
7215e30af781436991e97a9f5c3210389e323fd0

Extracted Content

SKILL.md excerpt

# Arknights Operator Gacha

Generate a random Arknights operator agent with authentic lore-based personality.

## Architecture

This skill uses a **worker script + LLM generation** architecture:
1. **Worker script** (`gacha_worker.py`): Executes all deterministic tasks (roll, fetch, create, download)
2. **LLM (this agent)**: Generates creative content (SOUL.md) and spawns operator

## Language Detection

**CRITICAL:** Detect user language from their gacha command:
- If command is in **Chinese** (e.g., "抽卡", "召唤干员") → **cn** / **zh**
- If command is in **English** (e.g., "gacha", "pull") → **en**

Store detected language and use it for ALL subsequent steps (SOUL.md writing, spawn task, etc.).

## Workflow

### Step 1: Execute Worker Script

Run the deterministic worker:

```python
result = exec(
    "python3 ~/.openclaw/workspace/skills/arknights-operator-gacha/scripts/gacha_worker.py",
    timeout=120
)
```

**Worker performs:**
1. Roll star rating (1-100)
2. Fetch operator list from `https://arknights.fandom.com/wiki/Operator/{N}-star`
   - Parses the `mrfz-wtable` table to extract operator info
   - Returns a dict: `{operator_name: {"avatar_url": "...", "detail_url": "..."}}`
3. Randomly select operator (with avatar and detail URLs)
4. Fetch Chinese name from Fandom page (data-source="cnname")
5. Check for duplicates (auto re-roll if exists)
6. Create agent via `openclaw agents add`
7. Create template IDENTITY.md (bilingual)
8. **Download avatar** (using URL from step 2, with domain whitelist and validation)
9. Git commit initial files
10. **Output JSON to stdout**

**Worker output format:**
```json
{
  "success": true,
  "stars": 6,
  "operator": {
    "en_name": "Lin",
    "cn_name": "林",
    "avatar_url": "https://static.wikia.nocookie.net/.../Lin_icon.png",
    "en_detail_url": "https://arknights.fandom.com/wiki/Lin",
    "cn_detail_url": "https://prts.wiki/w/%E6%9E%97"
  },
  "agent_name": "lin",
  "workspace": "~/.openclaw/workspace-lin",
  "duplicate...

Related Claw Skills