원클릭으로
searching-sessions
Use when searching OpenCode session history for PRs, Jira tickets, commands, or any text across past sessions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when searching OpenCode session history for PRs, Jira tickets, commands, or any text across past sessions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use on any NixOS host (devbox on Hetzner, cloudbox on GCP) when SSH connection fails, host key mismatch, NixOS issues, CPU/IO contention (high load), or verifying the host is properly configured
Launch headless opencode sessions from CLI. Use when you need to start a new opencode session in the background to work on a task in parallel, or when spawning work on a specific directory.
How to apply configuration changes to NixOS hosts (devbox, cloudbox). Use when you need to rebuild the system, apply home-manager changes, or recover from issues.
Use when setting up or rotating PagerDuty MCP auth for OpenCode on macOS Keychain or cloudbox sops, or when debugging missing PagerDuty tools.
Use when setting up or rotating Rollbar MCP auth for OpenCode on macOS Keychain or cloudbox sops, when triaging a Rollbar error paged via PagerDuty, or when debugging missing Rollbar tools.
Documents the OpenCode agent set — what each does, when to use it, and why the others were cut. Use when questioning agent choices or considering adding/removing agents.
| name | searching-sessions |
| description | Use when searching OpenCode session history for PRs, Jira tickets, commands, or any text across past sessions. |
Search session transcripts with oc-search. Run oc-search --help for all options.
# Which session created a Jira ticket?
oc-search DATA-4297
# Which session opened a PR?
oc-search 'gh pr create'
# Search conversation text too, not just tool calls
oc-search --types tool,text 'authentication'
# Search everything
oc-search --all 'rules_oci'
Output's first column is the session id (e.g. ses_2645cd242ffewHTsOoDmVVWW9a). Pass it to opencode -s from the session's directory:
cd <directory-from-output>
opencode -s <id-from-output>
The full id is required — slugs are not unique and opencode -s won't accept them.
Queries the global OpenCode SQLite DB at ~/.local/share/opencode/opencode.db. Searches part.data JSON blobs using instr() substring matching.
Default scope is tool parts only (e.g. gh/kubectl commands and outputs). Use --types or --all for broader search.
Single global DB. Schema: project -> session -> message -> part. Content lives in part.data (JSON). Part types by size:
| Type | Content | Default? |
|---|---|---|
| tool | shell/tool commands, inputs, outputs | Yes |
| text | Conversation text | No |
| patch | File diffs | No |
| reasoning | Model reasoning | No |
| step-start/finish | Metadata | No |
| Decision | Chosen | Upgrade path |
|---|---|---|
| Search | instr() scan (~few seconds) | FTS5 index if too slow |
| Scope | Tool parts only by default | --types / --all |
| Output | Summary table | --json flag |
| Language | Bash | Python if string handling gets painful |
| DB access | Read-only (mode=ro) | n/a |
Full rationale: docs/plans/2026-04-13-oc-search-design.md