前提条件opencode 已经成功安装了自动安装 OMO SlimInstall and configure oh-my-opencode-slim: https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/master/README.md如果你已经安装了 bun可以手动安装 OMO Slimbunx oh-my-opencode-slimlatest install然后可选安装cc-switch如果你有多平台和多模型配置需求的话强烈推荐opencode.json 文件远程版context7时效性强编程时更快获取技术框架的最新文档以更新大模型的知识库mem0记忆的持久化// 第一个忘了做什么来着了 plugin: [.opencode/plugins/graphify.js, oh-my-opencode-slimlatest],$schema: https://opencode.ai/config.json, mcp: { context7: { enabled: true, headers: { CONTEXT7_API_KEY: ??? }, type: remote, url: https://mcp.context7.com/mcp }, mem0: { enabled: true, headers: { Authorization: Token ??? }, oauth: false, type: remote, url: https://mcp.mem0.ai/mcp/ } }, plugin: [.opencode/plugins/graphify.js, oh-my-opencode-slimlatest],opencode.jsonc 文件本地版{ $schema: https://opencode.ai/config.json, permission: { task: allow, }, instructions: [ node_modules/morphllm/opencode-morph-plugin/instructions/morph-tools.md, ], plugin: [ morphllm/opencode-morph-pluginlatest, // 快速修改大型文件 // tarquinen/opencode-dcplatest, // 动态剪切上下文 替代品 magic context cortexkit/opencode-magic-contextlatest, // 替代 dcp mohak34/opencode-notifierlatest, // 桌面提醒 nick-vi/opencode-type-injectlatest, // 类型检查 tmegit/opencode-worktree-sessionlatest, // 项目管理 mem0/opencode-pluginlatest, // 记忆持久化 oh-my-opencode-slimlatest, // 多 agent 模型能力强 上下文大的模型才有开的必要 opencode-pty, // 提升终端交互体验 opencode-skills, superpowersgithttps://github.com/obra/superpowers.git, // 著名的 superpowers 技能集 ], command: { superpower:brainstorming: { description: Explore user intent, requirements, and design before creative work, template: Load the brainstorming skill using the skill tool, then follow it exactly., }, superpower:dispatching-parallel-agents: { description: Execute 2 independent tasks in parallel using subagents, template: Load the dispatching-parallel-agents skill using the skill tool, then follow it exactly., }, superpower:executing-plans: { description: Execute an implementation plan in a separate session with review checkpoints, template: Load the executing-plans skill using the skill tool, then follow it exactly., }, superpower:finishing-a-development-branch: { description: Guide completion of development work - merge, PR, or cleanup, template: Load the finishing-a-development-branch skill using the skill tool, then follow it exactly., }, superpower:receiving-code-review: { description: Process code review feedback with technical rigor before implementing suggestions, template: Load the receiving-code-review skill using the skill tool, then follow it exactly., }, superpower:requesting-code-review: { description: Verify work meets requirements before committing or merging, template: Load the requesting-code-review skill using the skill tool, then follow it exactly., }, superpower:subagent-driven-development: { description: Execute independent implementation tasks using subagents in the current session, template: Load the subagent-driven-development skill using the skill tool, then follow it exactly., }, superpower:systematic-debugging: { description: Debug bugs, test failures, and unexpected behavior systematically, template: Load the systematic-debugging skill using the skill tool, then follow it exactly., }, superpower:test-driven-development: { description: Write tests before implementation code (TDD workflow), template: Load the test-driven-development skill using the skill tool, then follow it exactly., }, superpower:using-git-worktrees: { description: Create isolated workspaces for feature work via git worktrees, template: Load the using-git-worktrees skill using the skill tool, then follow it exactly., }, superpower:verification-before-completion: { description: Verify work (lint, tests, build) before claiming completion, template: Load the verification-before-completion skill using the skill tool, then follow it exactly., }, superpower:writing-plans: { description: Create detailed implementation plans from specs or requirements, template: Load the writing-plans skill using the skill tool, then follow it exactly., }, superpower:writing-skills: { description: Create, edit, and verify skills, template: Load the writing-skills skill using the skill tool, then follow it exactly., }, }, mcp: { sequential-thinking: { type: local, command: [ cmd, /c, npx, -y, modelcontextprotocol/server-sequential-thinking, ], enabled: false, }, filesystem: { type: local, command: [ cmd, /c, npx, -y, modelcontextprotocol/server-filesystem, // C:\\Users\\admin\\.opencode, // C:\\Users\\admin\\.cache\\opencode, // C:\\Users\\admin\\.config\\opencode, // C:\\Users\\admin\\.local\\share\\opencode, // C:\\Users\\admin\\.local\\state\\opencode, // C:\\Users\\admin\\AppData\\Local\\Temp, C:\\Users\\admin, // D:\\program\\coder\\utils\\bun-windows-x64\\.opencode, D:\\program\\coder\\, D:\\data\\admin, D:\\data\\download, D:\\data\\desktop, D:\\data\\studio, ], enabled: true, }, morph-mcp: { type: local, command: [npx, --prefer-offline, -y, morphllm/morphmcp], environment: { MORPH_API_KEY: ???, }, enabled: true, }, firecrawl-mcp: { type: local, command: [npx, -y, firecrawl-mcp], environment: { FIRECRAWL_API_KEY: ???, }, enabled: false, }, markitdown: { type: local, command: [markitdown-mcp], enabled: false, }, chrome-devtools: { type: local, command: [npx, -y, chrome-devtools-mcplatest], enabled: false, }, }, compaction: { auto: false, prune: false, }, }magic context 安装安装 opencode 的前提下执行npx cortexkit/magic-contextlatest setup随后有英文的引导界面翻译搞完即可。然后用此命令检查一下npx cortexkit/magic-contextlatest doctor如果有报错或感叹号多执行几次下面这个命令直到无报错为止npx cortexkit/magic-contextlatest doctor --force节省 token 的可选安装rtk安装网址如下https://github.com/rtk-ai/rtk对于 windows 系统支持有限建议用 mac 或 linux 或 wsl2 安装 rtk作用是 cli 代理程序对命令输出进行过滤和压缩节省常用的 token 上下文。浏览器操作能力出名的有 PlaywrightMCP、Playwright-cli、opencode-browserplugin、Agent Reach工作流、chrome-devtoolsMCP、Agent Browsercli首推的是 cli 版本的 Playwright-cli 或 Agent Browsercli其次是 plugin 版本的 opencode-browserMCP 版本 token 占用多但是调用显式按自己情况来实时开启比如用 chrome-devtoolsMCP 临时开启进行调试Agent Reach工作流按需选用我的 cc 的 oh my opencode slim 截图大家也可以将自己的 ai agent 配置 或者 经验心得 分享在评论区
OpenCode 个人习惯设置大全
发布时间:2026/6/29 18:55:38
前提条件opencode 已经成功安装了自动安装 OMO SlimInstall and configure oh-my-opencode-slim: https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/master/README.md如果你已经安装了 bun可以手动安装 OMO Slimbunx oh-my-opencode-slimlatest install然后可选安装cc-switch如果你有多平台和多模型配置需求的话强烈推荐opencode.json 文件远程版context7时效性强编程时更快获取技术框架的最新文档以更新大模型的知识库mem0记忆的持久化// 第一个忘了做什么来着了 plugin: [.opencode/plugins/graphify.js, oh-my-opencode-slimlatest],$schema: https://opencode.ai/config.json, mcp: { context7: { enabled: true, headers: { CONTEXT7_API_KEY: ??? }, type: remote, url: https://mcp.context7.com/mcp }, mem0: { enabled: true, headers: { Authorization: Token ??? }, oauth: false, type: remote, url: https://mcp.mem0.ai/mcp/ } }, plugin: [.opencode/plugins/graphify.js, oh-my-opencode-slimlatest],opencode.jsonc 文件本地版{ $schema: https://opencode.ai/config.json, permission: { task: allow, }, instructions: [ node_modules/morphllm/opencode-morph-plugin/instructions/morph-tools.md, ], plugin: [ morphllm/opencode-morph-pluginlatest, // 快速修改大型文件 // tarquinen/opencode-dcplatest, // 动态剪切上下文 替代品 magic context cortexkit/opencode-magic-contextlatest, // 替代 dcp mohak34/opencode-notifierlatest, // 桌面提醒 nick-vi/opencode-type-injectlatest, // 类型检查 tmegit/opencode-worktree-sessionlatest, // 项目管理 mem0/opencode-pluginlatest, // 记忆持久化 oh-my-opencode-slimlatest, // 多 agent 模型能力强 上下文大的模型才有开的必要 opencode-pty, // 提升终端交互体验 opencode-skills, superpowersgithttps://github.com/obra/superpowers.git, // 著名的 superpowers 技能集 ], command: { superpower:brainstorming: { description: Explore user intent, requirements, and design before creative work, template: Load the brainstorming skill using the skill tool, then follow it exactly., }, superpower:dispatching-parallel-agents: { description: Execute 2 independent tasks in parallel using subagents, template: Load the dispatching-parallel-agents skill using the skill tool, then follow it exactly., }, superpower:executing-plans: { description: Execute an implementation plan in a separate session with review checkpoints, template: Load the executing-plans skill using the skill tool, then follow it exactly., }, superpower:finishing-a-development-branch: { description: Guide completion of development work - merge, PR, or cleanup, template: Load the finishing-a-development-branch skill using the skill tool, then follow it exactly., }, superpower:receiving-code-review: { description: Process code review feedback with technical rigor before implementing suggestions, template: Load the receiving-code-review skill using the skill tool, then follow it exactly., }, superpower:requesting-code-review: { description: Verify work meets requirements before committing or merging, template: Load the requesting-code-review skill using the skill tool, then follow it exactly., }, superpower:subagent-driven-development: { description: Execute independent implementation tasks using subagents in the current session, template: Load the subagent-driven-development skill using the skill tool, then follow it exactly., }, superpower:systematic-debugging: { description: Debug bugs, test failures, and unexpected behavior systematically, template: Load the systematic-debugging skill using the skill tool, then follow it exactly., }, superpower:test-driven-development: { description: Write tests before implementation code (TDD workflow), template: Load the test-driven-development skill using the skill tool, then follow it exactly., }, superpower:using-git-worktrees: { description: Create isolated workspaces for feature work via git worktrees, template: Load the using-git-worktrees skill using the skill tool, then follow it exactly., }, superpower:verification-before-completion: { description: Verify work (lint, tests, build) before claiming completion, template: Load the verification-before-completion skill using the skill tool, then follow it exactly., }, superpower:writing-plans: { description: Create detailed implementation plans from specs or requirements, template: Load the writing-plans skill using the skill tool, then follow it exactly., }, superpower:writing-skills: { description: Create, edit, and verify skills, template: Load the writing-skills skill using the skill tool, then follow it exactly., }, }, mcp: { sequential-thinking: { type: local, command: [ cmd, /c, npx, -y, modelcontextprotocol/server-sequential-thinking, ], enabled: false, }, filesystem: { type: local, command: [ cmd, /c, npx, -y, modelcontextprotocol/server-filesystem, // C:\\Users\\admin\\.opencode, // C:\\Users\\admin\\.cache\\opencode, // C:\\Users\\admin\\.config\\opencode, // C:\\Users\\admin\\.local\\share\\opencode, // C:\\Users\\admin\\.local\\state\\opencode, // C:\\Users\\admin\\AppData\\Local\\Temp, C:\\Users\\admin, // D:\\program\\coder\\utils\\bun-windows-x64\\.opencode, D:\\program\\coder\\, D:\\data\\admin, D:\\data\\download, D:\\data\\desktop, D:\\data\\studio, ], enabled: true, }, morph-mcp: { type: local, command: [npx, --prefer-offline, -y, morphllm/morphmcp], environment: { MORPH_API_KEY: ???, }, enabled: true, }, firecrawl-mcp: { type: local, command: [npx, -y, firecrawl-mcp], environment: { FIRECRAWL_API_KEY: ???, }, enabled: false, }, markitdown: { type: local, command: [markitdown-mcp], enabled: false, }, chrome-devtools: { type: local, command: [npx, -y, chrome-devtools-mcplatest], enabled: false, }, }, compaction: { auto: false, prune: false, }, }magic context 安装安装 opencode 的前提下执行npx cortexkit/magic-contextlatest setup随后有英文的引导界面翻译搞完即可。然后用此命令检查一下npx cortexkit/magic-contextlatest doctor如果有报错或感叹号多执行几次下面这个命令直到无报错为止npx cortexkit/magic-contextlatest doctor --force节省 token 的可选安装rtk安装网址如下https://github.com/rtk-ai/rtk对于 windows 系统支持有限建议用 mac 或 linux 或 wsl2 安装 rtk作用是 cli 代理程序对命令输出进行过滤和压缩节省常用的 token 上下文。浏览器操作能力出名的有 PlaywrightMCP、Playwright-cli、opencode-browserplugin、Agent Reach工作流、chrome-devtoolsMCP、Agent Browsercli首推的是 cli 版本的 Playwright-cli 或 Agent Browsercli其次是 plugin 版本的 opencode-browserMCP 版本 token 占用多但是调用显式按自己情况来实时开启比如用 chrome-devtoolsMCP 临时开启进行调试Agent Reach工作流按需选用我的 cc 的 oh my opencode slim 截图大家也可以将自己的 ai agent 配置 或者 经验心得 分享在评论区