Skip to content

sopisreal/opencode-optimize

Repository files navigation

opencode-optimize

Performance optimization toolkit for OpenCode. Configs, memory skills, cleanup scripts, diagnostics, and comprehensive documentation — everything you need to make OpenCode faster in large projects.

What's Included

Core

File Purpose
prompt.md AI action file — paste this to any AI and it applies all optimizations automatically
templates/opencode.jsonc Verified optimized global config
templates/opencode-project.jsonc Verified optimized project config

Memory System

File Purpose
skills/persistent-memory/skill.json Skill metadata
skills/persistent-memory/instructions.md Agent memory read/write instructions
.opencode/memory/*.md 5 template memory files (decisions, patterns, solutions, progress, preferences)

Scripts

File Purpose
scripts/cache-cleanup.ps1 Windows cache cleanup (dry-run safe)
scripts/cache-cleanup-linux.sh Linux/macOS cache cleanup (dry-run safe)
scripts/diagnostic.ps1 Windows performance diagnostics
scripts/diagnostic.sh Linux/macOS performance diagnostics

Documentation

File Purpose
docs/performance-checklist.md Quick-reference diagnostic checklist
docs/plugin-scores.md Plugin evaluation table from 8 research reports
docs/known-bugs.md 15 documented issues with workarounds
docs/env-vars.md Verified environment variables
docs/troubleshooting.md Common errors and fixes
docs/install-plugins.md Plugin install commands with version pinning
docs/graphify-setup.md Graphify knowledge graph setup guide
docs/when-to-compact.md Compaction decision guide
docs/mcp-optimization.md MCP server audit and optimization
docs/memory-guide.md Persistent memory usage guide
docs/wsl-notes.md WSL-specific gotchas
docs/docker-setup.md Docker setup guide
docs/ci-integration.md CI/CD integration guide

Total: 14 documentation files

Examples

File Purpose
examples/monorepo/opencode.json Config for large monorepos
examples/small-project/opencode.json Minimal config for small projects

Meta

File Purpose
CHANGELOG.md Version history
SECURITY.md Security policy
CONTRIBUTING.md How to contribute
tests/smoke-test.sh Verify scripts work

Quick Start

Option A: Let an AI do it

Give prompt.md to any AI coding assistant. It will read your existing config, optimize it, and apply changes.

Option B: Manual

# 1. Copy optimized config
cp templates/opencode.jsonc ~/.config/opencode/opencode.json

# 2. Copy project config
cp templates/opencode-project.jsonc ./opencode.json

# 3. Run diagnostics
bash scripts/diagnostic.sh

# 4. Clean cache
bash scripts/cache-cleanup-linux.sh --dry-run

Verified Config Fields

All config fields verified against official OpenCode documentation:

Field Value Why
snapshot false Disables git indexing bloat on large repos
compaction.auto true Auto-manages context window
compaction.prune true Removes old tool outputs before compaction
compaction.reserved 20000-40000 Token buffer — higher = earlier compaction
watcher.ignore ["node_modules/**", ...] Reduces file-watcher noise
provider.*.setCacheKey true Enables prompt cache affinity
autoupdate "notify" Prevents auto-download overhead
plugin ["name@x.y.z"] Flat array, pinned versions

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors