360 Secure SkillHub
360 安全技能中心

CPA 401 Cleanup

面向本地或可达的 CPA/CLIProxyAPI 管理端点的手动账号清理流程:先用 scan_cpa.py 拉取账号清单并导出 401 与配额 JSON,核对数量后由 delete_401_only.py 仅删除 401 账号,或用 reenable_quota.py 恢复被禁用的配额账号,可再扫描验证。脚本为 Python,需自行提供端点地址与令牌,包含删除等破坏性操作。

violin321
violin321
热度 21.10
最近更新 2026-03-27 20:16:49
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:自动化脚本 / API 集成 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cpa-401-cleanup
Metadata
name
cpa-401-cleanup
description
Manual CPA / CLIProxyAPI account cleanup workflow for local or reachable management endpoints. Use when you need to (1) scan codex accounts and export 401/quota results, (2) delete only 401 accounts safely without touching quota accounts, (3) re-enable quota-disabled accounts after an accidental maintain run, or (4) operate cpa-warden-style cleanup on demand without cron or long-term automation.

CPA 401 Cleanup

Use this skill for manual CPA cleanup work.

Default safe path

  1. Run scripts/scan_cpa.py to fetch inventory and export 401 / quota JSON files.
  2. Review counts and samples.
  3. If the goal is delete-only cleanup, run scripts/delete_401_only.py against the exported 401 JSON.
  4. Optionally rescan to verify.

Guardrails

  • Do not default to cpa-warden.py --mode maintain for delete-only work. That flow may also disable or delete quota accounts depending on settings.
  • Keep token out of committed config files. Prefer CPA_TOKEN / CPA_BASE_URL env vars or ad-hoc CLI args.
  • For local Docker CPA, the common base URL is http://127.0.0.1:8317.
  • For non-trivial or destructive runs, summarize the counts before executing.

Scripts

  • scripts/scan_cpa.py — scan inventory, probe codex accounts, export 401 and quota JSON
  • scripts/delete_401_only.py — read exported 401 JSON and delete only those accounts
  • scripts/reenable_quota.py — read exported quota JSON and re-enable those accounts

Read references/workflow.md for command examples and recovery flow.