x9-opencode-sessions

x9-opencode-sessions is a skill for Claude Code from xonika9/agent-skills. It costs 130 tokens per session (644 once invoked), scanned A, original, MIT.

A tool for finding and continuing conversations from OpenCode V2, a coding assistant that keeps work in separate chat sessions.

In plain words
What is it for?
It is for finding sessions, reading or continuing them, sending messages after preview, waiting for results, and collecting responses from related OpenCode chats.
Why use it?
It helps locate the right session and coordinate work across chats without confusing one conversation with another.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the x9-agent-skills plugin — 18 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/xonika9/agent-skills/x9-opencode-sessions
Any agent
npx skills add xonika9/agent-skills --skill x9-opencode-sessions
Clone the repo
git clone --depth 1 https://github.com/xonika9/agent-skills

Made for: Claude Code.

Or install x9-agent-skills, the plugin that ships this one along with the rest of its 18 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for x9-opencode-sessions

README.md
[![agentmods](https://agentmods.dev/badge/skills/xonika9/agent-skills/x9-opencode-sessions.svg)](https://agentmods.dev/skills/xonika9/agent-skills/x9-opencode-sessions)
Your own site
<a href="https://agentmods.dev/skills/xonika9/agent-skills/x9-opencode-sessions"><img src="https://agentmods.dev/badge/skills/xonika9/agent-skills/x9-opencode-sessions.svg" alt="Measured on agentmods" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.00644
Opus 5 $0.00065 $0.00322
Sonnet 5 $0.00026 $0.00129
Haiku 4.5 $0.00013 $0.00064

Measured 5d ago against content hash ed7e655acf41, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

x9-opencode-sessions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/opencode_sessions.py, scripts/test_opencode_sessions.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/x9-opencode-sessions/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenCode sessions

Use this skill only in OpenCode V2. For child sessions owned by the current parent, prefer the native subagent tool. Use the Sessions API only to inspect or coordinate a different root or child branch.

The machine-readable onboarding contract lists external prerequisites.

List only enough session metadata to resolve the request. Start with a supplied session ID when available; otherwise constrain the list by title/search, project, directory, or parent. Stop before sending when the match is ambiguous, and ask the user to select one target.

Run the wrapper for API calls. It emits normalized JSON, shows only text message parts, and keeps reasoning bodies and tool arguments out of the default output. Read the API reference for command forms, the selection rule, and the wait/reconciliation contract.

Sending

prompt is preview-first. Run it without --apply, retain and show its generated message_id, then dispatch the same ID with --apply only after the user has explicitly asked to send and one target is unambiguous. The original explicit request is sufficient; do not add a confirmation step. Never send a live message unless the user requested it. The wrapper permanently reserves each preview ID and records a one-use local receipt containing the session ID and a hash of the text; --apply rejects a missing, reused, or mismatched receipt.

If dispatch times out or its outcome is unknown, do not retry. Reconcile that exact message_id with message before any further action. Do not delete, rename, move, or otherwise alter sessions.

wait may be unavailable on a running V2 service. Treat that response as blocked, then inspect active and paginated messages; never infer completion from the failed wait.

Done

Return the selected session ID, requested text or activity/result, and any child-session relationship observed. For a sent message, return its message_id and the dispatch or reconciliation status. A failed API call is BLOCKED or UNKNOWN, not evidence that a session completed or received a message.

Read the full file on GitHub · 48 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 48 lines · 130 tokens per session scan A ed7e655acf41

Subscribe to this mod's changes

x9-opencode-sessions is a skill published in the GitHub repository xonika9/agent-skills (4 stars, last pushed 9d ago), licensed MIT. It adds 130 tokens to every session and 644 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.