Give opencode the same agent instructions, rules and MCP servers as Claude Code
opencode already reads skills from ~/.claude/skills and ~/.agents/skills, so those needed nothing. The rest did. The manifest now links agents/AGENTS.md to ~/.config/opencode/AGENTS.md as well, beside the Claude Code and Codex names. opencode keeps its MCP servers in its own JSON config, with no file to point a symlink at, so link-mcp now writes them there too. It builds one entry per row of user/agents/mcp/servers with the same tokens it gives Claude Code, and adds ~/.claude/rules/*.md under instructions, since opencode does not read that directory by itself. Only those two keys change. The file is written private and swapped in whole because it now holds tokens, and a config with JSONC comments is left alone with a warning rather than rewritten without them.
This commit is contained in:
1 parent
f4fca1797f
commit
34bc1663ed
3 files changed
+70
-14
No files matched your search
+3
-2
@@ -23,10 +23,11 @@
|
||||
# Gabriel's agent instructions on their machine.
|
||||
|
||||
# ── Agents ───────────────────────────────────────────────────────────────────
|
||||
# One file, two names. Claude Code reads CLAUDE.md and Codex reads AGENTS.md,
|
||||
# and before this they were two byte-identical copies waiting to disagree.
|
||||
# One file, three names. Claude Code reads CLAUDE.md, Codex and opencode read
|
||||
# AGENTS.md, and before this they were byte-identical copies waiting to disagree.
|
||||
link agents/AGENTS.md ~/.claude/CLAUDE.md
|
||||
link agents/AGENTS.md ~/.codex/AGENTS.md
|
||||
link agents/AGENTS.md ~/.config/opencode/AGENTS.md
|
||||
|
||||
# Skills, at both paths that look for them. Each tracked skill is linked from
|
||||
# this checkout so edits stay shared and `panama update` offers to commit them.
|
||||
|
||||
Reference in new issue
Block a user