Works with the AI Agents you already use
OpenCode Session History
Search, replay and export your local OpenCode sessions. Read-only, offline, no API keys.
Free
OpenCode Session History
Example session with this skill installed
What did I work on yesterday for the payment-gateway project? Show me a summary and the session IDs.
- Read your context and instructions
- Compiled the opencode session history
I scanned your OpenCode session history for yesterday, November 14, 2026, filtered by the "payment-gateway" project.
Work Report: 2026-11-14
| Time | Session Title | Session ID | Task Summary |
|---|---|---|---|
| 09:15 | Fix Stripe Webhook 409 | ses_ab12cd34 | Debugged retry loop logic in webhook handler |
| 11:30 | Update API Docs | ses_ef56gh78 | Refined Swagger definitions for payment endpoints |
| 14:45 | Unit Test Coverage | ses_ij90kl12 | Wrote pytest cases for idempotent transaction IDs |
| 16:20 | Dependency Audit | ses_mn34op56 | Updated cryptography and requests libraries |
Next steps
- Run
python3 scripts/session_history.py show ses_ab12cd34 --reasoningto see the logic behind the webhook fix. - Use
python3 scripts/session_history.py export ses_ef56gh78 --format mdto save the documentation changes to a file. - If you need to see the specific terminal commands from the test session, run
show ses_ij90kl12 --tools.
Connects securely to your tools. The creator never sees your data.
About this skill
OpenCode stores every conversation in a local SQLite database but gives you no way to search it. After a few hundred sessions, the thing you solved three weeks ago is effectively gone.
This skill adds a read-only command line layer over that database, so your agent can:
- Search everything — user messages, assistant replies, reasoning blocks and tool output, with a snippet and the matching session id.
- Read a transcript — newest events first, optionally including thinking blocks and tool calls.
- Export a session — Markdown or JSON, to stdout or a file.
- Build a work report — your own requests grouped by day and project.
- See where the time went — session and project counts across the whole database.
Requirements (local only)
- Python 3.9+ (standard library only, no pip install)
- A local OpenCode installation with opencode.db at ~/.local/share/opencode/opencode.db
- Windows path: C:\Users<you>.local\share\opencode\opencode.db
- Optional: --db /path/to/opencode.db for a custom data directory
This skill works with OpenCode only. It does not read Claude Code, Cursor or Codex history.
Privacy and safety
- The database is opened in SQLite read-only mode (mode=ro). Nothing is written.
- No network requests, no telemetry, no API keys.
- Only session, message and part tables are read. Credentials and account tables are never touched.
- Tool output may contain secrets; treat transcripts as sensitive.
Usage
python3 scripts/session_history.py sessions --limit 20
python3 scripts/session_history.py search "webhook retry" --limit 20
python3 scripts/session_history.py show ses_ab12cd34 --limit 40
python3 scripts/session_history.py export ses_ab12cd34 --format md --out session.md
python3 scripts/session_history.py report --date 2026-11-15
python3 scripts/session_history.py projects --limit 30
On Windows use python instead of python3.
Only supports OpenCode databases. Requires Python 3.9+. Does not support writing, deleting, or modifying session data. Large databases may require date filtering for performance.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 2 days ago
- Free with an Agensi account
Requires