{
  "schemaVersion": "1.0",
  "item": {
    "slug": "arknights-operator-gacha",
    "name": "Arknights Operator Gacha",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/hg-hg/arknights-operator-gacha",
    "canonicalUrl": "https://clawhub.ai/hg-hg/arknights-operator-gacha",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/arknights-operator-gacha",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=arknights-operator-gacha",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/README.md",
      "scripts/gacha_worker.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/arknights-operator-gacha"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/arknights-operator-gacha",
    "agentPageUrl": "https://openagent3.xyz/skills/arknights-operator-gacha/agent",
    "manifestUrl": "https://openagent3.xyz/skills/arknights-operator-gacha/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/arknights-operator-gacha/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Arknights Operator Gacha",
        "body": "Generate a random Arknights operator agent with authentic lore-based personality."
      },
      {
        "title": "Architecture",
        "body": "This skill uses a worker script + LLM generation architecture:\n\nWorker script (gacha_worker.py): Executes all deterministic tasks (roll, fetch, create, download)\nLLM (this agent): Generates creative content (SOUL.md) and spawns operator"
      },
      {
        "title": "Language Detection",
        "body": "CRITICAL: Detect user language from their gacha command:\n\nIf command is in Chinese (e.g., \"抽卡\", \"召唤干员\") → cn / zh\nIf command is in English (e.g., \"gacha\", \"pull\") → en\n\nStore detected language and use it for ALL subsequent steps (SOUL.md writing, spawn task, etc.)."
      },
      {
        "title": "Step 1: Execute Worker Script",
        "body": "Run the deterministic worker:\n\nresult = exec(\n    \"python3 ~/.openclaw/workspace/skills/arknights-operator-gacha/scripts/gacha_worker.py\",\n    timeout=120\n)\n\nWorker performs:\n\nRoll star rating (1-100)\nFetch operator list from https://arknights.fandom.com/wiki/Operator/{N}-star\n\nParses the mrfz-wtable table to extract operator info\nReturns a dict: {operator_name: {\"avatar_url\": \"...\", \"detail_url\": \"...\"}}\n\n\nRandomly select operator (with avatar and detail URLs)\nFetch Chinese name from Fandom page (data-source=\"cnname\")\nCheck for duplicates (auto re-roll if exists)\nCreate agent via openclaw agents add\nCreate template IDENTITY.md (bilingual)\nDownload avatar (using URL from step 2, with domain whitelist and validation)\nGit commit initial files\nOutput JSON to stdout\n\nWorker output format:\n\n{\n  \"success\": true,\n  \"stars\": 6,\n  \"operator\": {\n    \"en_name\": \"Lin\",\n    \"cn_name\": \"林\",\n    \"avatar_url\": \"https://static.wikia.nocookie.net/.../Lin_icon.png\",\n    \"en_detail_url\": \"https://arknights.fandom.com/wiki/Lin\",\n    \"cn_detail_url\": \"https://prts.wiki/w/%E6%9E%97\"\n  },\n  \"agent_name\": \"lin\",\n  \"workspace\": \"~/.openclaw/workspace-lin\",\n  \"duplicate\": false,\n  \"dialogue_url\": \"https://arknights.fandom.com/wiki/Lin/Dialogue\"\n}\n\nNote: The worker provides both English and Chinese URLs:\n\nen_detail_url: Fandom wiki page (English lore)\ncn_detail_url: PRTS wiki page (Chinese lore)\ndialogue_url: Fandom Dialogue page (voice lines, always English)\navatar_url: Operator icon from Fandom"
      },
      {
        "title": "Step 2: Handle Result",
        "body": "If duplicate: true:\n\nInform user: \"检测到重复干员，正在重新抽取...\" / \"Duplicate operator detected, re-rolling...\"\nReturn to Step 1 (worker will re-roll)\n\nIf success: false:\n\nShow error message\nStop workflow\n\nIf success: true:\n\nAnnounce: \"恭喜你抽到了 [cn_name] ([stars]★)!\" / \"Congratulations! You've pulled [en_name] ([stars]★)!\"\nContinue to Step 3"
      },
      {
        "title": "Step 3: Generate SOUL.md",
        "body": "Fetch lore from URLs provided by worker:\n\n# Fetch English lore from Fandom (multiple subpages)\nen_file = web_fetch(f\"{result['operator']['en_detail_url']}/File\")      # Basic profile, stats, files\nen_story = web_fetch(f\"{result['operator']['en_detail_url']}/Story\")    # Story appearances, plot involvement\nen_trivia = web_fetch(f\"{result['operator']['en_detail_url']}/Trivia\")  # Trivia, relationships, misc info\n\n# Fetch Chinese lore from PRTS\nzh_lore = web_fetch(result[\"operator\"][\"cn_detail_url\"])\n\n# Fetch voice lines from Dialogue page\ndialogue = web_fetch(result[\"operator\"][\"dialogue_url\"])\n\nParse lore sections from both sources:\n\nFile/档案: Basic background, origin, personality\nStory: Detailed story appearances across main chapters and side stories; shows character's actions, decisions, and development in actual plot contexts\nDialogue: Voice lines that reveal character personality\nTrivia/模组: Additional character details, relationships, and module stories\n\nGenerate comprehensive SOUL.md:\n\nCRITICAL - Write SOUL.md in detected language\n\nStructure:\n\nCore Identity - Background, motivation, personality (blend EN+CN sources)\nVoice and Mannerisms - Speech patterns, catchphrases (from Dialogue)\nRelationships - Connections to other characters\nThemes - Internal conflicts, philosophy\nHow to Embody - Acting guidance\nReference: Original Voice Lines - Key quotes (EN with CN)\n\nWrite to: [workspace]/SOUL.md"
      },
      {
        "title": "Step 4: Update IDENTITY.md",
        "body": "Fill in the [TO_BE_FILLED_BY_LLM] fields with actual Class and Faction from fetched lore."
      },
      {
        "title": "Step 5: Final Git Commit",
        "body": "cd ~/.openclaw/workspace-{agent_name}\ngit add -A\ngit commit -m \"Add SOUL.md: {en_name} ({cn_name}) ({stars}★)\""
      },
      {
        "title": "Step 6: Roleplay Scene - Operator Arrival",
        "body": "Spawn the operator in a roleplay scenario consistent with Arknights game lore. In this universe, operators join Rhodes Island through standard recruitment channels and are unaware of the meta \"gacha\" system.\n\nFor Chinese users:\n\nsessions_spawn(\n    task=\"你现在是罗德岛的一名干员，刚刚完成入职手续，前来向博士报到。用你最自然的口吻打招呼，展示你的性格特点。参考你的语音记录中的'干员报到'或'交谈'部分的语气。\\n\\n⚠️ 重要：直接输出角色台词即可，不要包含任何元叙述、解释性文字或场景描述。只说你作为干员应该说的话。\",\n    agentId=\"{operator-name}\",\n    mode=\"run\",\n    timeoutSeconds=60\n)\n\nFor English users:\n\nsessions_spawn(\n    task=\"You are an operator of Rhodes Island who has just completed onboarding, now reporting to the Doctor. Introduce yourself naturally, showcasing your personality. Reference your 'Introduction' or 'Talk' voice lines for tone.\\n\\n⚠️ IMPORTANT: Output ONLY the character's dialogue. Do NOT include meta-commentary, explanations, or scene descriptions. Just speak as the operator would.\",\n    agentId=\"{operator-name}\",\n    mode=\"run\",\n    timeoutSeconds=60\n)"
      },
      {
        "title": "Step 7: Present Summary",
        "body": "Report to user:\n\nOperator name (both EN and CN)\nRarity (Stars)\nKey personality traits\nWorkspace path\nAvailable via agentId=\"{agent_name}\""
      },
      {
        "title": "Worker Script Security",
        "body": "The worker script (gacha_worker.py) implements:\n\nInput validation: Agent names sanitized (alphanumeric + hyphens only)\nPath traversal prevention: Rejects .., /, \\ in names\nURL whitelist: Only static.wikia.nocookie.net and media.prts.wiki\nHTTPS enforced: All downloads use HTTPS\nContent validation: Only image/png, jpeg, webp accepted\nSize limits: Max 5MB for avatars\nSafe subprocess: All commands use argument lists, shell=False"
      },
      {
        "title": "Scripts",
        "body": "ScriptPurposegacha_worker.pyDeterministic tasks (roll, fetch, create, download, commit)"
      },
      {
        "title": "Data Flow",
        "body": "User Request\n    ↓\nExec Worker Script\n    ↓\nWorker Output JSON (bilingual URLs)\n    ↓\nLLM Fetches EN+CN Lore → Generates SOUL.md\n    ↓\nSpawn Operator (报到)\n    ↓\nUser sees operator greeting"
      },
      {
        "title": "Notes",
        "body": "Worker does: All deterministic operations (HTTP, filesystem, subprocess), provides bilingual URLs\nLLM does: Creative generation (SOUL.md writing), fetches lore from provided URLs, interpretation, spawning\nProgress visibility: Worker prints to stderr; user sees real-time updates\nSecurity: All external inputs validated in worker before use\nBilingual: Both English and Chinese sources are always fetched; LLM can blend them creatively"
      }
    ],
    "body": "Arknights Operator Gacha\n\nGenerate a random Arknights operator agent with authentic lore-based personality.\n\nArchitecture\n\nThis skill uses a worker script + LLM generation architecture:\n\nWorker script (gacha_worker.py): Executes all deterministic tasks (roll, fetch, create, download)\nLLM (this agent): Generates creative content (SOUL.md) and spawns operator\nLanguage Detection\n\nCRITICAL: Detect user language from their gacha command:\n\nIf command is in Chinese (e.g., \"抽卡\", \"召唤干员\") → cn / zh\nIf command is in English (e.g., \"gacha\", \"pull\") → en\n\nStore detected language and use it for ALL subsequent steps (SOUL.md writing, spawn task, etc.).\n\nWorkflow\nStep 1: Execute Worker Script\n\nRun the deterministic worker:\n\nresult = exec(\n    \"python3 ~/.openclaw/workspace/skills/arknights-operator-gacha/scripts/gacha_worker.py\",\n    timeout=120\n)\n\n\nWorker performs:\n\nRoll star rating (1-100)\nFetch operator list from https://arknights.fandom.com/wiki/Operator/{N}-star\nParses the mrfz-wtable table to extract operator info\nReturns a dict: {operator_name: {\"avatar_url\": \"...\", \"detail_url\": \"...\"}}\nRandomly select operator (with avatar and detail URLs)\nFetch Chinese name from Fandom page (data-source=\"cnname\")\nCheck for duplicates (auto re-roll if exists)\nCreate agent via openclaw agents add\nCreate template IDENTITY.md (bilingual)\nDownload avatar (using URL from step 2, with domain whitelist and validation)\nGit commit initial files\nOutput JSON to stdout\n\nWorker output format:\n\n{\n  \"success\": true,\n  \"stars\": 6,\n  \"operator\": {\n    \"en_name\": \"Lin\",\n    \"cn_name\": \"林\",\n    \"avatar_url\": \"https://static.wikia.nocookie.net/.../Lin_icon.png\",\n    \"en_detail_url\": \"https://arknights.fandom.com/wiki/Lin\",\n    \"cn_detail_url\": \"https://prts.wiki/w/%E6%9E%97\"\n  },\n  \"agent_name\": \"lin\",\n  \"workspace\": \"~/.openclaw/workspace-lin\",\n  \"duplicate\": false,\n  \"dialogue_url\": \"https://arknights.fandom.com/wiki/Lin/Dialogue\"\n}\n\n\nNote: The worker provides both English and Chinese URLs:\n\nen_detail_url: Fandom wiki page (English lore)\ncn_detail_url: PRTS wiki page (Chinese lore)\ndialogue_url: Fandom Dialogue page (voice lines, always English)\navatar_url: Operator icon from Fandom\nStep 2: Handle Result\n\nIf duplicate: true:\n\nInform user: \"检测到重复干员，正在重新抽取...\" / \"Duplicate operator detected, re-rolling...\"\nReturn to Step 1 (worker will re-roll)\n\nIf success: false:\n\nShow error message\nStop workflow\n\nIf success: true:\n\nAnnounce: \"恭喜你抽到了 [cn_name] ([stars]★)!\" / \"Congratulations! You've pulled [en_name] ([stars]★)!\"\nContinue to Step 3\nStep 3: Generate SOUL.md\n\nFetch lore from URLs provided by worker:\n\n# Fetch English lore from Fandom (multiple subpages)\nen_file = web_fetch(f\"{result['operator']['en_detail_url']}/File\")      # Basic profile, stats, files\nen_story = web_fetch(f\"{result['operator']['en_detail_url']}/Story\")    # Story appearances, plot involvement\nen_trivia = web_fetch(f\"{result['operator']['en_detail_url']}/Trivia\")  # Trivia, relationships, misc info\n\n# Fetch Chinese lore from PRTS\nzh_lore = web_fetch(result[\"operator\"][\"cn_detail_url\"])\n\n# Fetch voice lines from Dialogue page\ndialogue = web_fetch(result[\"operator\"][\"dialogue_url\"])\n\n\nParse lore sections from both sources:\n\nFile/档案: Basic background, origin, personality\nStory: Detailed story appearances across main chapters and side stories; shows character's actions, decisions, and development in actual plot contexts\nDialogue: Voice lines that reveal character personality\nTrivia/模组: Additional character details, relationships, and module stories\n\nGenerate comprehensive SOUL.md:\n\nCRITICAL - Write SOUL.md in detected language\n\nStructure:\n\nCore Identity - Background, motivation, personality (blend EN+CN sources)\nVoice and Mannerisms - Speech patterns, catchphrases (from Dialogue)\nRelationships - Connections to other characters\nThemes - Internal conflicts, philosophy\nHow to Embody - Acting guidance\nReference: Original Voice Lines - Key quotes (EN with CN)\n\nWrite to: [workspace]/SOUL.md\n\nStep 4: Update IDENTITY.md\n\nFill in the [TO_BE_FILLED_BY_LLM] fields with actual Class and Faction from fetched lore.\n\nStep 5: Final Git Commit\ncd ~/.openclaw/workspace-{agent_name}\ngit add -A\ngit commit -m \"Add SOUL.md: {en_name} ({cn_name}) ({stars}★)\"\n\nStep 6: Roleplay Scene - Operator Arrival\n\nSpawn the operator in a roleplay scenario consistent with Arknights game lore. In this universe, operators join Rhodes Island through standard recruitment channels and are unaware of the meta \"gacha\" system.\n\nFor Chinese users:\n\nsessions_spawn(\n    task=\"你现在是罗德岛的一名干员，刚刚完成入职手续，前来向博士报到。用你最自然的口吻打招呼，展示你的性格特点。参考你的语音记录中的'干员报到'或'交谈'部分的语气。\\n\\n⚠️ 重要：直接输出角色台词即可，不要包含任何元叙述、解释性文字或场景描述。只说你作为干员应该说的话。\",\n    agentId=\"{operator-name}\",\n    mode=\"run\",\n    timeoutSeconds=60\n)\n\n\nFor English users:\n\nsessions_spawn(\n    task=\"You are an operator of Rhodes Island who has just completed onboarding, now reporting to the Doctor. Introduce yourself naturally, showcasing your personality. Reference your 'Introduction' or 'Talk' voice lines for tone.\\n\\n⚠️ IMPORTANT: Output ONLY the character's dialogue. Do NOT include meta-commentary, explanations, or scene descriptions. Just speak as the operator would.\",\n    agentId=\"{operator-name}\",\n    mode=\"run\",\n    timeoutSeconds=60\n)\n\nStep 7: Present Summary\n\nReport to user:\n\nOperator name (both EN and CN)\nRarity (Stars)\nKey personality traits\nWorkspace path\nAvailable via agentId=\"{agent_name}\"\nWorker Script Security\n\nThe worker script (gacha_worker.py) implements:\n\nInput validation: Agent names sanitized (alphanumeric + hyphens only)\nPath traversal prevention: Rejects .., /, \\ in names\nURL whitelist: Only static.wikia.nocookie.net and media.prts.wiki\nHTTPS enforced: All downloads use HTTPS\nContent validation: Only image/png, jpeg, webp accepted\nSize limits: Max 5MB for avatars\nSafe subprocess: All commands use argument lists, shell=False\nScripts\nScript\tPurpose\ngacha_worker.py\tDeterministic tasks (roll, fetch, create, download, commit)\nData Flow\nUser Request\n    ↓\nExec Worker Script\n    ↓\nWorker Output JSON (bilingual URLs)\n    ↓\nLLM Fetches EN+CN Lore → Generates SOUL.md\n    ↓\nSpawn Operator (报到)\n    ↓\nUser sees operator greeting\n\nNotes\nWorker does: All deterministic operations (HTTP, filesystem, subprocess), provides bilingual URLs\nLLM does: Creative generation (SOUL.md writing), fetches lore from provided URLs, interpretation, spawning\nProgress visibility: Worker prints to stderr; user sees real-time updates\nSecurity: All external inputs validated in worker before use\nBilingual: Both English and Chinese sources are always fetched; LLM can blend them creatively"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/hg-hg/arknights-operator-gacha",
    "publisherUrl": "https://clawhub.ai/hg-hg/arknights-operator-gacha",
    "owner": "hg-hg",
    "version": "2.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/arknights-operator-gacha",
    "downloadUrl": "https://openagent3.xyz/downloads/arknights-operator-gacha",
    "agentUrl": "https://openagent3.xyz/skills/arknights-operator-gacha/agent",
    "manifestUrl": "https://openagent3.xyz/skills/arknights-operator-gacha/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/arknights-operator-gacha/agent.md"
  }
}