Skip to content

Commit 44640b9

Browse files
committed
docs(agents): update AGENTS.md with skill-mcp feature documentation
- Update timestamp to 2026-01-02T00:10:00+09:00 and commit hash b0c39e2 - Add 'Add skill' and 'Skill MCP' sections to WHERE TO LOOK table - Add 'Self-planning for complex tasks' anti-pattern to ANTI-PATTERNS - Update complexity hotspots with current accurate line counts (src/index.ts 723, src/cli/config-manager.ts 669, etc.) - Add SKILL MCP MANAGER and BUILTIN SKILLS sections to src/features/AGENTS.md - Document skill-mcp-manager lifecycle and builtin-skills location - Update src/tools/AGENTS.md to include skill and skill-mcp tool categories - Update testing note to reference 360+ tests passing - Add Skill MCP note to NOTES section describing YAML frontmatter MCP config 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent 794b526 commit 44640b9

File tree

3 files changed

+37
-10
lines changed

3 files changed

+37
-10
lines changed

AGENTS.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PROJECT KNOWLEDGE BASE
22

3-
**Generated:** 2026-01-01T21:15:00+09:00
4-
**Commit:** 490c0b6
3+
**Generated:** 2026-01-02T00:10:00+09:00
4+
**Commit:** b0c39e2
55
**Branch:** dev
66

77
## OVERVIEW
@@ -17,7 +17,7 @@ oh-my-opencode/
1717
│ ├── hooks/ # 22 lifecycle hooks - see src/hooks/AGENTS.md
1818
│ ├── tools/ # LSP, AST-Grep, Grep, Glob, etc. - see src/tools/AGENTS.md
1919
│ ├── mcp/ # MCP servers: context7, websearch_exa, grep_app
20-
│ ├── features/ # Claude Code compatibility - see src/features/AGENTS.md
20+
│ ├── features/ # Claude Code compatibility + core features - see src/features/AGENTS.md
2121
│ ├── config/ # Zod schema, TypeScript types
2222
│ ├── auth/ # Google Antigravity OAuth - see src/auth/AGENTS.md
2323
│ ├── shared/ # Utilities: deep-merge, pattern-matcher, logger, etc. - see src/shared/AGENTS.md
@@ -36,12 +36,14 @@ oh-my-opencode/
3636
| Add hook | `src/hooks/` | Create dir with createXXXHook(), export from index.ts |
3737
| Add tool | `src/tools/` | Dir with index/types/constants/tools.ts, add to builtinTools |
3838
| Add MCP | `src/mcp/` | Create config, add to index.ts and types.ts |
39+
| Add skill | `src/features/builtin-skills/` | Create skill dir with SKILL.md |
3940
| LSP behavior | `src/tools/lsp/` | client.ts (connection), tools.ts (handlers) |
4041
| AST-Grep | `src/tools/ast-grep/` | napi.ts for @ast-grep/napi binding |
4142
| Google OAuth | `src/auth/antigravity/` | OAuth plugin for Google/Gemini models |
4243
| Config schema | `src/config/schema.ts` | Zod schema, run `bun run build:schema` after changes |
4344
| Claude Code compat | `src/features/claude-code-*-loader/` | Command, skill, agent, mcp loaders |
4445
| Background agents | `src/features/background-agent/` | manager.ts for task management |
46+
| Skill MCP | `src/features/skill-mcp-manager/` | MCP servers embedded in skills |
4547
| Interactive terminal | `src/tools/interactive-bash/` | tmux session management |
4648
| CLI installer | `src/cli/install.ts` | Interactive TUI installation |
4749
| Doctor checks | `src/cli/doctor/checks/` | Health checks for environment |
@@ -74,6 +76,7 @@ oh-my-opencode/
7476
- **Broad tool access**: Prefer explicit `include` over unrestricted access
7577
- **Sequential agent calls**: Use `background_task` for parallel execution
7678
- **Heavy PreToolUse logic**: Slows every tool call
79+
- **Self-planning for complex tasks**: Spawn planning agent (Prometheus) instead
7780

7881
## UNIQUE STYLES
7982

@@ -128,19 +131,22 @@ bun test # Run tests
128131

129132
| File | Lines | Description |
130133
|------|-------|-------------|
131-
| `src/index.ts` | 697 | Main plugin orchestration, all hook/tool initialization |
132-
| `src/cli/config-manager.ts` | 670 | JSONC parsing, environment detection, installation |
133-
| `src/auth/antigravity/fetch.ts` | 622 | Token refresh, URL rewriting, endpoint fallbacks |
134-
| `src/tools/lsp/client.ts` | 612 | LSP protocol, stdin/stdout buffering, JSON-RPC |
135-
| `src/hooks/anthropic-context-window-limit-recovery/executor.ts` | 555 | Session compaction, multi-stage recovery pipeline |
136-
| `src/agents/sisyphus.ts` | 505 | Orchestrator prompt, delegation strategies |
134+
| `src/index.ts` | 723 | Main plugin orchestration, all hook/tool initialization |
135+
| `src/cli/config-manager.ts` | 669 | JSONC parsing, environment detection, installation |
136+
| `src/auth/antigravity/fetch.ts` | 621 | Token refresh, URL rewriting, endpoint fallbacks |
137+
| `src/tools/lsp/client.ts` | 611 | LSP protocol, stdin/stdout buffering, JSON-RPC |
138+
| `src/auth/antigravity/response.ts` | 598 | Response transformation, streaming |
139+
| `src/auth/antigravity/thinking.ts` | 571 | Thinking block extraction/transformation |
140+
| `src/hooks/anthropic-context-window-limit-recovery/executor.ts` | 554 | Session compaction, multi-stage recovery pipeline |
141+
| `src/agents/sisyphus.ts` | 504 | Orchestrator prompt, delegation strategies |
137142

138143
## NOTES
139144

140-
- **Testing**: Bun native test (`bun test`), BDD-style `#given/#when/#then`
145+
- **Testing**: Bun native test (`bun test`), BDD-style `#given/#when/#then`, 360+ tests
141146
- **OpenCode**: Requires >= 1.0.150
142147
- **Multi-lang docs**: README.md (EN), README.ko.md (KO), README.ja.md (JA), README.zh-cn.md (ZH-CN)
143148
- **Config**: `~/.config/opencode/oh-my-opencode.json` (user) or `.opencode/oh-my-opencode.json` (project)
144149
- **Trusted deps**: @ast-grep/cli, @ast-grep/napi, @code-yeongyu/comment-checker
145150
- **JSONC support**: Config files support comments (`// comment`, `/* block */`) and trailing commas
146151
- **Claude Code Compat**: Full compatibility layer for settings.json hooks, commands, skills, agents, MCPs
152+
- **Skill MCP**: Skills can embed MCP server configs in YAML frontmatter

src/features/AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ features/
1313
│ ├── manager.test.ts
1414
│ └── types.ts
1515
├── builtin-commands/ # Built-in slash command definitions
16+
├── builtin-skills/ # Built-in skills (playwright, etc.)
17+
│ └── */SKILL.md # Each skill in own directory
1618
├── claude-code-agent-loader/ # Load agents from ~/.claude/agents/*.md
1719
├── claude-code-command-loader/ # Load commands from ~/.claude/commands/*.md
1820
├── claude-code-mcp-loader/ # Load MCPs from .mcp.json
1921
│ └── env-expander.ts # ${VAR} expansion
2022
├── claude-code-plugin-loader/ # Load external plugins from installed_plugins.json
2123
├── claude-code-session-state/ # Session state persistence
2224
├── opencode-skill-loader/ # Load skills from OpenCode and Claude paths
25+
├── skill-mcp-manager/ # MCP servers embedded in skills
26+
│ ├── manager.ts # Lazy-loading MCP client lifecycle
27+
│ └── types.ts
2328
└── hook-message-injector/ # Inject messages into conversation
2429
```
2530

@@ -72,6 +77,19 @@ Disable features in `oh-my-opencode.json`:
7277
- **Timing**: PreToolUse, PostToolUse, UserPromptSubmit, Stop
7378
- **Format**: Returns `{ messages: [{ role: "user", content: "..." }] }`
7479

80+
## SKILL MCP MANAGER
81+
82+
- **Purpose**: Manage MCP servers embedded in skill YAML frontmatter
83+
- **Lifecycle**: Lazy client loading, session-scoped cleanup
84+
- **Config**: `mcp` field in skill's YAML frontmatter defines server config
85+
- **Tool**: `skill_mcp` exposes MCP capabilities (tools, resources, prompts)
86+
87+
## BUILTIN SKILLS
88+
89+
- **Location**: `src/features/builtin-skills/*/SKILL.md`
90+
- **Available**: `playwright` (browser automation)
91+
- **Disable**: `disabled_skills: ["playwright"]` in config
92+
7593
## ANTI-PATTERNS (FEATURES)
7694

7795
- **Blocking on load**: Loaders run at startup, keep them fast

src/tools/AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ tools/
2929
│ ├── storage.ts # File I/O operations
3030
│ ├── utils.ts # Formatting, filtering
3131
│ └── tools.ts # Tool implementations
32+
├── skill/ # Skill loading and execution
33+
├── skill-mcp/ # Skill-embedded MCP invocation
3234
├── slashcommand/ # Slash command execution
3335
└── index.ts # builtinTools export
3436
```
@@ -45,6 +47,7 @@ tools/
4547
| Multimodal | look_at | PDF/image analysis via Gemini |
4648
| Terminal | interactive_bash | Tmux session control |
4749
| Commands | slashcommand | Execute slash commands |
50+
| Skills | skill, skill_mcp | Load skills, invoke skill-embedded MCPs |
4851
| Agents | call_omo_agent | Spawn explore/librarian |
4952

5053
## HOW TO ADD A TOOL

0 commit comments

Comments
 (0)