# File Sync

Sync files with centralized storage.

- Repository: https://github.com/agentscope-ai/AgentTeams (5913 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add agentscope-ai/AgentTeams --skill file-sync -g -a claude-code -y`
Codex: `npx skills add agentscope-ai/AgentTeams --skill file-sync -g -a codex -y`
Cursor: `npx skills add agentscope-ai/AgentTeams --skill file-sync -g -a cursor -y`
Gemini CLI: `npx skills add agentscope-ai/AgentTeams --skill file-sync -g -a gemini-cli -y`

## Description

Sync files with centralized storage. Use when your coordinator or another Worker notifies you of file updates (config changes, task files, shared data, collaboration artifacts).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# File Sync (Hermes Worker)

## Sync agent config files

When your coordinator notifies you that your config has been updated (e.g., model switch, skill update), trigger an immediate sync:

```bash
hermes-sync
```

This pulls `openclaw.json`, `SOUL.md`, `AGENTS.md`, and skills from MinIO and re-bridges the config into `~/.hermes/` (config.yaml + .env).

**Hot reload caveats:**
- Hermes-agent reloads `SOUL.md` on the next message, no restart needed
- Skill changes in `~/.hermes/skills/` are picked up on the next message as well
- Changes that affect `config.yaml` (model, terminal, matrix behavior) require a process restart, your coordinator handles this when needed

**Automatic background sync:**
- Background sync also runs every 300 seconds (5 minutes) as a fallback
- Most file changes are picked up without manual sync

## Sync task / shared files

The `shared/` directory is automatically mirrored from MinIO at startup and every sync cycle. No manual pull is needed.

Task and project files are at:

| Local path (auto-synced) |
|---|
| `shared/tasks/{task-id}/` |
| `shared/projects/{project-id}/` |

```bash
# Read the spec (already synced locally)
cat shared/tasks/{task-id}/spec.md

# Push your results back to MinIO (push is still manual)
bash ./skills/file-sync/scripts/push-shared.sh tasks/{task-id}/ --exclude "spec.md" --exclude "base/"
```

The `push-shared.sh` script automatically detects your team and pushes to the correct MinIO path.

**When to use:**
- When you finish work: push results back to MinIO using `push-shared.sh`
- When told files have been updated urgently: run `hermes-sync` to trigger an immediate pull

Always confirm to the sender after push completes.

**Example workflow:**
```bash
# Coordinator assigns task: "New task [st-01]. Please file-sync and read shared/tasks/st-01/spec.md"
# Run file-sync to pull latest
hermes-sync

# Read the spec
cat shared/tasks/st-01/spec.md

# ... do the work ...

The rest: https://github.com/agentscope-ai/AgentTeams/blob/HEAD/manager/agent/hermes-worker-agent/skills/file-sync/SKILL.md
