{"id":50506303,"url":"https://github.com/cgaravitoq/my-opencode","last_synced_at":"2026-06-02T16:04:20.375Z","repository":{"id":359762076,"uuid":"1247102368","full_name":"cgaravitoq/my-opencode","owner":"cgaravitoq","description":"OpenCode configuration with agents, skills, review guardrails, and a GitHub Issues workflow bundle.","archived":false,"fork":false,"pushed_at":"2026-05-30T16:29:37.000Z","size":130,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T18:12:48.063Z","etag":null,"topics":["ai-agents","automation","bun","code-review","coding-agent","developer-tools","github-issues","opencode","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/cgaravitoq/my-opencode","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgaravitoq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-22T22:50:49.000Z","updated_at":"2026-05-30T16:29:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cgaravitoq/my-opencode","commit_stats":null,"previous_names":["cgaravitoq/my-opencode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cgaravitoq/my-opencode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgaravitoq%2Fmy-opencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgaravitoq%2Fmy-opencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgaravitoq%2Fmy-opencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgaravitoq%2Fmy-opencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgaravitoq","download_url":"https://codeload.github.com/cgaravitoq/my-opencode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgaravitoq%2Fmy-opencode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33829352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","automation","bun","code-review","coding-agent","developer-tools","github-issues","opencode","typescript"],"created_at":"2026-06-02T16:04:19.321Z","updated_at":"2026-06-02T16:04:20.370Z","avatar_url":"https://github.com/cgaravitoq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# my-opencode\n\nPublic, versioned [OpenCode](https://opencode.ai) configuration for a multi-agent coding workflow: global agents, reusable skills, review guardrails, and a per-repo GitHub Issues bundle template. Clone it on any machine, run the installer, and your OpenCode setup is ready.\n\n## What's inside\n\n```\n.\n├── opencode.json              # Main config: model, providers, MCP servers, permissions\n├── AGENTS.md                  # Opinionated global rules loaded into every agent\n├── package.json               # OpenCode plugin dependencies\n├── agents/                    # Custom agents\n│   ├── architect.md           # Primary orchestrator (GitHub-Issues-aware + ad-hoc) — Opus 4.8 max\n│   ├── coder.md               # Primary fast-path agent for trivial changes — Opus 4.8 max\n│   ├── exec.md                # Subagent: implementer driven by pipeline-execution — GPT-5.5\n│   ├── reviewer.md            # Subagent: review-fix loop owner + PR opener — Opus 4.8 medium\n│   ├── fixer.md               # Subagent: applies blocker deltas from reviewer — GPT-5.5\n│   └── reviewer-*.md          # Four read-only swarm reviewers\n├── skills/                    # Global skills; also installable per repo with `bunx skills add ... --all`\n│   ├── pipeline-execution/    # Generic exec → reviewer → fixer → PR pipeline (tracker-agnostic)\n│   └── swarm-review/          # Multi-model parallel code review (used by `coder` fast path)\n├── templates/\n│   └── github-issues-skill/   # GitHub Issues bundle template — installed PER REPO via `bun run install-issues-bundle`\n├── scripts/\n│   └── cli.ts                 # Bun CLI: `setup`, `cleanup`, `install-skills`, `install-issues-bundle`\n├── .opencode/\n│   ├── plugins/               # Global OpenCode plugins symlinked into ~/.config/opencode/plugins/\n│   │   └── review-guardrails.ts # Publish gate: blocks `git push` / `gh pr create` until review-state authorizes\n│   └── tools/                 # Global OpenCode tools symlinked into ~/.config/opencode/tools/\n│       └── review-state.ts    # Custom tool owning review-fix loop state (consumed by `agents/reviewer.md`)\n└── .gitignore\n```\n\n## Setup on a new machine\n\n### 1. Install OpenCode\n\n```bash\ncurl -fsSL https://opencode.ai/install | bash\n```\n\n### 2. Clone this repo\n\n```bash\ngit clone https://github.com/cgaravitoq/my-opencode.git ~/code/my-opencode\ncd ~/code/my-opencode\n```\n\n### 3. Run the installer\n\n```bash\nbun run setup\n```\n\nThis symlinks every file in this repo into `~/.config/opencode/`. Existing files are backed up to `\u003cname\u003e.backup` before being replaced. Re-run any time you add new agents or skills to the repo (existing symlinks resolve through `git pull` automatically; only new files need re-linking).\n\n### 4. Subscribe to OpenCode Go (optional, recommended)\n\nThe reviewer subagents use models from [OpenCode Go](https://opencode.ai/go) ($10/month). Subscribe and connect:\n\n```bash\nopencode\n# in the TUI:\n/connect\n# select OpenCode Go and paste the API key\n```\n\n### 5. Verify\n\n```bash\nopencode\n# in the TUI:\n/agents    # should list: architect, coder, exec, reviewer, fixer, reviewer-arch, reviewer-reasoning, reviewer-e2e, reviewer-quick\n/models    # should include anthropic/claude-opus-4-8, anthropic/claude-sonnet-4-6, openai/gpt-5.5, opencode-go/deepseek-v4-pro, opencode-go/deepseek-v4-flash\n```\n\n## Install skills into the current repo\n\nUse this when OpenCode is already configured globally and you only want this repo's reusable skills in the project you're currently in:\n\n```bash\ncd /path/to/target-repo\nbunx skills add cgaravitoq/my-opencode --all\n```\n\nThat installs `pipeline-execution` and `swarm-review` into `.agents/skills/` and writes `skills-lock.json`. It does not install global agents, plugins, or tools; run `bun run setup` from this repo once for those.\n\nFrom a local checkout of this repo, the equivalent target-repo installer is:\n\n```bash\nbun run install-skills /path/to/target-repo\n```\n\n## How it works\n\n### Layers\n\n**Global layer** (lives in `~/.config/opencode/`, symlinked from this repo):\n\n- 5 + 4 agents (primaries + swarm).\n- 2 skills: `pipeline-execution` (the code-shipping pipeline) and `swarm-review` (used by the `coder` fast path).\n\n**Per-repo skills layer** (lives in each repo's `.agents/skills/`):\n\n- Installed from the public repo with `bunx skills add cgaravitoq/my-opencode --all`.\n- Adds the reusable skills to that repo without touching global OpenCode config.\n\n**Per-repo GitHub Issues layer** (lives in each repo's `.agents/skills/github-issues/`):\n\n- One GitHub Issues bundle per repo. Defines that repo's status-label flow, sub-skills, and shaping rules.\n- Installed once per repo via `bun run install-issues-bundle /path/to/repo`. After install, you customize it for your label conventions.\n- The architect auto-detects the bundle and uses it for issue-mode requests in that repo. No bundle = ad-hoc only.\n\n### Agents\n\nTwo primary agents — switch with **Tab** in the TUI:\n\n- `architect` — orchestrator. Auto-detects the per-repo GitHub Issues bundle if present, falls back to ad-hoc otherwise. All code work goes through the global `pipeline-execution` skill.\n- `coder` — fast path for trivial changes (one-line fixes, renames, doc tweaks). Optionally delegates to the `reviewer-*` swarm via the `swarm-review` skill.\n\nThe pipeline subagents are invoked by `pipeline-execution` (not the architect directly):\n\n- `exec` — implementer. Commits one task per call to the parent branch.\n- `reviewer` — review-fix loop owner. Invokes swarm + fixer, runs final verify gate, opens the draft PR.\n- `fixer` — applies blocker deltas. Surgical only.\n\n| Agent | Mode | Model | Lab | Specialty |\n|---|---|---|---|---|\n| `architect` | primary | Claude Opus 4.8 (max) | Anthropic | Orchestrator. Per-repo GitHub Issues bundle aware. |\n| `coder` | primary | Claude Sonnet 4.6 (medium) | Anthropic | Fast-path coder for trivial changes. |\n| `exec` | subagent | GPT-5.5 (low) | OpenAI | Implementer (invoked via `pipeline-execution`). |\n| `reviewer` | subagent | Claude Opus 4.8 (medium) | Anthropic | Review-fix loop owner + PR opener. |\n| `fixer` | subagent | GPT-5.5 (medium) | OpenAI | Applies blocker deltas from reviewer. |\n| `reviewer-quick` | subagent | DeepSeek V4 Flash | DeepSeek | Fast first-pass: typos, copy-paste errors. |\n| `reviewer-arch` | subagent | DeepSeek V4 Pro | DeepSeek | Architecture, design patterns, abstractions. |\n| `reviewer-reasoning` | subagent | DeepSeek V4 Pro | DeepSeek | Logic correctness, edge cases, error paths. |\n| `reviewer-e2e` | subagent | DeepSeek V4 Pro (1M ctx) | DeepSeek | Cross-file impact, integration, breaking changes. |\n\n### Pipeline (`skills/pipeline-execution/`)\n\nThe single shared implementation pipeline. Tracker-agnostic. Used by the architect (ad-hoc) and by per-repo GitHub Issues bundles (when their `*-to-execution` step needs to ship code).\n\n```text\npipeline-execution (skill)\n  ├─ task → exec (GPT-5.5)               implement task on parent branch\n  └─ task → reviewer (Opus 4.8 medium)\n            ├─ task → reviewer-* (swarm, parallel)   audit\n            ├─ task → fixer (GPT-5.5) ← loop ≤3\n            └─ push parent branch\n            └─ open draft PR with `hitl` | `hitl-blocked` label\n```\n\nDiversity by design: planner (Anthropic Opus), executor (OpenAI GPT-5.5), reviewer orchestrator (Anthropic Opus) + a DeepSeek swarm (V4 Flash for fast smoke checks, V4 Pro for architecture, deep reasoning, and 1M-context cross-file review). Three labs (Anthropic, OpenAI, DeepSeek) avoid shared blind spots while keeping costs low.\n\n### Publish gate (`.opencode/plugins/` + `.opencode/tools/`)\n\nThe loop above is enforced by two global files symlinked into `~/.config/opencode/` by the installer. `.opencode/plugins/review-guardrails.ts` intercepts `git push` and `gh pr create` and blocks them until the branch has been authorized — that's why pushes can error with `publish gated by review-state for branch \u003cname\u003e`. Authorization lives in `.opencode/tools/review-state.ts`, the custom tool the `reviewer` agent uses to track the review-fix loop and mark a branch ready to publish (see `agents/reviewer.md` \"Loop State (hard gate)\"). Add your own plugins or tools by dropping `.ts`/`.js` files into these directories and re-running `bun run setup`.\n\n### Context window tuning\n\nOpenCode does not expose an agent-level knob that shrinks or expands a model's usable context window. For built-in providers, OpenCode loads model limits from Models.dev automatically. For custom providers or custom model entries, configure `provider.\u003cid\u003e.models.\u003cmodel\u003e.limit.context` and `limit.output` so OpenCode knows the model's real capacity.\n\nUse `compaction` for session behavior around that capacity:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"compaction\": {\n    \"auto\": true,\n    \"prune\": true,\n    \"reserved\": 10000\n  }\n}\n```\n\n`reserved` leaves a token buffer before compaction. It does not increase the model's actual context window.\n\n### GitHub Issues bundle (per repo)\n\nEach repo that wants GitHub Issues integration installs its own bundle in `.agents/skills/github-issues/`:\n\n```bash\n# from this template repo\nbun run install-issues-bundle /path/to/your/repo\n\n# or from anywhere, pointing at the target\nbun --cwd /path/to/template run install-issues-bundle /path/to/your/repo\n```\n\nDefault template (under `templates/github-issues-skill/`) ships with an opinionated flow, encoded as `status:*` labels:\n\n```\nstatus:idea → status:draft → status:prd → status:running → status:hitl → status:ready\n```\n\nExactly one `status:*` label is active per issue at any time. Transitions are always atomic: `gh issue edit \u003cN\u003e --remove-label status:A --add-label status:B`.\n\nSub-skills:\n\n- `idea-to-issue/` — capture a raw idea (single issue or parent issue + initial drafts via tasklist).\n- `project-to-draft/` — split an existing parent issue into `status:draft` child slices.\n- `draft-to-prd/` — three-phase guided interview to promote a draft to PRD.\n- `prd-to-execution/` — GitHub Issues bookkeeping for executing a PRD. Code work is delegated to `pipeline-execution`.\n\nAfter install, edit:\n\n1. `\u003crepo\u003e/.agents/skills/github-issues/SKILL.md` — change `status:*` label names if you prefer different conventions (e.g. `status:prd` → `status:spec-ready`, `status:hitl` → `status:in-review`).\n2. Sub-skill bodies — adjust shaping rules (e.g. always-parent-issue vs single-issue intake, more or fewer interview phases, etc.).\n3. Seed the labels in the repo (see `references/status-mapping.md` \"Seeding labels\" — short bash loop using `gh label create`).\n\nDifferent repos can have completely different label flows. The architect doesn't care — it reads each repo's bundle and adapts.\n\nTrigger phrases for issue mode (Spanish or English):\n\n- \"tengo una idea\" / \"I have an idea\"\n- \"captura esto\" / \"capture this\"\n- \"trabajemos en #42\" / \"let's work on #42\"\n- \"abordemos esta issue\" / \"execute owner/repo#42\"\n- \"promote to PRD\"\n\nThe architect routes by **current `status:*` label** as defined in the active repo's bundle, not by the verb you used.\n\n### Swarm review skill (`skills/swarm-review/`)\n\nFallback path for the `coder` fast path. The full pipeline does not use this skill — `pipeline-execution`'s `reviewer` agent owns swarm orchestration directly.\n\nTrigger phrases when invoked from `coder`:\n\n- \"audita el código\" / \"audit my code\"\n- \"revisa mi implementación\" / \"review this\"\n- \"second opinion\"\n- \"qué se me escapó\"\n- \"lanza el swarm\"\n\nPicks a subset of reviewers based on change size, runs them in parallel, consolidates findings into a prioritized summary.\n\nBackground subagents must be enabled for real wall-clock parallelism:\n\n```bash\nexport OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS=true\nexport OPENCODE_REVIEW_SWARM_CAP=32\n```\n\nThe swarm cap is a guardrail against runaway reviewer loops. `32` supports four full PR swarms (`4 PRs × 4 reviewers`) plus follow-up quick checks.\n\n### Emergency bypass\n\nIf the `review-guardrails` plugin blocks a `git push` / `gh pr create` due to corrupted or stale loop state (e.g. an interrupted process that left `review-state` mid-write), set `OPENCODE_REVIEW_BYPASS=1` for the current process to skip the publish gate entirely:\n\n```bash\nOPENCODE_REVIEW_BYPASS=1 git push\n```\n\nUse it only as an escape hatch — bypassing the gate also disables the swarm-budget cap, so a runaway reviewer loop can keep spawning subagents past `OPENCODE_REVIEW_SWARM_CAP`. Prefer inspecting or deleting the offending state file first: `$XDG_STATE_HOME/opencode/review-state/\u003crepo-hash\u003e/\u003cbranch\u003e.json` (defaults to `~/.local/state/opencode/review-state/...`).\n\n## MCPs\n\nThe canonical `opencode.json` ships with only the MCP server used by the agents and skills in this template: `sequential-thinking`. GitHub Issues integration goes through the `gh` CLI directly — no MCP required.\n\n### Optional MCPs you can plug in\n\nDrop any of these into `opencode.json` under `\"mcp\"` if you want them. None are required by the template.\n\n- **cloudflare** — Cloudflare Workers / DNS / KV management. Remote server, no install: `{ \"type\": \"remote\", \"url\": \"https://mcp.cloudflare.com/mcp\" }`.\n- **tavily** — web search and content extraction. Remote server, requires a Tavily API key in the auth flow: `{ \"type\": \"remote\", \"url\": \"https://mcp.tavily.com/mcp/\" }`.\n- **vercel** — Vercel projects, deployments, env vars. Remote server, no install: `{ \"type\": \"remote\", \"url\": \"https://mcp.vercel.com\" }`.\n- **btca** — local MCP for users who have the `btca` CLI installed: `{ \"type\": \"local\", \"command\": [\"bun\", \"x\", \"btca\", \"mcp\"] }`.\n\n## Working across repos\n\nThe architect adapts to whatever repo you're in:\n\n- **Repo with `.agents/skills/github-issues/`** — architect loads that bundle and routes issue-mode requests through it. Each repo can have its own label names and flow (e.g. `status:prd` vs `status:spec-ready`, 6-state vs 11-state flow).\n- **Repo without a bundle** — only ad-hoc mode is available. Architect asks if you want to install one (`bun run install-issues-bundle \u003crepo\u003e`) or proceed without issue tracking.\n- **Trivial change** — invoke `coder` directly. Skips the pipeline.\n\nCode work always goes through the global `pipeline-execution` skill — same `exec → reviewer → fixer → PR` everywhere. The per-repo bundle only handles GitHub Issues bookkeeping.\n\nTo install the GitHub Issues bundle in a new repo:\n\n```bash\n# from the template repo, pointing at the target\nbun --cwd ~/code/my-opencode run install-issues-bundle /path/to/repo\n\n# from inside the template repo, defaults to $(pwd)\nbun run install-issues-bundle /path/to/repo\n\n# overwrite an existing bundle (auto-backed-up)\nbun run install-issues-bundle /path/to/repo --force\n```\n\nAfter install, edit `\u003crepo\u003e/.agents/skills/github-issues/SKILL.md` and the sub-skills to match your label conventions. Seed the labels with `gh label create` (see `references/status-mapping.md` in the bundle). Commit the bundle to the repo so the rest of the team (and your other machines) get the same setup.\n\n## Updating the config\n\nEdit files **in this repo** (not in `~/.config/opencode/` — those are symlinks). Commit and push. On other machines, `git pull` and changes apply immediately (symlinks resolve to the repo).\n\nIf you ever pull a version of this repo that removed a globally-symlinked file, the old symlink becomes a dangling pointer. Re-run `bun run cleanup \u0026\u0026 bun run setup` once to refresh.\n\n## Uninstalling\n\n```bash\nbun run cleanup\n```\n\nRemoves only the symlinks pointing into this repo; restores `.backup` files if they exist.\n\n## Security\n\n- **Never commit secrets.** `gh` CLI uses its own keyring-backed token (`gh auth login`) — no `.env` file or `{env:VAR_NAME}` references are required for anything shipped here. Remote MCPs added later (e.g. `vercel`, `cloudflare`) authenticate through OpenCode's `/connect` OAuth flow.\n- The `.gitignore` excludes `.env` and `*.backup` so future env-var-backed integrations stay out of git.\n- Rotate any token that ever ended up in a commit, even after deleting it — git history keeps everything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgaravitoq%2Fmy-opencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgaravitoq%2Fmy-opencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgaravitoq%2Fmy-opencode/lists"}