Loading...
Loading...
从本地 Codex deeplink 或 thread UUID 核算整个线程与最新快照的 token usage;适用于“查这个 Codex 任务消耗”“统计 thread tokens”和 inspect Codex thread usage。
npx skill4agent add lovstudio/skills lov-codex-thread-usagecodex://threads/<uuid>skill.yamluser-profile/v1scripts/profile_store.pyreferences/skill-composition.mdSKILL_DIRskill.yamlreferences/token-semantics.mdreferences/skill-composition.mdscripts/codex_thread_usage.pyhistorical.total_tokensstate_snapshot.tokens_usedcached_input_tokensreasoning_output_tokenstui_style_total_tokenspython3 "$SKILL_DIR/scripts/codex_thread_usage.py" \
'codex://threads/<uuid>' --detailspython3 "$SKILL_DIR/scripts/codex_thread_usage.py" \
'<thread-uuid>' --json--codex-home <directory>session_meta.payload.idstate_snapshot.tokens_usedestimated_segmentsraw_response_completed.eventstotal_tokensPYTHONDONTWRITEBYTECODE=1 python3 "$SKILL_DIR/scripts/test_codex_thread_usage.py"
python3 "$SKILL_DIR/scripts/validate_skill.py" "$SKILL_DIR"jq