Search

PythonReactSEOPDF
OpenClaw

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.

hg-hg0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install hg-hg/arknights-operator-gacha

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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:

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:

{
  "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...

Source information

Source
github
Repository
openclaw/skills
Path
skills/hg-hg/arknights-operator-gacha
Version
—
Commit
7215e30af781436991e97a9f5c3210389e323fd0
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# 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 skills

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.