Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
# skills
# Qoder Skills

Official skill repository for [Qoder CLI](https://docs.qoder.com/).

## Available Skills

| Skill | Description |
|-------|-------------|
| [claude-import](claude-import/) | Import Claude Code sessions, config, agents, skills, hooks, and project memory into Qoder CLI |

## Installation

```bash
# Clone the repo
git clone https://github.com/QoderAI/skills.git

# Install a skill (e.g. claude-import)
cp -r skills/claude-import ~/.qoder/skills/
```

Or symlink for live updates:

```bash
ln -s $(pwd)/claude-import ~/.qoder/skills/
```

## Contributing

Submit a PR with your skill following the standard format:

```
skill-name/
├── SKILL.md # Skill definition with YAML frontmatter
├── README.md # Documentation
└── scripts/ # Supporting scripts
```
57 changes: 57 additions & 0 deletions claude-import/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# claude-import

Import Claude Code sessions, configuration, agents, skills, hooks, and
project memory into **Qoder CLI**.

Sessions become first-class Qoder sessions resumeable via `qodercli --resume <id>`.
Configuration is merged into your existing Qoder setup without overwriting.

## Quick Start

```bash
# Clone or copy into your skills directory
cp -r claude-import ~/.qoder/skills/

# Detect what's available from Claude Code
python scripts/claude_import.py --detect

# Full migration
python scripts/claude_import.py --import-all
```

## Requirements

- Python 3.8+
- Qoder CLI installed and configured
- Optional: Claude Code (`~/.claude/` with sessions, config, or agents)

## Commands

| Command | Description |
|---------|-------------|
| `--detect` | Scan Claude Code and report available imports |
| `--import-all` | Full migration: config + recent sessions |
| `--import-config` | Import settings, agents, hooks, skills, instructions |
| `--import-sessions` | Import recent Claude Code sessions (last 30 days) |
| `--dry-run` | Preview changes without making any |

## Installation

### As a Qoder skill

```bash
cp -r claude-import ~/.qoder/skills/
```

Then activate with `/claude-import` in Qoder CLI.

### Standalone

```bash
python scripts/claude_import.py --detect
python scripts/claude_import.py --import-all
```

## License

See [LICENSE](../LICENSE) at repo root.
111 changes: 111 additions & 0 deletions claude-import/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
name: claude-import
description: >
Import Claude Code sessions into Qoder CLI. Use when the user wants to
bring conversation history from Claude Code into Qoder, migrate sessions,
or run the claude-import script.
argument-hint: "[--detect|--import-all|--import-config|--import-sessions|<session-id>]"
user-invocable: true
version: "1.1.0"
---

# claude-import

Import Claude Code sessions, configuration, agents, skills, hooks, and
project memory into Qoder CLI — following the same approach as Codex CLI's
`/import` command. Sessions become first-class Qoder sessions resumeable
via `qodercli --resume <id>`. Configuration is merged into your existing
Qoder setup without overwriting.

## How It Works

The script scans `~/.claude/` and maps each item to the Qoder equivalent:

| Claude Code item | Qoder destination |
|---|---|
| Session history (JSONL) | `~/.qoder/projects/<project>/*.jsonl` + `state.json` |
| `hooks` in `settings.json` | Merged into `~/.qoder/settings.json` |
| `enabledPlugins` in `settings.json` | Merged into `~/.qoder/settings.json` |
| `~/.claude/agents/*.md` | Copied to `~/.qoder/agents/` |
| `~/.claude/skills/` | Symlinked into `~/.qoder/skills/` |
| `CLAUDE.md` (project root) | Copied to `AGENTS.md` (same dir) |
| `memory/MEMORY.md` (per project) | Copied to Qoder project dir |

## Usage

Always use the script — do not attempt to convert manually.

```
# Step 1: Detect what's available
python scripts/claude_import.py --detect

# Step 2: Full migration (config + recent sessions)
python scripts/claude_import.py --import-all

# Or import config only (settings, agents, skills, hooks, instructions, memories)
python scripts/claude_import.py --import-config

# Or import sessions only (last 30 days)
python scripts/claude_import.py --import-sessions

# Preview changes without making any
python scripts/claude_import.py --import-config --dry-run

# Original: list and import specific sessions
python scripts/claude_import.py --list
python scripts/claude_import.py <session-id|index>
python scripts/claude_import.py <session-id> --fork
```

## Config Import Details

### Settings (hooks + plugins)
- Reads `~/.claude/settings.json`
- Merges the `hooks` section into your Qoder `settings.json` (same JSON format)
- Merges `enabledPlugins` so you keep existing Qoder plugins plus gain Claude's

### Agents
- Copies `.md` agent files from `~/.claude/agents/` to `~/.qoder/agents/`
- Skips files that are identical (content hash check)

### Skills
- Symlinks skill directories from `~/.claude/skills/` into `~/.qoder/skills/`
- Qoder and Claude Code share the same skill format, so no conversion needed

### Project Instructions
- Finds `CLAUDE.md` in project workspaces and copies to `AGENTS.md`
- Skips if `AGENTS.md` already exists (does not overwrite)

### Project Memories
- Copies `memory/MEMORY.md` from Claude projects to matching Qoder project dirs

### Import Tracking
- Session imports are recorded in `~/.qoder/external_agent_session_imports.json`
(same format as Codex CLI's tracking file)
- Config import completion is recorded to avoid re-importing

## Scripts

| Script | Purpose |
|--------|---------|
| `scripts/claude_import.py` | Main import script — detect, config, sessions |

## Session Conversion (Original)

| Claude Code entry | Qoder entry |
|-------------------|-------------|
| `type: "user"` (non-meta) | `type: "user"` with `message.content` |
| `type: "assistant"` | `type: "assistant"` with thinking/text/tool_use blocks |
| `type: "system"` (local_command) | `type: "user"` with `tool_result` content |
| `custom-title` → session title | Used as Qoder session name |
| `mode`, `file-history-snapshot`, etc. | Skipped (metadata only) |

## Output

After import, sessions appear in `qodercli --list-sessions` and can be
resumed or forked like any native Qoder session.

```
Resume with: qodercli --resume <session-id>
Fork with: qodercli --fork-session --resume <session-id>
```
Loading