# Sync Conversations

> Sync local Codex and Claude Code conversation records into a context-harness data home. Use when the user asks to back up Code Agent conversations, sync Codex sessions, sync Claude Code sessions, run full or incremental conversation backup, or inspect context-harness sync status.

- **Type:** Skill
- **Install:** `agentstack add skill-yinjialu-context-harness-sync-conversations`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [yinjialu](https://agentstack.voostack.com/s/yinjialu)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [yinjialu](https://github.com/yinjialu)
- **Source:** https://github.com/yinjialu/context-harness/tree/main/skills/sync-conversations

## Install

```sh
agentstack add skill-yinjialu-context-harness-sync-conversations
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Sync Conversations

Use this skill to collect local Code Agent conversations into `context-harness`. The skill can bootstrap the CLI runtime even when only the skill was installed.

## Runtime Bootstrap

Before running `context-harness`, execute the bundled bootstrap script from this skill directory:

```bash
runtime_dir="$(bash scripts/bootstrap.sh)"
cd "$runtime_dir"
```

The script clones or updates the runtime repository at `~/.local/share/context-harness` by default, checks out the latest released tag, and runs `uv sync`.

Overrides:

- `CONTEXT_HARNESS_RUNTIME_DIR`: custom runtime checkout path.
- `CONTEXT_HARNESS_REPO_URL`: custom fork URL.
- `CONTEXT_HARNESS_REF`: custom branch, tag, or commit.
- `CONTEXT_HARNESS_BOOTSTRAP_SKIP_UPDATE=1`: skip fetch/pull.

## Sources

V1 supports:

- `codex`
- `claude-code`

Claude Web, Antigravity, ChatGPT, Gemini, and browser exports are outside V1.

## Workflow

1. Run the Runtime Bootstrap steps above. Use the returned path as the `context-harness` repository root.
2. Resolve the context home from `CONTEXT_HARNESS_HOME`, the user's explicit path, or `~/.context-harness`.
3. Change to the runtime repository root.
4. Run the requested sync command from the repository root.
5. Summarize `checked`, `created`, `updated`, `skipped`, and `output_dir`.

## Commands

Before running any command, first run the Runtime Bootstrap steps and change to the returned repository root. Run all `uv run context-harness ...` commands from that root.

Incremental sync:

```bash
uv run context-harness --context-home  sync codex --latest 1
uv run context-harness --context-home  sync claude-code --latest 1
```

Full sync:

```bash
uv run context-harness --context-home  sync codex --all
uv run context-harness --context-home  sync claude-code --all
```

After running, summarize `checked`, `created`, `updated`, `skipped`, and `output_dir`.

## OKF Compliance

Archives are native Open Knowledge Format files: each archive carries an OKF frontmatter block (`type: Conversation`, plus `title`/`description`/`source`/`session`/`messages`/`created`/`tags`/`timestamp`) above the unchanged body. Every sync also rebuilds the OKF `index.md` / `log.md` files under `conversations/` and the data-home root `index.md`.

To upgrade a pre-OKF data home (archives without frontmatter), run the idempotent migration once:

```bash
uv run context-harness --context-home  migrate-okf --dry-run   # preview
uv run context-harness --context-home  migrate-okf             # apply
```

The migration also normalizes `memory/*.md` and `global-claude.md` frontmatter. It preserves unknown producer fields and human-authored bodies, so it is safe to re-run.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [yinjialu](https://github.com/yinjialu)
- **Source:** [yinjialu/context-harness](https://github.com/yinjialu/context-harness)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-yinjialu-context-harness-sync-conversations
- Seller: https://agentstack.voostack.com/s/yinjialu
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
