Token导航 LogoToken导航

Agent Skill · 研究检索

opencode-memory(opencode 记忆)

opencode-memory 用于处理浏览器自动化、网页检查和页面信息提取,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

opencode-memory 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 23,110。

总安装 4,363周安装 180GitHub Stars 106下载 1,426核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:opencode-memory(opencode 记忆)
来源仓库:https://github.com/carson2222/skills
仓库路径:skills/opencode-memory
安装命令:
npx skills add https://github.com/carson2222/skills --skill opencode-memory
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/carson2222/skills --skill opencode-memory

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

opencode-memory 用于处理浏览器自动化、网页检查和页面信息提取。适合在 Codex、Claude、Cursor、Gemini CLI 中让 Agent 打开页面、读取网页或验证前端流程。通过 npx skills add 命令从指定 GitHub 仓库安装使用。

安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/opencode-memory

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/carson2222/skills --skill opencode-memory;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

opencode-memory 怎么安装?

在终端执行 npx skills add https://github.com/carson2222/skills --skill opencode-memory。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

opencode-memory 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

opencode-memory 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

opencode-memory 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

opencode-memory 用的人多吗?

公开数据是累计安装 4,363 次,近一周安装 180 次,下载 1,426 次,GitHub 106 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

opencode-memory 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
opencode-memory

opencode 记忆 · 本页

4,363106操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

OpenCode Memory Browser

Lightweight, read-only access to your local OpenCode history. No injection, no bloat — just the ability to look things up when it would help.

This skill is specifically about OpenCode data stored on the local machine. It is not for ChatGPT history, Claude cloud history, generic browser history, or external memory products.

All data lives in a local SQLite database and plain files. You query them directly using sqlite3 via bash. No bundled scripts or external dependencies needed.

When to Use

Auto-trigger (agent decides)

  • You are resuming work on a project and suspect prior sessions exist.
  • The user references something done previously ("we did this before", "last time", "that plan we made").
  • A recurring issue suggests checking if it was encountered before.
  • The user asks about the state of plans, past decisions, or previous approaches.
  • You need context that might exist in history but is not in the current session.

User-triggered (explicit request)

  • "Check my history"
  • "What did we do in the last session?"
  • "Show me my plans"
  • "Search for when we discussed X"
  • "What projects have I worked on?"
  • "Look at previous conversations about Y"

Do NOT use when

  • The task is clearly brand new with no relevant history.
  • Fresh repo context (files, git log) is sufficient.
  • The user explicitly says they don't care about prior work.

Storage Locations

Database:       ${XDG_DATA_HOME:-$HOME/.local/share}/opencode/opencode.db
Plans:          ${XDG_DATA_HOME:-$HOME/.local/share}/opencode/plans/*.md
Session diffs:  ${XDG_DATA_HOME:-$HOME/.local/share}/opencode/storage/session_diff/<session-id>.json
Prompt history: ${XDG_STATE_HOME:-$HOME/.local/state}/opencode/prompt-history.jsonl

The database path respects $XDG_DATA_HOME if set (default: ~/.local/share).

Database Schema (what matters)

  • project — id (text PK), worktree (path), name (often NULL, derive from worktree basename)
  • session — id (text, e.g. ses_xxx), project_id (FK), parent_id (NULL = main session, set = subagent), title, summary, time_created, time_updated
  • message — id, session_id (FK), data (JSON with $.role = "user" or "assistant"), time_created
  • part — id, message_id (FK), session_id (FK), data (JSON with $.type = "text" and $.text = content)

Timestamps are Unix milliseconds. Use datetime(col/1000, 'unixepoch', 'localtime') to display them.

Ready-to-Use Queries

All queries use sqlite3 in read-only mode. Always run via bash.

Shorthand used below:

DATA_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/opencode"
STATE_ROOT="${XDG_STATE_HOME:-$HOME/.local/state}/opencode"
DB="$DATA_ROOT/opencode.db"
DB_URI="file:${DB}?mode=ro"

Quick summary

sqlite3 "$DB_URI" "
  SELECT 'projects', COUNT(*) FROM project
  UNION ALL SELECT 'sessions (main)', COUNT(*) FROM session WHERE parent_id IS NULL
  UNION ALL SELECT 'sessions (total)', COUNT(*) FROM session
  UNION ALL SELECT 'messages', COUNT(*) FROM message
  UNION ALL SELECT 'todos', COUNT(*) FROM todo;
"

List projects

sqlite3 "$DB_URI" "
  SELECT
    COALESCE(p.name, CASE WHEN p.worktree = '/' THEN '(global)' ELSE REPLACE(p.worktree, RTRIM(p.worktree, REPLACE(p.worktree, '/', '')), '') END) AS name,
    p.worktree,
    (SELECT COUNT(*) FROM session s WHERE s.project_id = p.id AND s.parent_id IS NULL) AS sessions
  FROM project p
  ORDER BY p.time_updated DESC
  LIMIT 10;
"

List recent sessions

sqlite3 "$DB_URI" "
  SELECT
    s.id,
    COALESCE(s.title, 'untitled') AS title,
    COALESCE(p.name, CASE WHEN p.worktree = '/' THEN '(global)' ELSE REPLACE(p.worktree, RTRIM(p.worktree, REPLACE(p.worktree, '/', '')), '') END) AS project,
    datetime(s.time_updated/1000, 'unixepoch', 'localtime') AS updated,
    (SELECT COUNT(*) FROM message m WHERE m.session_id = s.id) AS msgs
  FROM session s
  LEFT JOIN project p ON p.id = s.project_id
  WHERE s.parent_id IS NULL
  ORDER BY s.time_updated DESC
  LIMIT 10;
"

Sessions for a specific project

Replace the worktree path with the actual project path:

sqlite3 "$DB_URI" "
  SELECT s.id, COALESCE(s.title, 'untitled'),
    datetime(s.time_updated/1000, 'unixepoch', 'localtime')
  FROM session s
  JOIN project p ON p.id = s.project_id
  WHERE p.worktree = '/path/to/project'
    AND s.parent_id IS NULL
  ORDER BY s.time_updated DESC
  LIMIT 10;
"

To find the worktree for the current directory: git rev-parse --show-toplevel

Read messages from a session

Replace the session ID:

sqlite3 "$DB_URI" "
  SELECT
    json_extract(m.data, '$.role') AS role,
    datetime(m.time_created/1000, 'unixepoch', 'localtime') AS time,
    GROUP_CONCAT(json_extract(p.data, '$.text'), char(10)) AS text
  FROM message m
  LEFT JOIN part p ON p.message_id = m.id
    AND json_extract(p.data, '$.type') = 'text'
  WHERE m.session_id = 'SESSION_ID_HERE'
  GROUP BY m.id
  ORDER BY m.time_created ASC
  LIMIT 50;
"

Search across all conversations

Replace the search term:

sqlite3 "$DB_URI" "
  SELECT
    s.id AS session_id,
    COALESCE(s.title, 'untitled') AS title,
    json_extract(m.data, '$.role') AS role,
    datetime(m.time_created/1000, 'unixepoch', 'localtime') AS time,
    substr(json_extract(p.data, '$.text'), 1, 200) AS snippet
  FROM part p
  JOIN message m ON m.id = p.message_id
  JOIN session s ON s.id = m.session_id
  WHERE s.parent_id IS NULL
    AND json_extract(p.data, '$.type') = 'text'
    AND json_extract(p.data, '$.text') LIKE '%SEARCH_TERM%'
  ORDER BY m.time_created DESC
  LIMIT 10;
"

List saved plans

ls -lt "$DATA_ROOT"/plans/*.md 2>/dev/null | head -20

To read a specific plan:

cat "$DATA_ROOT"/plans/FILENAME.md

Show recent prompt history

tail -20 "$STATE_ROOT"/prompt-history.jsonl

Each line is a JSON object. The user's input is typically in the input or text field.

Workflow

Quick recall (most common)

  1. Run the summary query to see what's available.
  2. If you need sessions for the current project, get the worktree with git rev-parse --show-toplevel, then run the project sessions query.
  3. If you need a specific topic, run the search query.
  4. If you need full conversation detail, run the messages query with the session ID.

Plan review

  1. List plans with ls -lt "$DATA_ROOT"/plans/*.md.
  2. Read a plan with cat "$DATA_ROOT"/plans/<filename>.md.

Deep investigation

  1. Run projects to see all tracked repos.
  2. Run sessions for a specific project.
  3. Run messages for full conversation content.
  4. Cross-reference with search across all projects.

Critical Rules

  1. Read-only. Never write to or modify the database or any OpenCode files.
  2. Use bash + sqlite3. Do not try to read opencode.db with the Read tool — it is a binary file. Always query via sqlite3 in bash.
  3. Don't dump everything. Use LIMIT and LIKE to keep output focused. The database can contain tens of thousands of messages.
  4. Summarize for the user. After retrieving data, distill the relevant parts. Don't paste raw query output.
  5. Respect privacy. Session history may contain sensitive data. Only surface what is relevant to the current task.
  6. Set path variables first. At the start of any memory lookup, set DATA_ROOT, STATE_ROOT, DB, and DB_URI exactly as shown above so the commands work on XDG and non-XDG setups and keep SQLite access read-only.

Fallback: Web UI

If the user needs visual dashboards or a browsable interface:

  1. Check if OpenCode web is running: curl -s http://127.0.0.1:4096/api/health 2>/dev/null || echo "not running"
  2. If running, direct the user to http://127.0.0.1:4096.
  3. If not running, suggest opencode web.
  4. Note: opencode.local only works with mDNS enabled (opencode web --mdns). Don't assume it exists.

Deep Reference

See references/storage-format.md for the full storage layout, all table schemas, and additional query examples.

平台分布

Codex

36.56%
按下载量换算521

Claude

28.62%
按下载量换算408

Cursor

21.28%
按下载量换算303

Gemini CLI

10.47%
按下载量换算149

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills