
Okx Audit Log
Look up where Onchain OS stores CLI and MCP audit history so you can debug failed commands offline without dumping secrets into chat.
Overview
OKX Audit Log is an agent skill for the Operate phase that documents the Onchain OS audit.jsonl path, schema, and rotation rules for offline CLI and MCP troubleshooting.
Install
npx skills add https://github.com/okx/onchainos-skills --skill okx-audit-logWhat is this skill?
- Returns fixed path: ~/.onchainos/audit.jsonl (or $ONCHAINOS_HOME/audit.jsonl)
- JSON Lines format with device header line preserved across rotation
- Entry fields: ts, source (cli/mcp), command, ok, duration_ms, redacted args, error
- Rotation policy: max 10,000 lines, keeps header plus most recent 5,000 entries
- Explicit guard: do not use for balance, swap, or token search—use dedicated OKX skills
- Max 10,000 audit log lines before rotation
- Retains device header plus most recent 5,000 entries after rotation
- Skill metadata version 3.3.9
Adoption & trust: 4.6k installs on skills.sh; 284 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You ran Onchain OS commands or MCP tools and need the audit trail location without pasting raw logs or secrets into the agent chat.
Who is it for?
Developers self-serving OKX Onchain OS failures by tailing audit.jsonl on their machine after an agent session.
Skip if: Wallet balance checks, token search, swaps, or any on-chain operation—those require other okx/onchainos-skills entries.
When should I use this skill?
User asks to export audit logs, find audit log location, view command history, or uses 导出日志 / 查看日志 / 日志路径 / 操作记录 / 调用记录 / 命令历史.
What do I get? / Deliverables
You know the exact audit log file path, line format, rotation limits, and which fields to inspect locally after redacted server-side logging.
- Documented audit log path and ONCHAINOS_HOME behavior
- JSON Lines schema summary for local forensics
- Rotation and redaction expectations for offline review
Recommended Skills
Journey fit
Operate/monitoring is the canonical shelf because the skill only documents log location, rotation, and schema for troubleshooting production-like CLI usage. monitoring fits audit trails and command history forensics rather than on-chain swap or wallet operations.
How it compares
Path-and-schema reference for local audit files, not an on-chain data API or swap execution skill.
Common Questions / FAQ
Who is okx-audit-log for?
Solo builders and integrators using OKX Onchain OS CLI or MCP who need the audit log file location and format for offline debugging.
When should I use okx-audit-log?
When you ask to export audit logs, find log paths, view command or MCP history, or use Chinese phrases like 导出日志, 日志路径, or 操作记录.
Is okx-audit-log safe to install?
The skill instructs agents not to read log contents into chat; still review the Security Audits panel on this Prism page and scrub local logs before sharing externally.
SKILL.md
READMESKILL.md - Okx Audit Log
# 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.