Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    OpenCode Session History

    1

    Search, replay and export your local OpenCode sessions. Read-only, offline, no API keys.

    Free

    Security scanned
    OpenCode Session History

    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

    TimeSession TitleSession IDTask Summary
    09:15Fix Stripe Webhook 409ses_ab12cd34Debugged retry loop logic in webhook handler
    11:30Update API Docsses_ef56gh78Refined Swagger definitions for payment endpoints
    14:45Unit Test Coverageses_ij90kl12Wrote pytest cases for idempotent transaction IDs
    16:20Dependency Auditses_mn34op56Updated cryptography and requests libraries

    Next steps

    1. Run python3 scripts/session_history.py show ses_ab12cd34 --reasoning to see the logic behind the webhook fix.
    2. Use python3 scripts/session_history.py export ses_ef56gh78 --format md to save the documentation changes to a file.
    3. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Python 3.9+
    OpenCode (local install with opencode.db)
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This skill allows AI agents to directly query your local OpenCode database to retrieve past commands, reasoning, and solutions that are usually hidden in IDE sidebars, saving you from manual scrolling and copy-pasting.

    The skill is specifically designed for the OpenCode IDE environment; it interfaces with the local SQLite database used by OpenCode and does not currently support history retrieval from Cursor, Claude Code, or other IDEs.

    Your data remains entirely local; the skill accesses the database in read-only mode (mode=ro), ensuring that your session history is never modified or uploaded to external servers during the search process.

    Upon purchase, you receive the specialized Python utility, the skill definition file for your agent, and a setup guide to help you point the tool to your local 'opencode.db' file.

    Yes, the tool includes a dedicated reporting feature that can group your activity by project and date, specifically designed to help automate the creation of stand-up notes and timesheet entries.

    The skill requires a Python 3.9+ environment and direct filesystem access to the directory where OpenCode stores its local database, which is typically found in your user application data folder.

    New in LLM Ops