okx-audit-log
okx/onchainos-skills
Export and locate audit logs for OnchainOS troubleshooting and command history review.
What is okx-audit-log?
This skill provides the audit log file path and format information for developers to troubleshoot OnchainOS issues offline. Use it when users ask to export logs, view command history, or find log locations.
- Provides 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 keeping the 5,000 most recent entries plus device header
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.Ask the skill for the audit log file path when you need to troubleshoot
- 2.Locate the file at ~/.onchainos/audit.jsonl (or $ONCHAINOS_HOME/audit.jsonl if set)
- 3.Open the file with a text editor or JSON parser to review entries
- 4.Check the device header (first line) for OS, architecture, and CLI version
- 5.Review individual entries for timestamp, command, status, duration, and error information
Use cases
- Troubleshooting failed OnchainOS commands by reviewing audit logs offline
- Tracking command execution history and performance metrics
- Debugging integration issues by examining logged args and error details
- Locating audit logs when investigating system behavior or errors
- Reviewing device and CLI version information from log headers
- Developers troubleshooting OnchainOS issues
- System administrators reviewing command history
- DevOps engineers debugging integration problems
- Users investigating failed operations
okx-audit-log FAQ
The audit log is 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. Each entry contains timestamp, source, command, status, duration, arguments, and error information.
Logs automatically rotate when they reach 10,000 lines, keeping the device header and the most recent 5,000 entries.
The device header (first line) contains the OS type, architecture, and CLI version, written once when the log file is created and preserved across rotations.
No, the skill provides only the file path and format information. You must open and review the file locally for troubleshooting.
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.1" 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-dapp-discovery
Discover and route requests to 15+ supported DApps—Aave, Curve, Compound, Pendle, Lido, and more—without signing transactions.

okx-defi
Discover and manage OKX-aggregated DeFi products, yields, and positions across multiple chains.

okx-defi-invest
OKX-aggregated DeFi discovery and execution without naming specific protocols.

okx-defi-portfolio
View DeFi positions and holdings across protocols and chains.

okx-dex-bridge
Bridge tokens across chains with optimal routing through multiple protocols (Stargate, Across, Relay, Gas.zip).

okx-dex-market
Query DEX token data, market prices, smart-money signals, social sentiment, and meme-launch research via read-only APIs.