{
  "schemaVersion": "1.0",
  "item": {
    "slug": "checkmate",
    "name": "Checkmate",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/InsipidPoint/checkmate",
    "canonicalUrl": "https://clawhub.ai/InsipidPoint/checkmate",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/checkmate",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=checkmate",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "prompts/criteria-judge.md",
      "prompts/intake.md",
      "prompts/judge.md",
      "prompts/orchestrator.md"
    ],
    "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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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/checkmate"
    },
    "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/checkmate",
    "agentPageUrl": "https://openagent3.xyz/skills/checkmate/agent",
    "manifestUrl": "https://openagent3.xyz/skills/checkmate/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/checkmate/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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Checkmate",
        "body": "A deterministic Python loop (scripts/run.py) calls an LLM for worker and judge roles.\nNothing leaves until it passes — and you stay in control at every checkpoint."
      },
      {
        "title": "Requirements",
        "body": "OpenClaw platform CLI (openclaw) — must be available in PATH. Used for:\n\nopenclaw gateway call sessions.list — resolve session UUID for turn injection\nopenclaw agent --session-id <UUID> — inject checkpoint messages into the live session\nopenclaw message send — fallback channel delivery (e.g. Telegram, Signal)\n\n\nPython 3 — run.py is pure stdlib; no pip packages required\nNo separate API keys or env vars needed — routes through the gateway's existing OAuth"
      },
      {
        "title": "Security & Privilege Model",
        "body": "⚠️ This is a high-privilege skill. Read before using in batch/automated mode.\n\nSpawned workers and judges inherit full host-agent runtime, including:\n\nexec (arbitrary shell commands)\nweb_search, web_fetch\nAll installed skills (including those with OAuth-bound credentials — Gmail, Drive, etc.)\nsessions_spawn (workers can spawn further sub-agents)\n\nThis means the task description you provide directly controls what the worker does — treat it like code you're about to run, not a message you're about to send.\n\nBatch mode (--no-interactive) removes all human gates. In interactive mode (default), you approve criteria and each checkpoint before the loop continues. In batch mode, criteria are auto-approved and the loop runs to completion autonomously — only use this for tasks and environments you fully trust.\n\nUser-input bridging writes arbitrary content to disk. When you reply to a checkpoint, the main agent writes your reply verbatim to user-input.md in the workspace. The orchestrator reads it and acts on it. Don't relay untrusted third-party content as checkpoint replies."
      },
      {
        "title": "When to Use",
        "body": "Use checkmate when correctness matters more than speed — when \"good enough on the first try\" isn't acceptable.\n\nGood fits:\n\nCode that must pass tests or meet a spec\nDocs or reports that must hit a defined quality bar\nResearch that must be thorough and cover specific ground\nAny task where you'd otherwise iterate manually until satisfied\n\nTrigger phrases (say any of these):\n\ncheckmate: TASK\nkeep iterating until it passes\ndon't stop until done\nuntil it passes\nquality loop: TASK\niterate until satisfied\njudge and retry\nkeep going until done"
      },
      {
        "title": "Architecture",
        "body": "scripts/run.py  (deterministic Python while loop — the orchestrator)\n  ├─ Intake loop [up to max_intake_iter, default 5]:\n  │    ├─ Draft criteria (intake prompt + task + refinement feedback)\n  │    ├─ ⏸ USER REVIEW: show draft → wait for approval or feedback\n  │    │     approved? → lock criteria.md\n  │    │     feedback? → refine, next intake iteration\n  │    └─ (non-interactive: criteria-judge gates instead of user)\n  │\n  ├─ ⏸ PRE-START GATE: show final task + criteria → user confirms \"go\"\n  │         (edit task / cancel supported here)\n  │\n  └─ Main loop [up to max_iter, default 10]:\n       ├─ Worker: spawn agent session → iter-N/output.md\n       │          (full runtime: exec, web_search, all skills, OAuth auth)\n       ├─ Judge:  spawn agent session → iter-N/verdict.md\n       ├─ PASS?  → write final-output.md, notify user, exit\n       └─ FAIL?  → extract gaps → ⏸ CHECKPOINT: show score + gaps to user\n                     continue?  → next iteration (with judge gaps)\n                     redirect:X → next iteration (with user direction appended)\n                     stop?      → end loop, take best result so far\n\nInteractive mode (default): user approves criteria, confirms pre-start, and reviews each FAIL checkpoint.\nBatch mode (--no-interactive): fully autonomous; criteria-judge gates intake, no checkpoints."
      },
      {
        "title": "User Input Bridge",
        "body": "When the orchestrator needs user input, it:\n\nWrites workspace/pending-input.json (kind + workspace path)\nSends a notification via --recipient and --channel\nPolls workspace/user-input.md every 5s (up to --checkpoint-timeout minutes)\n\nThe main agent acts as the bridge: when pending-input.json exists and the user replies, the agent writes their response to user-input.md. The orchestrator picks it up automatically.\n\nEach agent session is spawned via:\n\nopenclaw agent --session-id <isolated-id> --message <prompt> --timeout <N> --json\n\nRoutes through the gateway WebSocket using existing OAuth — no separate API key.\nWorkers get full agent runtime: exec, web_search, web_fetch, all skills, sessions_spawn."
      },
      {
        "title": "Your Job (main agent)",
        "body": "When checkmate is triggered:\n\nGet your session UUID (for direct agent-turn injection):\nopenclaw gateway call sessions.list --params '{\"limit\":1}' --json \\\n  | python3 -c \"import json,sys; s=json.load(sys.stdin)['sessions'][0]; print(s['sessionId'])\"\n\nAlso note your --recipient (channel user/chat ID) and --channel as fallback.\n\n\nCreate workspace:\nbash <skill-path>/scripts/workspace.sh /tmp \"TASK\"\n\nPrints the workspace path. Write the full task to workspace/task.md if needed.\n\n\nRun the orchestrator (background exec):\npython3 <skill-path>/scripts/run.py \\\n  --workspace /tmp/checkmate-TIMESTAMP \\\n  --task \"FULL TASK DESCRIPTION\" \\\n  --max-iter 10 \\\n  --session-uuid YOUR_SESSION_UUID \\\n  --recipient YOUR_RECIPIENT_ID \\\n  --channel <your-channel>\n\nUse exec with background=true. This runs for as long as needed.\nAdd --no-interactive for fully autonomous runs (no user checkpoints).\n\n\nTell the user checkmate is running, what it's working on, and that they'll receive criteria drafts and checkpoint messages via your configured channel to review and approve.\n\n\nBridge user replies: When user responds to a checkpoint message, check for pending-input.json and write their response to workspace/user-input.md."
      },
      {
        "title": "Bridging User Input",
        "body": "When a checkpoint message arrives (the orchestrator sent the user a criteria/approval/checkpoint request), bridge their reply:\n\n# Find active pending input\ncat <workspace-parent>/checkmate-*/pending-input.json 2>/dev/null\n\n# Route user's reply\necho \"USER REPLY HERE\" > /path/to/workspace/user-input.md\n\nThe orchestrator polls for this file every 5 seconds. Once written, it resumes automatically and deletes the file.\n\nAccepted replies at each gate:\n\nGateContinueRedirectCancelCriteria review\"ok\", \"approve\", \"lgtm\"any feedback text—Pre-start\"go\", \"start\", \"ok\"\"edit task: NEW TASK\"\"cancel\"Iteration checkpoint\"continue\", (empty)\"redirect: DIRECTION\"\"stop\""
      },
      {
        "title": "Parameters",
        "body": "FlagDefaultNotes--max-intake-iter5Intake criteria refinement iterations--max-iter10Main loop iterations (increase to 20 for complex tasks)--worker-timeout3600sPer worker session--judge-timeout300sPer judge session--session-uuid—Agent session UUID (from sessions.list); used for direct turn injection — primary notification path--recipient—Channel recipient ID (e.g. user/chat ID, E.164 phone number); fallback if injection fails--channel—Delivery channel for fallback notifications (e.g. telegram, whatsapp, signal)--no-interactiveoffDisable user checkpoints (batch mode)--checkpoint-timeout60Minutes to wait for user reply at each checkpoint"
      },
      {
        "title": "Workspace layout",
        "body": "memory/checkmate-YYYYMMDD-HHMMSS/\n├── task.md               # task description (user may edit pre-start)\n├── criteria.md           # locked after intake\n├── feedback.md           # accumulated judge gaps + user direction\n├── state.json            # {iteration, status} — resume support\n├── pending-input.json    # written when waiting for user; deleted after response\n├── user-input.md         # agent writes user's reply here; read + deleted by orchestrator\n├── intake-01/\n│   ├── criteria-draft.md\n│   ├── criteria-verdict.md  (non-interactive only)\n│   └── user-feedback.md     (interactive: user's review comments)\n├── iter-01/\n│   ├── output.md         # worker output\n│   └── verdict.md        # judge verdict\n└── final-output.md       # written on completion"
      },
      {
        "title": "Resume",
        "body": "If the script is interrupted, just re-run it with the same --workspace. It reads state.json and skips completed steps. Locked criteria.md is reused; completed iter-N/output.md files are not re-run."
      },
      {
        "title": "Prompts",
        "body": "Active prompts called by run.py:\n\nprompts/intake.md — converts task → criteria draft\nprompts/criteria-judge.md — evaluates criteria quality (APPROVED / NEEDS_WORK) — used in non-interactive mode\nprompts/worker.md — worker prompt (variables: TASK, CRITERIA, FEEDBACK, ITERATION, MAX_ITER, OUTPUT_PATH)\nprompts/judge.md — evaluates output against criteria (PASS / FAIL)\n\nReference only (not called by run.py):\n\nprompts/orchestrator.md — architecture documentation explaining the design rationale"
      }
    ],
    "body": "Checkmate\n\nA deterministic Python loop (scripts/run.py) calls an LLM for worker and judge roles. Nothing leaves until it passes — and you stay in control at every checkpoint.\n\nRequirements\nOpenClaw platform CLI (openclaw) — must be available in PATH. Used for:\nopenclaw gateway call sessions.list — resolve session UUID for turn injection\nopenclaw agent --session-id <UUID> — inject checkpoint messages into the live session\nopenclaw message send — fallback channel delivery (e.g. Telegram, Signal)\nPython 3 — run.py is pure stdlib; no pip packages required\nNo separate API keys or env vars needed — routes through the gateway's existing OAuth\nSecurity & Privilege Model\n\n⚠️ This is a high-privilege skill. Read before using in batch/automated mode.\n\nSpawned workers and judges inherit full host-agent runtime, including:\n\nexec (arbitrary shell commands)\nweb_search, web_fetch\nAll installed skills (including those with OAuth-bound credentials — Gmail, Drive, etc.)\nsessions_spawn (workers can spawn further sub-agents)\n\nThis means the task description you provide directly controls what the worker does — treat it like code you're about to run, not a message you're about to send.\n\nBatch mode (--no-interactive) removes all human gates. In interactive mode (default), you approve criteria and each checkpoint before the loop continues. In batch mode, criteria are auto-approved and the loop runs to completion autonomously — only use this for tasks and environments you fully trust.\n\nUser-input bridging writes arbitrary content to disk. When you reply to a checkpoint, the main agent writes your reply verbatim to user-input.md in the workspace. The orchestrator reads it and acts on it. Don't relay untrusted third-party content as checkpoint replies.\n\nWhen to Use\n\nUse checkmate when correctness matters more than speed — when \"good enough on the first try\" isn't acceptable.\n\nGood fits:\n\nCode that must pass tests or meet a spec\nDocs or reports that must hit a defined quality bar\nResearch that must be thorough and cover specific ground\nAny task where you'd otherwise iterate manually until satisfied\n\nTrigger phrases (say any of these):\n\ncheckmate: TASK\nkeep iterating until it passes\ndon't stop until done\nuntil it passes\nquality loop: TASK\niterate until satisfied\njudge and retry\nkeep going until done\nArchitecture\nscripts/run.py  (deterministic Python while loop — the orchestrator)\n  ├─ Intake loop [up to max_intake_iter, default 5]:\n  │    ├─ Draft criteria (intake prompt + task + refinement feedback)\n  │    ├─ ⏸ USER REVIEW: show draft → wait for approval or feedback\n  │    │     approved? → lock criteria.md\n  │    │     feedback? → refine, next intake iteration\n  │    └─ (non-interactive: criteria-judge gates instead of user)\n  │\n  ├─ ⏸ PRE-START GATE: show final task + criteria → user confirms \"go\"\n  │         (edit task / cancel supported here)\n  │\n  └─ Main loop [up to max_iter, default 10]:\n       ├─ Worker: spawn agent session → iter-N/output.md\n       │          (full runtime: exec, web_search, all skills, OAuth auth)\n       ├─ Judge:  spawn agent session → iter-N/verdict.md\n       ├─ PASS?  → write final-output.md, notify user, exit\n       └─ FAIL?  → extract gaps → ⏸ CHECKPOINT: show score + gaps to user\n                     continue?  → next iteration (with judge gaps)\n                     redirect:X → next iteration (with user direction appended)\n                     stop?      → end loop, take best result so far\n\n\nInteractive mode (default): user approves criteria, confirms pre-start, and reviews each FAIL checkpoint. Batch mode (--no-interactive): fully autonomous; criteria-judge gates intake, no checkpoints.\n\nUser Input Bridge\n\nWhen the orchestrator needs user input, it:\n\nWrites workspace/pending-input.json (kind + workspace path)\nSends a notification via --recipient and --channel\nPolls workspace/user-input.md every 5s (up to --checkpoint-timeout minutes)\n\nThe main agent acts as the bridge: when pending-input.json exists and the user replies, the agent writes their response to user-input.md. The orchestrator picks it up automatically.\n\nEach agent session is spawned via:\n\nopenclaw agent --session-id <isolated-id> --message <prompt> --timeout <N> --json\n\n\nRoutes through the gateway WebSocket using existing OAuth — no separate API key. Workers get full agent runtime: exec, web_search, web_fetch, all skills, sessions_spawn.\n\nYour Job (main agent)\n\nWhen checkmate is triggered:\n\nGet your session UUID (for direct agent-turn injection):\n\nopenclaw gateway call sessions.list --params '{\"limit\":1}' --json \\\n  | python3 -c \"import json,sys; s=json.load(sys.stdin)['sessions'][0]; print(s['sessionId'])\"\n\n\nAlso note your --recipient (channel user/chat ID) and --channel as fallback.\n\nCreate workspace:\n\nbash <skill-path>/scripts/workspace.sh /tmp \"TASK\"\n\n\nPrints the workspace path. Write the full task to workspace/task.md if needed.\n\nRun the orchestrator (background exec):\n\npython3 <skill-path>/scripts/run.py \\\n  --workspace /tmp/checkmate-TIMESTAMP \\\n  --task \"FULL TASK DESCRIPTION\" \\\n  --max-iter 10 \\\n  --session-uuid YOUR_SESSION_UUID \\\n  --recipient YOUR_RECIPIENT_ID \\\n  --channel <your-channel>\n\n\nUse exec with background=true. This runs for as long as needed. Add --no-interactive for fully autonomous runs (no user checkpoints).\n\nTell the user checkmate is running, what it's working on, and that they'll receive criteria drafts and checkpoint messages via your configured channel to review and approve.\n\nBridge user replies: When user responds to a checkpoint message, check for pending-input.json and write their response to workspace/user-input.md.\n\nBridging User Input\n\nWhen a checkpoint message arrives (the orchestrator sent the user a criteria/approval/checkpoint request), bridge their reply:\n\n# Find active pending input\ncat <workspace-parent>/checkmate-*/pending-input.json 2>/dev/null\n\n# Route user's reply\necho \"USER REPLY HERE\" > /path/to/workspace/user-input.md\n\n\nThe orchestrator polls for this file every 5 seconds. Once written, it resumes automatically and deletes the file.\n\nAccepted replies at each gate:\n\nGate\tContinue\tRedirect\tCancel\nCriteria review\t\"ok\", \"approve\", \"lgtm\"\tany feedback text\t—\nPre-start\t\"go\", \"start\", \"ok\"\t\"edit task: NEW TASK\"\t\"cancel\"\nIteration checkpoint\t\"continue\", (empty)\t\"redirect: DIRECTION\"\t\"stop\"\nParameters\nFlag\tDefault\tNotes\n--max-intake-iter\t5\tIntake criteria refinement iterations\n--max-iter\t10\tMain loop iterations (increase to 20 for complex tasks)\n--worker-timeout\t3600s\tPer worker session\n--judge-timeout\t300s\tPer judge session\n--session-uuid\t—\tAgent session UUID (from sessions.list); used for direct turn injection — primary notification path\n--recipient\t—\tChannel recipient ID (e.g. user/chat ID, E.164 phone number); fallback if injection fails\n--channel\t—\tDelivery channel for fallback notifications (e.g. telegram, whatsapp, signal)\n--no-interactive\toff\tDisable user checkpoints (batch mode)\n--checkpoint-timeout\t60\tMinutes to wait for user reply at each checkpoint\nWorkspace layout\nmemory/checkmate-YYYYMMDD-HHMMSS/\n├── task.md               # task description (user may edit pre-start)\n├── criteria.md           # locked after intake\n├── feedback.md           # accumulated judge gaps + user direction\n├── state.json            # {iteration, status} — resume support\n├── pending-input.json    # written when waiting for user; deleted after response\n├── user-input.md         # agent writes user's reply here; read + deleted by orchestrator\n├── intake-01/\n│   ├── criteria-draft.md\n│   ├── criteria-verdict.md  (non-interactive only)\n│   └── user-feedback.md     (interactive: user's review comments)\n├── iter-01/\n│   ├── output.md         # worker output\n│   └── verdict.md        # judge verdict\n└── final-output.md       # written on completion\n\nResume\n\nIf the script is interrupted, just re-run it with the same --workspace. It reads state.json and skips completed steps. Locked criteria.md is reused; completed iter-N/output.md files are not re-run.\n\nPrompts\n\nActive prompts called by run.py:\n\nprompts/intake.md — converts task → criteria draft\nprompts/criteria-judge.md — evaluates criteria quality (APPROVED / NEEDS_WORK) — used in non-interactive mode\nprompts/worker.md — worker prompt (variables: TASK, CRITERIA, FEEDBACK, ITERATION, MAX_ITER, OUTPUT_PATH)\nprompts/judge.md — evaluates output against criteria (PASS / FAIL)\n\nReference only (not called by run.py):\n\nprompts/orchestrator.md — architecture documentation explaining the design rationale"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/InsipidPoint/checkmate",
    "publisherUrl": "https://clawhub.ai/InsipidPoint/checkmate",
    "owner": "InsipidPoint",
    "version": "2.0.4",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/checkmate",
    "downloadUrl": "https://openagent3.xyz/downloads/checkmate",
    "agentUrl": "https://openagent3.xyz/skills/checkmate/agent",
    "manifestUrl": "https://openagent3.xyz/skills/checkmate/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/checkmate/agent.md"
  }
}