360 Secure SkillHub
360 安全技能中心

Okx Audit Log

核心功能为响应用户关于审计日志导出、日志位置、操作记录、命令历史等查询,告知链上OS审计日志的文件路径、JSON Lines格式、日志字段及自动轮转规则等信息,不展示日志内容。典型场景是开发者离线排查链上OS相关问题,输入为日志类提问,输出为结构化日志信息说明。

ok-james-01
ok-james-01
热度 64.60
最近更新 2026-05-11 17:33:24
分类:开发依赖:纯提示词应用场景:调试排错 / DevOps

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add okx-audit-log
Metadata
name
okx-audit-log
description
Use this skill when the user asks to export audit logs, find audit log location, view command history, 导出日志, 查看日志, 日志路径, 操作记录, 调用记录, 命令历史. Do NOT use for wallet balance, token search, swap, or any other on-chain operation — use the corresponding skill instead.
license
MIT
metadata
{"author":"okx","version":"3.1.3","homepage":"https://web3.okx.com"}

Onchain OS Audit Log

Provide the audit log file path for developers to troubleshoot issues offline.

Response

Tell the user:

  1. Log file path: ~/.onchainos/audit.jsonl (or $ONCHAINOS_HOME/audit.jsonl if the env var is set)
  2. Format: JSON Lines, one JSON object per line
  3. First line (device header): {"type":"device","os":"<os>","arch":"<arch>","version":"<cli_version>"} — written once when the log file is created; preserved across rotations
  4. Entry fields: ts (local time with timezone, e.g. 2026-03-18 +8.0 18:00:00.123), source (cli/mcp), command, ok, duration_ms, args (redacted), error
  5. Rotation: max 10,000 lines, auto-keeps the device header + most recent 5,000 entries

Do NOT read or display the file contents in the conversation.