npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

my-opencode

v1.3.1

Published

高品質 opencode 開發流程 skill 與 agents 集合 — Contract-First 開發流程、ADR、PR Review、測試生成、文件生成

Downloads

884

Readme

my-opencode

opencode 生態打造的高品質開發流程 skill 與 agents 集合。

參考業界知名 agentic coding repo 的設計哲學,提煉出一套符合 opencode 架構的模組化、可組合的開發技能包。


快速安裝(npm)

# 在專案中安裝(產生 .opencode/,並提供 moc launcher)
npm install my-opencode

# 或只初始化 .opencode/
npx my-opencode init

# 安裝到指定專案
npx my-opencode init ./my-project

這會在你的專案下建立 .opencode/,包含 skills/agents/plugins/opencode.json

opencode 會自動發現 .opencode/opencode.json,無需額外設定。


本地開發(git clone)

如果直接 clone 本 repo 做開發或試用:

git clone https://github.com/jjyung/my-opencode.git
cd my-opencode
npm link    # 將 bin/moc 註冊到 PATH,讓 moc 指令全域可用

npm link 完成後,moc 即可在任何目錄使用。 新的 npm bin 入口是跨平台的 bin/moc.js;repo 內仍保留 bin/moc 給直接 shell 執行情境使用。


安裝完成後,moc 會成為主要入口:

moc               # 預設 opencode profile
moc openai        # 切到 OpenAI profile
moc google        # 切到 Google profile
moc copilot       # 切到 Copilot profile
moc --help        # 透明轉發到 opencode --help

Windows(cmd、PowerShell)現在也支援直接執行 moc;npm 會自動建立對應 shim,無需額外安裝 .cmd.ps1 檔案。

其他指令:

npx my-opencode list    # 列出可用 skills 與 agents
npx my-opencode help    # 顯示說明

Provider Profile 切換

內建 provider-profile plugin / resolver,主要透過 moc 切換整套模型配置。

支援值:opencode(預設)、openaigooglecopilot

| Profile | Primary / heavy | Small / verifier | |---------|------------------|------------------| | opencode | opencode/big-pickle | opencode/deepseek-v4-flash-free | | openai | openai/gpt-5.4 | openai/gpt-5.4-mini | | google | google/gemini-3.1-pro-preview-customtools | google/gemini-3.5-flash | | copilot | copilot/gpt-5.4 | copilot/gpt-5.4-mini |

# 預設 profile(opencode)
moc

# 切到 OpenAI
moc openai

# 切到 Google
moc google

# 轉發額外參數
moc openai --list-agents

moc 會在目前工作目錄尋找 .opencode/plugins/provider-profile.mjs.opencode/opencode.json。 對 opencode / openai / google / copilot 這四個 profile,會把產生出的 OPENCODE_CONFIG_CONTENT 快取到 .opencode/cache/provider-profile/;只要 profile、plugin mtime、config mtime 都沒變,就直接重用快取,不再重新跑 Node。若 plugin 缺失,則會警告並回退為 plain opencode

若你直接用 repo 內的 bin/moc,仍會走既有 POSIX shell launcher;透過 npm 安裝、npm linknpx 取得的 moc 則會走跨平台的 bin/moc.js

若要在 script 中直接使用環境變數,也可以:

OPENCODE_PROVIDER_PROFILE=openai \
OPENCODE_CONFIG_CONTENT="$(node .opencode/plugins/provider-profile.mjs)" \
opencode

如果想固定專案 profile,可把 .opencode/opencode.json 的 plugin 設定改成 tuple:

{
  "plugin": [
    ["plugins/provider-profile.mjs", { "profile": "google" }]
  ]
}

此 tuple 會覆寫 OPENCODE_PROVIDER_PROFILE

發布(維護者專用)

Token 設定

發布前需要建立一個 Access Token(繞過 2FA):

  1. 到 https://www.npmjs.com/settings/~/tokens
  2. Generate New Token → Granular Access Token
  3. 勾選 bypass two-factor authentication
  4. 設定 Read and Write 權限
  5. 將產生的 token 寫入專案 .npmrc
echo "//registry.npmjs.org/:_authToken=npm_xxxxxxxxxxxx" > .npmrc

⚠️ .npmrc 已加入 .gitignore,不會被 commit。

發布指令

npm publish

靈感來源

| 專案 | Stars | 核心啟發 | |------|-------|----------| | affaan-m/everything-claude-code | 170K+ | 超大型 skill 生態系統,40+ skill 模組,跨平台設計 | | Yeachan-Heo/oh-my-claudecode | 31K+ | 多 agent 編排模式(Team / Autopilot / Pipeline),plan→prd→exec→verify→fix 流程 | | wshobson/agents | 35K+ | 185+ 專用 agent、153 skill、單一職責 plugin 架構 | | alirezarezvani/claude-skills | 15K+ | 313+ skill 跨 12 種 AI 編碼工具,零依賴 Python 工具 | | coleam00/second-brain-skills | 700+ | 漸進式上下文揭露(progressive disclosure)哲學 | | coleam00/your-claude-engineer | 125+ | 多 agent 編排 + MCP 工具閘道整合 | | cablate/claude-code-research | 130+ | Claude Code 內部機制逆向分析,75 份 deep-dive 報告 |


本地參考原始碼

ref/ 下以 git submodule 追蹤上述專案的原始碼,方便快速瀏覽、對照設計:

ref/
├── everything-claude-code/   → affaan-m/everything-claude-code
├── oh-my-claudecode/         → Yeachan-Heo/oh-my-claudecode
├── wshobson-agents/          → wshobson/agents
├── claude-skills/            → alirezarezvani/claude-skills
├── second-brain-skills/      → coleam00/second-brain-skills
└── claude-code-research/     → cablate/claude-code-research

同步到最新:

git submodule update --remote --merge

首次 clone 本專案:

git clone --recurse-submodules <repo-url>
# 或事後初始化
git submodule update --init --recursive

目標

  1. 提煉通用流程 — 從上述專案中萃取「開發者真正需要的」工作流程模式,轉化為 opencode skill
  2. Contract-First — 以合約文件(ADR + Spec)為源頭真相,取代一次性 handoff,支援前後端平行開發
  3. 模組化設計 — 每個 skill 單一職責、可組合、可替換,避免大而全的 monolith
  4. opencode 原生 — 充分利用 opencode 的 skill/subagent/permission/MCP 機制,而非直接移植他廠格式
  5. 團隊協作就緒 — 支援 adr → contract → code → review → verify → deploy 的完整開發生命週期

結構規劃

my-opencode/
├── ref/                     # 參考專案(git submodule)
│   ├── everything-claude-code/
│   ├── oh-my-claudecode/
│   ├── wshobson-agents/
│   ├── claude-skills/
│   ├── second-brain-skills/
│   └── claude-code-research/
├── docs/                    # 探索記錄與設計文件
│   ├── references/          # 各 repo 分析筆記(6 份)
│   ├── patterns.md          # 跨 repo 可複用模式
│   └── design-decisions.md  # opencode 生態取捨
├── skills/                  # opencode skill(單一職責)
│   ├── adr/                 # [done] ADR:架構決策記錄
│   ├── dev-flow/            # [done] 開發流程:contract → code → verify
│   ├── pr-review/           # [done] PR 審查:5 維度分析
│   ├── test-gen/            # [done] 測試生成:框架偵測 + 多語言模式
│   ├── orchestrate/          # [done] 多 agent 編排:分解、平行派送、綜合
│   └── docs-gen/             # [done] 文件生成:註解、API、README、ADR
├── agents/                  # 組合多個 skill 的完整 agent
│   ├── architect.md         # [new] 架構師 agent(ADR 產生)
│   ├── spec-writer.md       # 規格 agent(合約文件 → docs/specs/)
│   ├── executor.md          # 實作 agent(讀寫)
│   ├── verifier.md          # 驗證 agent(唯讀+Bash)
│   ├── code-reviewer.md     # 程式碼審查 agent(唯讀)
│   ├── test-engineer.md     # 測試工程師 agent(讀寫)
│   ├── tech-writer.md       # 技術文件 agent(讀寫)
│   ├── fullstack-dev.md     # 全端開發 agent(編排三者)
│   └── team-lead.md         # 技術主管 agent(多 agent 交響樂指揮)
├── CONTRIBUTING.md          # 貢獻指南
├── LICENSE                  # MIT License
├── opencode.json            # opencode 整合設定:agent + command + skill 註冊
├── plugins/                 # opencode plugin(保留)
└── templates/               # skill / agent 建立範本

關鍵設計原則

  • Progressive Disclosure — 初期只載入必要 context,深入時才揭露細節
  • Single Responsibility — 每個 skill 只做一件事,做好
  • Model Agnostic — 不綁定特定模型,支援 opencode 支援的所有 LLM
  • Zero Heavy Dependency — 盡量使用 stdlib / 現有工具,避免非必要的 npm/pip 依賴
  • 可測試 — 每個 skill 附帶測試場景(eval set),可用 opencode eval 驗證

現狀

  • [x] 專案初始化
  • [x] ref/ 參考專案 submodule(6 個)
  • [x] docs/ 探索紀錄(6 份 notes + patterns.md + design-decisions.md)
  • [x] skill: adr(架構決策記錄,Michael Nygard 輕量格式)
  • [x] skill: dev-flow(開發流程,含 architecture → contract → code → verify)
  • [x] agents: spec-writer, executor, verifier, fullstack-dev, code-reviewer, test-engineer, team-lead, architect
  • [x] skill: pr-review(PR 審查,含 5 維度分析 + 安全檢查表)
  • [x] skill: test-gen(測試生成,含框架偵測 + 多語言測試模式)
  • [x] skill: orchestrate(多 agent 編排)
  • [x] skill: docs-gen(文件生成,含多語言註解風格 + ADR/CHANGELOG 範本)
  • [x] agent: tech-writer
  • [x] opencode.json 整合設定(含 9 個 agent + 7 個 command)
  • [x] CONTRIBUTING.md / LICENSE / plugins / templates
  • [ ] 自我驗證:用本工具跑自己的開發流程

授權

MIT