opencode-upkeep-and-maintenance

Reset stale OpenCode sidebar snapshots to match the git working tree.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/dzackgarza/ai --skill opencode-upkeep-and-maintenance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-upkeep-and-maintenance
Source: https://github.com/dzackgarza/ai/tree/main/opencode/skills/opencode-upkeep-and-maintenance
Command: npx skills add https://github.com/dzackgarza/ai --skill opencode-upkeep-and-maintenance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenCode’s sidebar can drift from the actual git working tree, leaving stale snapshot references behind. This skill provides a safe, auditable workflow to restore alignment between the sidebar state and the repository, with built-in safeguards such as backups and explicit user approvals.

Core Features & Use Cases

  • Safety-first maintenance workflow: backup the database, require explicit user consent, and validate the target session status before any actions.
  • Reset Sidebar Baseline: realign the sidebar with the current repo state when drift is detected.
  • Session Pruning and Playbooks: identify and prune ephemeral or obsolete sessions to reclaim space while preserving important history.
  • Cache and Plugin Hygiene: provide guidance for clearing caches and avoiding stale artifacts that impact OpenCode behavior.
  • Audit-ready workflows: maintain an action trail with confirmations for reproducible maintenance.

Quick Start

Backup the OpenCode database, obtain explicit user approval to disable native rollbacks, verify the target session is idle, and run oc-refresh-diff <session-id> to reset the baseline.

Frequently Asked Questions about opencode-upkeep-and-maintenance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix OpenCode sidebar drift from my git working tree?

To fix OpenCode sidebar drift, back up the database, get explicit user consent to disable rollbacks, verify the target session is idle, and run oc-refresh-diff with the session-id to reset the baseline.

What causes stale snapshot references in the OpenCode sidebar?

Stale snapshot references occur when the OpenCode sidebar drifts from the actual git working tree, leaving behind outdated session states that no longer match the current repository condition.

How do I safely prune obsolete OpenCode sessions and clear the cache?

Safely prune obsolete OpenCode sessions by backing up the database first, obtaining explicit user approval, validating session-id status, and executing targeted pruning procedures alongside cache cleanup to reclaim space.

Do I need to back up the OpenCode database before resetting the sidebar baseline?

Yes, backing up the OpenCode database is a mandatory safety requirement before resetting the sidebar baseline, ensuring you can restore alignment without losing important session history during maintenance.

What's the best way to maintain OpenCode plugin hygiene and avoid stale artifacts?

Maintain OpenCode plugin hygiene by following cache management guidance to clear stale artifacts, running oc-refresh-diff to realign state, and executing pruning procedures to remove obsolete session data.

When should I avoid disabling native rollbacks for OpenCode sidebar maintenance?

Avoid disabling native rollbacks if you cannot obtain explicit user consent or back up the database first, as these safety requirements ensure audit-ready workflows and reproducible maintenance actions.