一键导入
renaming-opencode-sessions
Use when you need to rename an opencode session - bypasses the interactive /rename command by updating the SQLite database directly
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you need to rename an opencode session - bypasses the interactive /rename command by updating the SQLite database directly
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | renaming-opencode-sessions |
| description | Use when you need to rename an opencode session - bypasses the interactive /rename command by updating the SQLite database directly |
| license | MIT |
| metadata | {"author":"Airton Ponce @ton-anywhere"} |
Renames opencode sessions programmatically by updating the SQLite database at ~/.local/share/opencode/opencode.db. This bypasses the interactive /rename command which requires manual TUI access.
Do NOT use for: Creating new sessions, deleting sessions, or other session management tasks.
OpenCode stores session metadata in a SQLite database. The session table contains:
id - Session UUID (e.g., ses_25dd535caffemzyEEcQaZZFdqZ)title - Display name shown in opencode session listUpdating this field directly achieves the same result as /rename without interactive input.
The logic lives in rename_session.py — this file is the single source of truth.
# Command-line arguments (preferred)
./rename_session.py ses_25dd535caffemzyEEcQaZZFdqZ "Index page redesign & centered search"
# Environment variables
SESSION_ID="ses_abc123" NEW_TITLE="Bugfix PR" ./rename_session.py
# As Python module
python3 rename_session.py ses_xyz789 "Feature implementation"
import subprocess
from pathlib import Path
skill_dir = Path(__file__).parent # or wherever the skill is located
script_path = skill_dir / "renaming-opencode-sessions" / "rename_session.py"
subprocess.run([
"python3", str(script_path),
"ses_25dd535caffemzyEEcQaZZFdqZ",
"New Session Title"
])
After renaming, verify with:
opencode session list | grep <session_id>
| Mistake | Fix |
|---|---|
Using sessions table name | Table is singular: session |
Forgetting conn.commit() | Changes won't persist without commit |
| Wrong database path | Always ~/.local/share/opencode/opencode.db |
Not expanding ~ in Python | Use os.path.expanduser("~/...") or full path |
Before: Manual process requiring TUI access - tedious for batch operations
After: One-liner Python script - automatable and scriptable
Invoke immediately if the Navigator mentions: inspecting changes (status, diff, log, show), staging/adding files (add, stage), creating commits (commit, amend, reset), branch management (branch, checkout, merge, rebase), remote operations (push, pull, fetch), or repository state (stash, worktree). Trigger words: git, commit, status, diff, add, stage, branch, merge, push, pull, log, revert, stash, worktree, 'what changed', 'save changes', 'commit this', 'show me the diff'.
Use when creating, updating, troubleshooting, or organizing Ubuntu GNOME dock buttons, .desktop launchers, Zenity control menus, script shortcuts, launcher icons, or taskbar actions for commands stored across multiple projects.
Use when investigating opencode sessions, subsessions, agent drift, missed handoffs, tool misuse, or feedback grounded in opencode session exports.
Guide a user with basic CSS knowledge who is learning Tailwind CSS and frontend styling. Use when the user asks for help styling a page, layout, component, tag, or UI state and wants coaching through style categories, good frontend practices, CSS mental models, or Tailwind decision-making without being given the finished code solution.
Use when investigating swap, memory pressure, compressor usage, llama.cpp memory, Metal/unified memory, or model-server RAM issues on the Mac Studio ai-server.
Run any question, idea, or decision through a council of 5 AI advisors who independently analyze it, peer-review each other anonymously, and synthesize a final verdict. Based on Karpathy's LLM Council methodology. MANDATORY TRIGGERS: 'council this', 'run the council', 'war room this', 'pressure-test this', 'stress-test this', 'debate this'. STRONG TRIGGERS (use when combined with a real decision or tradeoff): 'should I X or Y', 'which option', 'what would you do', 'is this the right move', 'validate this', 'get multiple perspectives', 'I can't decide', 'I'm torn between'. Do NOT trigger on simple yes/no questions, factual lookups, or casual 'should I' without a meaningful tradeoff (e.g. 'should I use markdown' is not a council question). DO trigger when the user presents a genuine decision with stakes, multiple options, and context that suggests they want it pressure-tested from multiple angles.