← Back to Skills Marketplace
wufei-png

opencode-session-toolkit-cn

by Wu Fei · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
97
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install opencode-session-toolkit-cn
Description
读取本地 OpenCode SQLite 数据库,支持跨目录会话查询、消息检查与 Markdown 导出。
Usage Guidance
What to check before installing/use: 1) Confirm the `opencode` CLI is installed and accessible in PATH (SKILL.md and the script call `opencode db path`)—the skill metadata did not declare this required binary. 2) The SKILL.md examples use the `sqlite3` CLI and `column` for display; these are optional but useful—install them if you plan to run the shell examples. 3) The included Python script opens the DB read-only and sanitizes filenames, but it will write Markdown files to whatever --output-dir you provide—run it on a copy or in a safe test directory first. 4) The script's shebang references a nonstandard runner ("uv run --script"); if that runner is not present, run the script explicitly with a supported Python (it documents requires-python >=3.11). 5) Inspect the script yourself (it is short and local) to confirm it meets your expectations—there are no network calls, but session/message contents can contain sensitive data, so exported Markdown may include secrets. 6) Because registry metadata omitted the `opencode` binary requirement, treat that as a documentation bug; demand the author add required-binaries to the skill manifest or verify the environment before use.
Capability Analysis
Type: OpenClaw Skill Name: opencode-session-toolkit-cn Version: 1.0.1 The opencode-session-toolkit is a legitimate utility designed to query and export local OpenCode SQLite database sessions to Markdown. It employs security best practices such as using read-only mode for database connections (sqlite3 -readonly and URI mode=ro) and sanitizing filenames to prevent directory traversal in scripts/export_opencode_sessions.py. No evidence of data exfiltration, unauthorized network access, or malicious prompt injection was found.
Capability Assessment
Purpose & Capability
The name/description match the included Python exporter and SKILL.md examples: the skill reads an OpenCode SQLite DB and exports sessions to Markdown. However, SKILL.md and the script expect an `opencode` CLI (used to resolve the DB path) and many examples show use of the `sqlite3` CLI and `column` formatting; the registry metadata declared no required binaries. The missing declaration for `opencode` (and the example use of sqlite3/column) is an inconsistency that should be fixed.
Instruction Scope
Runtime instructions and the script confine themselves to local-only operations: resolve the OpenCode DB path, open it in read-only mode, run SQL queries, and write Markdown files to the specified output directory. The instructions do reference searching common XDG_DATA_HOME paths and reading the provided references/schema.md; they do not instruct network calls or exfiltration. Note: the examples use the `sqlite3` CLI and `column` for display, while the exporter uses Python's sqlite3 module—both are read-only in intent.
Install Mechanism
This is an instruction-only skill with an included Python script (no install spec). That is low-risk, but the script's shebang is unusual ("#!/usr/bin/env -S uv run --script") which implies a nonstandard runner named 'uv' may be expected. The script also documents a Python requirement (>=3.11) in a comment. Because there is no install spec, users must ensure an appropriate Python runtime and the expected CLI tools are present.
Credentials
The skill requests no credentials or environment variables. It does read environment paths (XDG_DATA_HOME, HOME) and may be given an explicit DB path by the user. No secrets or unrelated credentials are requested. The exporter opens the DB in read-only mode for queries only.
Persistence & Privilege
The skill does not request permanent presence (always:false). agents/openai.yaml allows implicit invocation (normal). The skill does not modify other skills or global agent configuration. It writes Markdown files only to the user-specified output directory.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install opencode-session-toolkit-cn
  3. After installation, invoke the skill by name or use /opencode-session-toolkit-cn
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
opencode-session-toolkit-cn 1.0.1 - 新增详细 SKILL.md,介绍本地 OpenCode SQLite 数据库的读取与导出方案 - 提供跨目录 session、消息、project 等查询与过滤命令 - 详细说明常用 SQL 查询方法(标题、目录、project、时间范围等多条件过滤) - 新增一键会话 Markdown 导出脚本及常见用法示例 - 附带数据库 schema/表结构查看与时间字段格式化方法 - 明确数据敏感性注意事项及文件结构约定
Metadata
Slug opencode-session-toolkit-cn
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is opencode-session-toolkit-cn?

读取本地 OpenCode SQLite 数据库,支持跨目录会话查询、消息检查与 Markdown 导出。 It is an AI Agent Skill for Claude Code / OpenClaw, with 97 downloads so far.

How do I install opencode-session-toolkit-cn?

Run "/install opencode-session-toolkit-cn" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is opencode-session-toolkit-cn free?

Yes, opencode-session-toolkit-cn is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does opencode-session-toolkit-cn support?

opencode-session-toolkit-cn is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created opencode-session-toolkit-cn?

It is built and maintained by Wu Fei (@wufei-png); the current version is v1.0.1.

💬 Comments