{
  "schemaVersion": "1.0",
  "item": {
    "slug": "codex-cleaner",
    "name": "Codex Auth Cleaner",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/geekjair/codex-cleaner",
    "canonicalUrl": "https://clawhub.ai/geekjair/codex-cleaner",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/codex-cleaner",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=codex-cleaner",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "config.json",
      "scripts/codex_cleaner.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-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.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/codex-cleaner"
    },
    "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/codex-cleaner",
    "agentPageUrl": "https://openagent3.xyz/skills/codex-cleaner/agent",
    "manifestUrl": "https://openagent3.xyz/skills/codex-cleaner/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/codex-cleaner/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": "Codex Auth File Cleaner",
        "body": "Clean invalid codex auth files via CPA management API. Zero dependencies (pure Python stdlib)."
      },
      {
        "title": "First Run",
        "body": "Run setup wizard to configure CPA URL and admin key:\n\npython3 scripts/codex_cleaner.py setup\n\nConfig saved to config.json (auto-created, gitignored). Config priority: CLI args > env vars (CPA_URL/CPA_KEY) > config.json."
      },
      {
        "title": "Commands",
        "body": "# View status\npython3 scripts/codex_cleaner.py status\npython3 scripts/codex_cleaner.py status --json\n\n# Check active files, disable 401s\npython3 scripts/codex_cleaner.py check\n\n# Double-verify disabled files, then delete confirmed 401s\npython3 scripts/codex_cleaner.py delete\n\n# Full clean (check + delete), output human-readable report\npython3 scripts/codex_cleaner.py clean --report\n\n# Full clean, output JSON\npython3 scripts/codex_cleaner.py clean --json\n\n# Loop mode (default 300s interval)\npython3 scripts/codex_cleaner.py monitor -i 300"
      },
      {
        "title": "Workflow",
        "body": "clean = check + delete\n\ncheck:  fetch active codex files → concurrent quota check → disable 401s\ndelete: fetch disabled files → verify#1 (401?) → wait 2s → verify#2 (still 401?) → delete\n\nDouble verification prevents accidental deletion of temporarily failing files."
      },
      {
        "title": "Nanobot Integration",
        "body": "For periodic monitoring, run clean --report via HEARTBEAT or cron, then send the stdout report to the user via message tool.\n\nExample:\n\ncd ~/.nanobot/workspace/skills/codex-cleaner && python3 scripts/codex_cleaner.py clean --report"
      },
      {
        "title": "Report Format",
        "body": "🧹 Codex 认证清理报告\n⏰ 2026-02-26 13:50:00\n\n📊 清理前\n  总计: 100 | 可用: 85 | 已禁用: 15\n\n🔍 检查阶段\n  检测: 85 | 失效(401): 3 | 已禁用: 3\n\n🗑️ 删除阶段\n  待删: 18 | 验证通过: 15 | 已删除: 15 | 跳过: 3\n\n📊 清理后\n  总计: 85 | ✅可用: 82 | ⛔已禁用: 3\n\n⚡ 本次清理: 禁用 3 + 删除 15 = 18 个无效文件"
      },
      {
        "title": "Config File",
        "body": "config.json (auto-generated by setup wizard):\n\n{\n  \"cpa_url\": \"http://YOUR_CPA_HOST:PORT\",\n  \"cpa_key\": \"YOUR_ADMIN_KEY\",\n  \"concurrency\": 20,\n  \"monitor_interval\": 300,\n  \"notify\": {\n    \"enabled\": true,\n    \"channel\": \"telegram\",\n    \"chat_id\": \"YOUR_CHAT_ID\"\n  }\n}"
      }
    ],
    "body": "Codex Auth File Cleaner\n\nClean invalid codex auth files via CPA management API. Zero dependencies (pure Python stdlib).\n\nFirst Run\n\nRun setup wizard to configure CPA URL and admin key:\n\npython3 scripts/codex_cleaner.py setup\n\n\nConfig saved to config.json (auto-created, gitignored). Config priority: CLI args > env vars (CPA_URL/CPA_KEY) > config.json.\n\nCommands\n# View status\npython3 scripts/codex_cleaner.py status\npython3 scripts/codex_cleaner.py status --json\n\n# Check active files, disable 401s\npython3 scripts/codex_cleaner.py check\n\n# Double-verify disabled files, then delete confirmed 401s\npython3 scripts/codex_cleaner.py delete\n\n# Full clean (check + delete), output human-readable report\npython3 scripts/codex_cleaner.py clean --report\n\n# Full clean, output JSON\npython3 scripts/codex_cleaner.py clean --json\n\n# Loop mode (default 300s interval)\npython3 scripts/codex_cleaner.py monitor -i 300\n\nWorkflow\nclean = check + delete\n\ncheck:  fetch active codex files → concurrent quota check → disable 401s\ndelete: fetch disabled files → verify#1 (401?) → wait 2s → verify#2 (still 401?) → delete\n\n\nDouble verification prevents accidental deletion of temporarily failing files.\n\nNanobot Integration\n\nFor periodic monitoring, run clean --report via HEARTBEAT or cron, then send the stdout report to the user via message tool.\n\nExample:\n\ncd ~/.nanobot/workspace/skills/codex-cleaner && python3 scripts/codex_cleaner.py clean --report\n\nReport Format\n🧹 Codex 认证清理报告\n⏰ 2026-02-26 13:50:00\n\n📊 清理前\n  总计: 100 | 可用: 85 | 已禁用: 15\n\n🔍 检查阶段\n  检测: 85 | 失效(401): 3 | 已禁用: 3\n\n🗑️ 删除阶段\n  待删: 18 | 验证通过: 15 | 已删除: 15 | 跳过: 3\n\n📊 清理后\n  总计: 85 | ✅可用: 82 | ⛔已禁用: 3\n\n⚡ 本次清理: 禁用 3 + 删除 15 = 18 个无效文件\n\nConfig File\n\nconfig.json (auto-generated by setup wizard):\n\n{\n  \"cpa_url\": \"http://YOUR_CPA_HOST:PORT\",\n  \"cpa_key\": \"YOUR_ADMIN_KEY\",\n  \"concurrency\": 20,\n  \"monitor_interval\": 300,\n  \"notify\": {\n    \"enabled\": true,\n    \"channel\": \"telegram\",\n    \"chat_id\": \"YOUR_CHAT_ID\"\n  }\n}"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/geekjair/codex-cleaner",
    "publisherUrl": "https://clawhub.ai/geekjair/codex-cleaner",
    "owner": "geekjair",
    "version": "1.0.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/codex-cleaner",
    "downloadUrl": "https://openagent3.xyz/downloads/codex-cleaner",
    "agentUrl": "https://openagent3.xyz/skills/codex-cleaner/agent",
    "manifestUrl": "https://openagent3.xyz/skills/codex-cleaner/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/codex-cleaner/agent.md"
  }
}