Skip to content

ZoeImport/dot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dot — AI Agent Configuration Repository

Personal environment setup for OpenCode/OhMyOpenCode, including provider configs, skills, and agent definitions. Designed to be public-ready — all secrets are redacted as xxx.


📖 Human Guide

Structure

dot/
├── README.md
├── opencode/
│   ├── opencode.json            # OpenCode: providers, MCP, agents
│   └── oh-my-openagent.json     # OhMyOpenAgent: agent categories, model routing
└── skills/                      # Agent skill collection
    ├── add-provider-model/
    ├── docx-template/           # DOCX generation via docxtemplater + raw XML
    ├── ... (20+ skills)

Installation (Manual)

⚠️ Repository visibility: This repo is public. If you encounter 404 / access denied errors, check:

  • Did you clone the correct URL? git clone https://github.com/ZoeImport/dot.git
  • If you're trying a private fork, ensure your SSH key or token is configured
  • All files are browsable directly on GitHub without cloning: https://github.com/ZoeImport/dot
# 1. Clone the repo (public, no auth needed)
git clone https://github.com/ZoeImport/dot.git ~/CodeSpace/dot

# 2. OpenCode config
cp -r opencode/* ~/.config/opencode/

# 3. Skills
cp -r skills/ ~/.agents/skills/

# 4. Install OpenCode plugins (required: oh-my-openagent + superpowers):
cd ~/.config/opencode && npm install oh-my-openagent@latest
npm install superpowers@git+https://github.com/obra/superpowers.git

# 5. If plugin auto-install is enabled in opencode.json, skip step 4 —
#    plugins install automatically on first launch (see plugin field in opencode.json)

Required: Configure API Keys

All provider API keys are set to xxx for public safety. You MUST configure them before use:

Provider Config Location Purpose
Tag (ath) opencode.jsonprovider.tag-native.options.apiKey Claude Opus/Sonnet, GPT-5
DeepSeek opencode.jsonprovider.deepseek.options.apiKey DeepSeek V4 Pro/Flash
Unlimited opencode.jsonprovider.unlimited.options.apiKey Free models (Kimi K2.6)
Figma opencode.jsonmcp.figma.environment.FIGMA_API_KEY Figma MCP integration

Edit command:

# Open with your editor and search for "xxx"
vim ~/.config/opencode/opencode.json
# or: code ~/.config/opencode/opencode.json

📦 Interactive Import

When setting up on a new machine, you can choose which skills and plugins to import — no need to install everything if you only need a subset.

Usage

When running setup with an AI agent, the agent will present a multi-select question:

📋 可用的 Skills(共 18 个):
  1.  add-provider-model        - 添加 AI Provider/Model
  2.  agent-browser             - 浏览器自动化
  3.  defect-handler            - Bug 分析修复工作流
  ...(完整列表自动生成)

🔌 可用的 Plugins:
  1.  oh-my-openagent@latest    - Agent 分类/模型路由
  2.  superpowers               - 技能系统/TDD/验证
  3.  opencode-worktree@latest  - 工作区管理

❓ 请选择导入方式:
  A) 全部导入(一键安装所有 skills + plugins)
  C) 自定义选择(从列表中勾选需要的项目)
  X) 取消

Flow

用户触发安装
    │
    ▼
检测本地 .config/opencode/ 和 .agents/skills/ 是否存在
    │
    ├─ 已存在 → 询问"覆盖/合并/跳过"
    │
    ▼
展示 Skills 清单 + Plugins 清单(自动检测仓库内容)
    │
    ▼
提问: [A]全部导入 [C]自定义选择 [X]取消
    │
    ├─ A → cp -r 所有 + npm install 所有 plugins
    │
    ├─ C → 多选 skills → 多选 plugins → 只复制选中的
    │
    └─ X → 退出

Multi-Select Format

When user chooses "自定义选择" (Custom):

🟢 已选: [x] defect-handler, [x] sync-dot, [ ] ...
请选择要导入的 skills(空格多选,回车确认):

Same flow for plugins.

Custom Import Commands (for reference)

After selection, the agent runs:

# Skills — only copy selected ones
for skill in add-provider-model defect-handler sync-dot; do
  cp -r ~/CodeSpace/dot/skills/$skill ~/.agents/skills/
done

# Plugins — only install selected ones
cd ~/.config/opencode
for plugin in oh-my-openagent@latest superpowers@git+https://github.com/obra/superpowers.git; do
  npm install $plugin
done

🤖 Agent Setup Prompt

Copy the block below and paste it to your AI agent for one-click setup. This prompt handles: repo cloning, plugin installation, skill deployment, API key configuration, and verification.

📋 Click to copy — English (recommended for all AI agents)
You are setting up OpenCode using the config repository https://github.com/ZoeImport/dot

REPOSITORY IS PUBLIC. If git clone or any file fetch returns 404/access denied:
  - Check that the URL is correct (public repo, no auth needed)
  - The repo is browsable at https://github.com/ZoeImport/dot — you can read any file directly
  - If you were given a different URL, ask the user to confirm
  - Do NOT assume the repo is private unless the user explicitly says so

## Phase 1 — Clone and Copy Files

1. Clone the repo:
   `git clone https://github.com/ZoeImport/dot.git ~/CodeSpace/dot`
   If clone fails, ask the user: "Is the repo URL correct? Or is this a private fork with a different URL?"

2. Copy config files:
   `cp -r ~/CodeSpace/dot/opencode/* ~/.config/opencode/`

3. Import skills (INTERACTIVE):
   List all available skills from `~/CodeSpace/dot/skills/`
   Present the user with a choice:
   a) Import ALL skills → `cp -r ~/CodeSpace/dot/skills/* ~/.agents/skills/`
   b) Custom select → Show multi-select list, copy only chosen ones
   c) Skip skills → proceed without them (can import later)

   For custom selection, present as:
   "Which skills would you like to import? (Enter numbers separated by spaces, or 'all' for everything)"

   Available skills:
   1) add-provider-model     - Add AI provider/model
   2) agent-browser          - Browser automation
   3) defect-handler         - Bug analysis workflow
   4) qimen-skill            - 奇门遁甲 Divination (Qi Men Dun Jia)
   ... (auto-detect full list from repo)

   After selection: `cp -r ~/CodeSpace/dot/skills/{selected} ~/.agents/skills/`

## Phase 2 — Install Plugins (INTERACTIVE)

Available plugins from opencode.json:
  1) `oh-my-openagent@latest`              — Agent categories, model routing, fallback logic
  2) `superpowers@git+https://github.com/obra/superpowers.git` — Skill system, TDD, verification
  3) `opencode-worktree@latest`            — Worktree management

Ask the user:
  a) Install ALL plugins
  b) Custom select
  c) Skip

For custom: "Which plugins to install? (Enter numbers separated by spaces, or 'all' for everything)"

After selection: `cd ~/.config/opencode && npm install {selected}`

## Phase 3 — Configure API Keys

PROMPT me for the following API keys ONE BY ONE. After I provide each one, replace the placeholder in `~/.config/opencode/opencode.json`. Do NOT proceed to the next key before I answer.

  a) Tag API Key (ath) — REQUIRED. Needed for: Claude Opus 4.7, Sonnet 4.6, GPT-5.x
     → Location: `provider.tag-native.options.apiKey`
  b) DeepSeek API Key — REQUIRED. Needed for: DeepSeek V4 Pro/Flash
     → Location: `provider.deepseek.options.apiKey`
  c) Unlimited API Key (yygu.cn) — OPTIONAL. Free Kimi K2.6 model
     → Location: `provider.unlimited.options.apiKey`
  d) Figma Personal Access Token — OPTIONAL. For Figma MCP design integration
     → Location: `mcp.figma.environment.FIGMA_API_KEY`

If I say "skip" or "not now", leave the value as `"xxx"` — that provider will simply be unavailable without breaking anything.

## Phase 4 — Verify

1. Validate JSON: `node -e "JSON.parse(fs.readFileSync(require('os').homedir()+'/.config/opencode/opencode.json','utf8'))"`
2. Check no remaining real secrets: all apiKey fields should either be "xxx" (placeholder) or a real key the user provided — never accidentally leaked values
3. Confirm plugin registration: `ls ~/.config/opencode/node_modules/ | grep -E 'oh-my-openagent|superpowers|opencode-worktree'`
4. Report which providers are READY (key provided), which are SKIPPED (still xxx), and whether plugins are installed

## Summary Report Template

Send me a summary like:
  ✅ Clone success | Config copied | Skills deployed
  ✅ Plugins: oh-my-openagent, superpowers, opencode-worktree
  🔑 Tag: configured | DeepSeek: configured | Unlimited: skipped | Figma: skipped
  📋 All JSON valid
📋 点击复制 — 中文版 (适合中文用户/Agent)
你正在使用配置仓库 https://github.com/ZoeImport/dot 来设置 OpenCode

本仓库是公开的。如果 git clone 或文件读取返回 404/无权限:
  - 确认 URL 是否正确(公开仓库不需要认证)
  - 可以在 https://github.com/ZoeImport/dot 直接浏览所有文件
  - 如果用户给了其他 URL,请让用户确认
  - 不要假设仓库是私有的,除非用户明确说明

## 第一步 — 克隆和复制文件

1. 克隆仓库:`git clone https://github.com/ZoeImport/dot.git ~/CodeSpace/dot`
2. 复制配置:`cp -r ~/CodeSpace/dot/opencode/* ~/.config/opencode/`
3. 导入技能(交互式):
   列出 `~/CodeSpace/dot/skills/` 下所有可用技能
   让用户选择:
   a) 导入全部技能 → `cp -r ~/CodeSpace/dot/skills/* ~/.agents/skills/`
   b) 自定义选择 → 显示多选列表,只复制选中的
   c) 跳过技能 → 不导入,后续可补

   自定义选择时:
   "请选择要导入的 skills(输入编号,空格分隔,或输入 all 全部导入)"

   可用技能:
   1) add-provider-model     - 添加 AI Provider/Model
   2) agent-browser          - 浏览器自动化
   3) defect-handler         - Bug 分析修复工作流
   4) qimen-skill            - 奇门遁甲排盘
   ...(自动检测仓库完整列表)

   选择后执行:`cp -r ~/CodeSpace/dot/skills/{selected} ~/.agents/skills/`

## 第二步 — 安装插件(交互式)

opencode.json 中可用的插件:
  1) `oh-my-openagent@latest`              — Agent 分类、模型路由、回退逻辑
  2) `superpowers@git+https://github.com/obra/superpowers.git` — 技能系统、TDD、验证
  3) `opencode-worktree@latest`            — 工作区管理

询问用户:
  a) 安装全部插件
  b) 自定义选择
  c) 跳过

自定义时:"请选择要安装的 plugins(输入编号,空格分隔,或输入 all 全部安装)"

选择后执行:`cd ~/.config/opencode && npm install {selected}`

## 第三步 — 配置 API Key

逐个向我询问以下 API Key。每提供一个,立即替换 `~/.config/opencode/opencode.json` 中的占位符。不回答完不上一个问下一个:

  a) Tag API Key (ath) — 必填。用于 Claude Opus 4.7, Sonnet 4.6, GPT-5.x
  b) DeepSeek API Key — 必填。用于 DeepSeek V4 Pro/Flash
  c) Unlimited API Key (yygu.cn) — 可选。免费 Kimi K2.6
  d) Figma Personal Access Token — 可选。Figma MCP 集成

如果我说"跳过",则保留 `"xxx"`,不影响其他功能。

## 第四步 — 验证

1. `node -e "JSON.parse(fs.readFileSync(require('os').homedir()+'/.config/opencode/opencode.json','utf8'))"`
2. 确认所有 apiKey 要么是 "xxx"(占位)要么是用户提供的真实 Key
3. 确认插件已安装:`ls ~/.config/opencode/node_modules/ | grep -E 'oh-my-openagent|superpowers|opencode-worktree'`
4. 向我汇报哪些提供商已就绪,哪些已跳过

Provider Model Summary

Provider Models Best For
Tag (ath) Claude Opus 4.7, Sonnet 4.6, GPT-5.5/5.4 Critical reasoning, vision
DeepSeek DeepSeek V4 Pro, DeepSeek V4 Flash General tasks, coding
Unlimited Kimi K2.6 Free lightweight tasks

Model routing logic (in oh-my-openagent.json): expensive models only for tasks that need them (oracle, ultrabrain), cheaper models for everything else.


Skills Included

Skill Description
add-provider-model Add new AI provider or model to OpenCode config
agent-browser Browser automation CLI for AI agents
defect-handler Full bug analysis → fix workflow
deploy-service Deploy dotpen-api services (GitLab CI)
docx-template Generate DOCX with docxtemplater + raw XML
fix-branch-pr Auto-detect target, create fix branch, PR
git-commit-push-pr Commit → push → MR automation
git-worktree-pull Pull latest code in git worktree
md-to-docx-with-mermaid Convert markdown → docx with mermaid diagrams
network-domain-debug DNS/network troubleshooting
quick-db-read One-shot MySQL read via Go test
review-and-pr Code review + commit + PR in one flow
reviewcode Go code style review
sync-dot Sync local config → this dot repo
technical-solution-doc Generate tech design documents
unit-test-generate Generate unit tests
qimen-skill 奇门遁甲排盘 — 时家/日家 + 超神接气定局 + 历史趋势分析
weekly-report Generate weekly report from GitLab commits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors