okx-audit-log
okx/onchainos-skills
Export and locate audit logs for troubleshooting Onchain OS operations.
What is okx-audit-log?
Provides the audit log file path and format details for developers to access command history and operation records offline. Use this when users need to export logs, find log locations, or review command history for debugging purposes.
- Supplies the audit log file path (~/.onchainos/audit.jsonl or $ONCHAINOS_HOME/audit.jsonl)
- Explains JSON Lines format with one JSON object per line
- Documents entry fields: timestamp, source, command, status, duration, args, and error information
- Describes device header format written on log file creation
- Explains automatic log rotation (max 10,000 lines, preserves device header + 5,000 most recent entries)
How to install okx-audit-log
npx skills add https://github.com/okx/onchainos-skills --skill okx-audit-logHow to use okx-audit-log
- 1.Request the audit log file path when troubleshooting issues
- 2.Navigate to ~/.onchainos/audit.jsonl (or $ONCHAINOS_HOME/audit.jsonl if environment variable is set)
- 3.Open the file to view JSON Lines format entries with timestamps, commands, and results
- 4.Review entry fields (ts, source, command, ok, duration_ms, args, error) to diagnose issues
Use cases
- Troubleshooting failed operations by reviewing command history and error logs
- Auditing which commands were executed and their outcomes for compliance or debugging
- Locating and accessing offline logs when investigating performance issues or unexpected behavior
- Reviewing operation records across CLI and MCP sources with timestamps and execution duration
- Developers troubleshooting Onchain OS issues
- DevOps engineers auditing command execution
- Users needing to review operation history for debugging
okx-audit-log FAQ
Audit logs are stored at ~/.onchainos/audit.jsonl by default, or at $ONCHAINOS_HOME/audit.jsonl if the ONCHAINOS_HOME environment variable is set.
Logs are in JSON Lines format, with one JSON object per line. The first line contains a device header with OS, architecture, and CLI version information.
Logs automatically rotate when they reach 10,000 lines. The device header is preserved, and the most recent 5,000 entries are kept.
Each entry includes: timestamp (ts), source (cli/mcp), command, success status (ok), duration in milliseconds, redacted arguments, and any error message.
No, do not read or display the file contents in the conversation. Only provide the file path and format information to the user.
Full instructions (SKILL.md)
Source of truth, from okx/onchainos-skills.
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: "4.0.0" 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:
- Log file path:
~/.onchainos/audit.jsonl(or$ONCHAINOS_HOME/audit.jsonlif the env var is set) - Format: JSON Lines, one JSON object per line
- First line (device header):
{"type":"device","os":"<os>","arch":"<arch>","version":"<cli_version>"}— written once when the log file is created; preserved across rotations - 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 - 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.
Related skills
More from okx/onchainos-skills and the wider catalog.
okx-dex-market
On-chain token prices, K-line charts, index prices, and wallet PnL analysis for DEX trading.
okx-wallet-portfolio
Look up wallet balances, token holdings, and portfolio value across 20+ blockchains by public address.
okx-dex-token
Search tokens, analyze holder distribution, track trades, and assess risk on OKX DEX.
okx-dex-swap
Swap tokens across 20+ chains via OKX DEX aggregation with 500+ liquidity sources.
okx-onchain-gateway
Broadcast transactions and estimate gas across 20+ blockchains including Ethereum, Solana, Base, Arbitrum, and Polygon.
okx-dex-signal
Track smart money, KOL, and whale activity with DEX transaction feeds, buy signals, and trader leaderboards.