- Home
- Skills
- Workflow Automation
- Opencode-History-Search
Opencode-History-Search
Search and retrieve past OpenCode session history, commands, and file changes using keyword or fuzzy search.
Free
Works with the AI Agents you already use
Opencode-History-Search
Example session with this skill installed
Find the session where we configured the redis swap settings last week. Use fuzzy mode since I might be misspelling swap.
- Read your context and instructions
- Compiled the opencode-history-search
I have searched the OpenCode history for "redis swap" using fuzzy matching for the last 7 days.
Search Results
Found 1 session matching your criteria.
Session: Redis Memory Optimization
- ID:
oc_88291_x92 - Project:
backend-api-v2(Hash:a1b2c3d) - Date: 2023-10-24 14:15:32
- Match Type: Fuzzy (Score: 0.72)
Excerpt:
User: We need to handle the OOM errors. Let's configure the redis swap-file and maxmemory settings to prevent the crash we saw in staging.
Assistant: I'll update the redis.conf. We should set maxmemory 2gb and maxmemory-policy allkeys-lru. For the swap usage, I will check the vm.swappiness level on the host as well.
Next steps
- Review the
redis.confchanges from sessionoc_88291_x92. - Apply the
maxmemorypolicy to the current production environment. - Verify if
vm.swappinesswas actually adjusted on the host machine.
Connects securely to your tools. The creator never sees your data.
About this skill
Context switching and memory loss kill developer velocity. You shouldn't have to manually hunt through old terminal logs or chat transcripts to remember how you solved a specific bug last month. This skill enables your agent to query the local OpenCode history database directly, retrieving past decisions, commands, and code changes with precision.
What it does
- Multi-mode search provides keyword, regex, and fuzzy matching to find sessions even with typos or partial recall.
- File-trace auditing identifies every past session that created or modified a specific file path.
- Contextual filtering narrows results by date ranges, specific roles (user vs. assistant), or project scope.
- Cross-project retrieval searches across all local repositories and global buckets to find solutions from different environments.
- Structured extraction returns session IDs, project metadata, and relevant message excerpts in agent-readable markdown.
How it works
- The agent locates the OpenCode SQLite database in standard XDG, macOS, or Windows application data paths.
- It executes the provided Python script using specific flags like
--query,--terms, or--file-path. - The script performs a read-only query against the
session_v2andsession_messagetables. - The agent parses the markdown results to answer questions about past logic or re-implement previous solutions.
Frameworks & tools
Built with Python 3.8 standard library. It interacts directly with SQLite databases and integrates with Git for repository-based session scoping.
Why this beats prompting it yourself
Standard agents have no native visibility into their own past session databases or local file history. This skill provides the specific SQL logic and path resolution needed to bridge that gap without requiring you to manually export logs or copy-paste old context.
Use cases
- Find the specific docker-compose configuration used in a project three months ago.
- Identify which session introduced a breaking change to a specific YAML config file.
- Recall the architectural decisions made during a multi-day refactoring task.
- Retrieve a complex regex or shell one-liner that was successfully run in a previous session.
Known limitations
Requires an existing OpenCode SQLite database on the local machine. Fuzzy search is an approximation using difflib and may vary in accuracy compared to specialized search engines.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.
Requires a local OpenCode history database. Fuzzy search uses difflib approximations. Python 3.8+ must be installed.
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 buying a skill.
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 to use
No account required to browse
Trust & safety
Security scan
Security scan passed 19 days ago
- Free with an Agensi account
- Software
Python