PluginBench
Skill
Pass
Audit score 90

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-log
Claude Code
Cursor
Windsurf
Cline

How to use okx-audit-log

  1. 1.Ask the skill for the audit log file path when you need to troubleshoot
  2. 2.Locate the file at ~/.onchainos/audit.jsonl (or $ONCHAINOS_HOME/audit.jsonl if set)
  3. 3.Open the file with a text editor or JSON parser to review entries
  4. 4.Check the device header (first line) for OS, architecture, and CLI version
  5. 5.Review individual entries for timestamp, command, status, duration, and error information

Use cases

Good for
  • 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
Who it's for
  • Developers troubleshooting OnchainOS issues
  • System administrators reviewing command history
  • DevOps engineers debugging integration problems
  • Users investigating failed operations

okx-audit-log FAQ

Where is the audit log file stored?

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.

What format are the logs in?

Logs are in JSON Lines format, with one JSON object per line. Each entry contains timestamp, source, command, status, duration, arguments, and error information.

How often are logs rotated?

Logs automatically rotate when they reach 10,000 lines, keeping the device header and the most recent 5,000 entries.

What information is in the device header?

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.

Can I view logs directly in the conversation?

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:

  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.