---
id: daily-okx-audit-log
name: "okx-audit-log"
url: https://skills.yangsir.net/skill/daily-okx-audit-log
author: okx
domain: ai-system-observability-sre
tags: ["audit-log", "debugging", "jsonl", "troubleshooting"]
install_count: 4100
rating: 4.40 (20 reviews)
github: https://github.com/okx/onchainos-skills
---

# okx-audit-log

> 提供结构化审计日志文件路径，支持开发者离线排查Agent运行问题，JSON Lines格式存储

**Stats**: 4,100 installs · 4.4/5 (20 reviews)

## Before / After 对比

### 离线问题排查

**Before**:

Agent出现问题时缺乏完整运行日志，只能依赖零散的控制台输出和记忆回溯，离线排查困难，问题复现和定位耗时严重

**After**:

审计日志以JSON Lines格式完整记录Agent行为，开发者可离线分析日志文件，快速定位异常节点和错误原因，支持结构化查询和过滤

| Metric | Before | After | Change |
|---|---|---|---|
| 故障定位时间 | 60min | 10min | -83% |

## Readme

# okx-audit-log

# 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.jsonl` if 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.
Weekly Installs220Repository[okx/onchainos-skills](https://github.com/okx/onchainos-skills)GitHub Stars150First Seen1 day agoSecurity Audits[Gen Agent Trust HubPass](/okx/onchainos-skills/okx-audit-log/security/agent-trust-hub)[SocketPass](/okx/onchainos-skills/okx-audit-log/security/socket)[SnykPass](/okx/onchainos-skills/okx-audit-log/security/snyk)Installed oncodex216amp215kimi-cli214cline214github-copilot214gemini-cli214

---
*Source: https://skills.yangsir.net/skill/daily-okx-audit-log*
*Markdown mirror: https://skills.yangsir.net/api/skill/daily-okx-audit-log/markdown*