history-explorer
History Explorer analyzes OpenClaw.NET session data piped as JSON input, returning structured analytics on turn counts, role distribution, tool usage frequency, meta-skill execution history, and skill/tool co-occurrence patterns. Use this before running meta-skill-creator, when users ask about recent activity or past tool usage, or when debugging tool failures and session context.
git clone --depth 1 https://github.com/clawdotnet/openclaw.net /tmp/history-explorer && cp -r /tmp/history-explorer/src/OpenClaw.Gateway/skills/history-explorer ~/.claude/skills/history-explorerSKILL.md
# History Explorer
Read-only helper that inspects OpenClaw.NET session history for downstream
workflows (especially `meta-skill-creator`).
## What It Does
Parses a JSON session snapshot and returns structured analytics:
| Key | Description |
| --- | --- |
| `turns` | Turn count, role distribution (`user` vs `assistant`), time span, recent turn previews |
| `tools` | Tool invocation frequency, top tools, tool co-occurrence in the same turn |
| `meta_runs` | Meta-skill execution history: skill name, status, step counts, failure codes |
| `co_occurrences` | Skill/tool pairs that appear together across turns |
| `placeholder` | Emitted when no session data is available; downstream workflows treat this as a signal to rely on user intent only |
## Input Contract
The script expects JSON session data on **stdin**. The calling agent should pipe a
JSON object matching the `Session` schema — specifically:
```json
{
"id": "session-guid",
"history": [
{ "role": "user", "content": "...", "timestamp": "..." },
{ "role": "assistant", "content": "...", "timestamp": "...", "toolCalls": [...] }
],
"metaRunHistory": [
{
"runId": "...", "skillName": "...", "status": "completed",
"startedAtUtc": "...", "completedAtUtc": "...",
"stepResults": [
{ "id": "...", "kind": "...", "status": "...", "durationMs": 123 }
]
}
]
}
```
## Output Contract
Always returns a JSON object. When session data is available, includes the
requested analytics keys. When unavailable or unparseable, returns a single
`placeholder` key so downstream workflows degrade deterministically.
## When to Use
- Before running `meta-skill-creator`: feed co-occurrence and meta-usage data
into the creator's proposal draft
- When the user asks "what skills did I use recently" or "show my session history"
- When debugging: inspect recent tool failures or meta-run error codes
- When the agent needs to recall conversation context from earlier turns
## Limitations
- Read-only; never mutates session state
- Depends on the agent passing session JSON via stdin; does not access the
persistence layer directly
- `window_days` filtering is best-effort on the `timestamp` field
- Session snapshots may be truncated by the agent for token budget reasonsOrganizes repository documentation and keeps new docs in the correct location.
Produce a daily news brief (AI/security/dev) with links, key takeaways, and action items.
Connects to databases, runs SQL queries, and analyzes datasets using code to provide actionable business insights.
Conducts comprehensive web research, synthesizes data from multiple sources, and produces detailed reports.
Triage inbox into “needs reply”, “FYI”, “urgent”, and “safe to archive”, with a short plan for each.
Safely operate Home Assistant by resolving targets first and validating state before writes.
Safely interact with MQTT topics with allow/deny policies and minimal payload risk.
Operates as an autonomous software engineer, capable of writing code, running tests, and managing git repositories.