Skip to content

Commit 1932257

Browse files
committed
docs(readme): add comprehensive Claude Code compatibility documentation
- Add new 'Claude Code Compatibility' section to both README.md and README.ko.md - Document hooks integration (PreToolUse, PostToolUse, UserPromptSubmit, Stop) - Document configuration loaders (Command, Skill, Agent, MCP loaders) - Document data storage (Todo management, Transcript logging) - Simplify 'Other Features' section by moving loaders to new section - Clean up temporary planning files in local-ignore/ 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent 5a793bb commit 1932257

File tree

4 files changed

+128
-202
lines changed

4 files changed

+128
-202
lines changed

README.ko.md

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- [내장 AST-Grep Tools](#내장-ast-grep-tools)
1616
- [Grep](#grep)
1717
- [내장 MCPs](#내장-mcps)
18+
- [Claude Code 호환성](#claude-code-호환성)
1819
- [기타 편의 기능](#기타-편의-기능)
1920
- [설정](#설정)
2021
- [작성자의 노트](#작성자의-노트)
@@ -224,17 +225,72 @@ OpenCode 는 아주 확장가능하고 아주 커스터마이저블합니다.
224225
}
225226
```
226227

228+
### Claude Code 호환성
229+
230+
Oh My OpenCode는 Claude Code 설정과 완벽하게 호환됩니다. Claude Code를 사용하셨다면, 기존 설정을 그대로 사용할 수 있습니다.
231+
232+
#### Hooks 통합
233+
234+
Claude Code의 `settings.json` 훅 시스템을 통해 커스텀 스크립트를 실행합니다. Oh My OpenCode는 다음 위치의 훅을 읽고 실행합니다:
235+
236+
- `~/.claude/settings.json` (사용자)
237+
- `./.claude/settings.json` (프로젝트)
238+
- `./.claude/settings.local.json` (로컬, git-ignored)
239+
240+
지원되는 훅 이벤트:
241+
- **PreToolUse**: 도구 실행 전에 실행. 차단하거나 도구 입력을 수정할 수 있습니다.
242+
- **PostToolUse**: 도구 실행 후에 실행. 경고나 컨텍스트를 추가할 수 있습니다.
243+
- **UserPromptSubmit**: 사용자가 프롬프트를 제출할 때 실행. 차단하거나 메시지를 주입할 수 있습니다.
244+
- **Stop**: 세션이 유휴 상태가 될 때 실행. 후속 프롬프트를 주입할 수 있습니다.
245+
246+
`settings.json` 예시:
247+
```json
248+
{
249+
"hooks": {
250+
"PostToolUse": [
251+
{
252+
"matcher": "Write|Edit",
253+
"hooks": [{ "type": "command", "command": "eslint --fix $FILE" }]
254+
}
255+
]
256+
}
257+
}
258+
```
259+
260+
#### 설정 로더
261+
262+
**Command Loader**: 4개 디렉토리에서 마크다운 기반 슬래시 명령어를 로드합니다:
263+
- `~/.claude/commands/` (사용자)
264+
- `./.claude/commands/` (프로젝트)
265+
- `~/.config/opencode/command/` (opencode 전역)
266+
- `./.opencode/command/` (opencode 프로젝트)
267+
268+
**Skill Loader**: `SKILL.md`가 있는 디렉토리 기반 스킬을 로드합니다:
269+
- `~/.claude/skills/` (사용자)
270+
- `./.claude/skills/` (프로젝트)
271+
272+
**Agent Loader**: 마크다운 파일에서 커스텀 에이전트 정의를 로드합니다:
273+
- `~/.claude/agents/*.md` (사용자)
274+
- `./.claude/agents/*.md` (프로젝트)
275+
276+
**MCP Loader**: `.mcp.json` 파일에서 MCP 서버 설정을 로드합니다:
277+
- `~/.claude/.mcp.json` (사용자)
278+
- `./.mcp.json` (프로젝트)
279+
- `./.claude/.mcp.json` (로컬)
280+
- 환경변수 확장 지원 (`${VAR}` 문법)
281+
282+
#### 데이터 저장소
283+
284+
**Todo 관리**: 세션 todo가 `~/.claude/todos/`에 Claude Code 호환 형식으로 저장됩니다.
285+
286+
**Transcript**: 세션 활동이 `~/.claude/transcripts/`에 JSONL 형식으로 기록되어 재생 및 분석이 가능합니다.
287+
288+
> **`claude-code-*` 네이밍에 대해**: `src/features/claude-code-*/` 아래의 기능들은 Claude Code의 설정 시스템에서 마이그레이션되었습니다. 이 네이밍 규칙은 어떤 기능이 Claude Code에서 유래했는지 명확히 식별합니다.
289+
227290
### 기타 편의 기능
228291

229292
- **Terminal Title**: 세션 상태에 따라 터미널 타이틀을 자동 업데이트합니다 (유휴 ○, 처리중 ◐, 도구 ⚡, 에러 ✖). tmux를 지원합니다.
230-
- **Command Loader**: 다음 디렉토리들에서 마크다운 기반의 커스텀 명령어들을 로드합니다:
231-
- User scope: `~/.claude/commands/`
232-
- Project scope: `./.claude/commands/`
233-
- OpenCode global: `~/.config/opencode/command/`
234-
- OpenCode project: `./.opencode/command/`
235-
- **Skill Loader**: 다음 디렉토리들에서 디렉토리 기반의 스킬들을 실행 가능한 명령어로 로드합니다:
236-
- User scope: `~/.claude/skills/`
237-
- Project scope: `./.claude/skills/`
293+
- **Session State**: 이벤트 훅과 터미널 타이틀 업데이트에 사용되는 중앙집중식 세션 추적 모듈입니다.
238294

239295
## 설정
240296

README.md

Lines changed: 64 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ English | [한국어](README.ko.md)
1515
- [Built-in AST-Grep Tools](#built-in-ast-grep-tools)
1616
- [Grep](#grep)
1717
- [Built-in MCPs](#built-in-mcps)
18+
- [Claude Code Compatibility](#claude-code-compatibility)
1819
- [Other Features](#other-features)
1920
- [Configuration](#configuration)
2021
- [Author's Note](#authors-note)
@@ -221,29 +222,72 @@ Don't need these? Disable them via `oh-my-opencode.json`:
221222
}
222223
```
223224

225+
### Claude Code Compatibility
226+
227+
Oh My OpenCode provides seamless Claude Code configuration compatibility. If you've been using Claude Code, your existing setup works out of the box.
228+
229+
#### Hooks Integration
230+
231+
Execute custom scripts via Claude Code's `settings.json` hook system. Oh My OpenCode reads and executes hooks defined in:
232+
233+
- `~/.claude/settings.json` (user)
234+
- `./.claude/settings.json` (project)
235+
- `./.claude/settings.local.json` (local, git-ignored)
236+
237+
Supported hook events:
238+
- **PreToolUse**: Runs before tool execution. Can block or modify tool input.
239+
- **PostToolUse**: Runs after tool execution. Can add warnings or context.
240+
- **UserPromptSubmit**: Runs when user submits a prompt. Can block or inject messages.
241+
- **Stop**: Runs when session goes idle. Can inject follow-up prompts.
242+
243+
Example `settings.json`:
244+
```json
245+
{
246+
"hooks": {
247+
"PostToolUse": [
248+
{
249+
"matcher": "Write|Edit",
250+
"hooks": [{ "type": "command", "command": "eslint --fix $FILE" }]
251+
}
252+
]
253+
}
254+
}
255+
```
256+
257+
#### Configuration Loaders
258+
259+
**Command Loader**: Loads markdown-based slash commands from 4 directories:
260+
- `~/.claude/commands/` (user)
261+
- `./.claude/commands/` (project)
262+
- `~/.config/opencode/command/` (opencode global)
263+
- `./.opencode/command/` (opencode project)
264+
265+
**Skill Loader**: Loads directory-based skills with `SKILL.md`:
266+
- `~/.claude/skills/` (user)
267+
- `./.claude/skills/` (project)
268+
269+
**Agent Loader**: Loads custom agent definitions from markdown files:
270+
- `~/.claude/agents/*.md` (user)
271+
- `./.claude/agents/*.md` (project)
272+
273+
**MCP Loader**: Loads MCP server configurations from `.mcp.json` files:
274+
- `~/.claude/.mcp.json` (user)
275+
- `./.mcp.json` (project)
276+
- `./.claude/.mcp.json` (local)
277+
- Supports environment variable expansion (`${VAR}` syntax)
278+
279+
#### Data Storage
280+
281+
**Todo Management**: Session todos are stored in Claude Code compatible format at `~/.claude/todos/`.
282+
283+
**Transcript**: Session activity is logged to `~/.claude/transcripts/` in JSONL format, enabling replay and analysis.
284+
285+
> **Note on `claude-code-*` naming**: Features under `src/features/claude-code-*/` are migrated from Claude Code's configuration system. This naming convention clearly identifies which features originated from Claude Code.
286+
224287
### Other Features
225288

226289
- **Terminal Title**: Auto-updates terminal title with session status (idle ○, processing ◐, tool ⚡, error ✖). Supports tmux.
227-
- **Command Loader** (`src/features/claude-code-command-loader/`): Loads markdown-based commands from multiple directories:
228-
- User scope: `~/.claude/commands/`
229-
- Project scope: `./.claude/commands/`
230-
- OpenCode global: `~/.config/opencode/command/`
231-
- OpenCode project: `./.opencode/command/`
232-
- **Skill Loader** (`src/features/claude-code-skill-loader/`): Loads directory-based skills as executable commands:
233-
- User scope: `~/.claude/skills/`
234-
- Project scope: `./.claude/skills/`
235-
- **Agent Loader** (`src/features/claude-code-agent-loader/`): Loads agent definitions from markdown files with YAML frontmatter:
236-
- User scope: `~/.claude/agents/`
237-
- Project scope: `./.claude/agents/`
238-
- Format: `*.md` files with frontmatter (name, description, tools)
239-
- **Session State** (`src/features/claude-code-session-state/`): Centralized session tracking module used by event hooks and terminal title updates.
240-
- **MCP Loader** (`src/features/claude-code-mcp-loader/`): Loads MCP server configurations from `.mcp.json` files:
241-
- User scope: `~/.claude/.mcp.json`
242-
- Project scope: `./.mcp.json`
243-
- Local scope: `./.claude/.mcp.json`
244-
- Supports environment variable expansion (`${VAR}` syntax)
245-
246-
> **Note on `claude-code-*` naming**: Features under `src/features/claude-code-*/` are migrated from Claude Code's configuration system. This naming convention clearly identifies which features originated from Claude Code, such as `claude-code-command-loader`, `claude-code-skill-loader`, `claude-code-agent-loader`, and `claude-code-mcp-loader`.
290+
- **Session State**: Centralized session tracking module used by event hooks and terminal title updates.
247291

248292
## Configuration
249293

local-ignore/comment-checker-ts-plan.md

Lines changed: 0 additions & 162 deletions
This file was deleted.

local-ignore/push-and-release.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)