# Autodl Sync

> Synchronize the current development project to the configured AutoDL GPU server and retrieve remote training results. Use when code should be uploaded to AutoDL or checkpoints, logs, predictions, or other training outputs should be downloaded.

- Skill: `1zqqx/autodl-sync` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add 1zqqx/autodl-sync`
- Raw SKILL.md: https://api.skillmd.com/api/skills/1zqqx/autodl-sync/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: 1zqqx (https://skillmd.com/u/1zqqx)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/1zqqx/autodl-sync

---


# AutoDL Sync

Use the scripts bundled with this skill for project synchronization.

Do not manually construct scp or rsync commands when these scripts can
perform the requested operation.

## Project discovery

The synchronization scripts dynamically determine the project root.

They prefer the Git repository root. If the current directory is not
inside a Git repository, they search upward for `.autodl-sync`.

Do not hard-code local project paths.

## Project configuration

Project-specific synchronization settings are stored in:

    <project-root>/.autodl-sync

The configuration can define:

- remote SSH host
- remote base directory
- remote project name
- explicit remote directory
- Git-aware or explicit upload exclusions
- additional upload exclusions
- selected or full-project result downloads
- pull exclusions, maximum file size, deletion, and overwrite behavior
- rsync behavior

Read synchronization settings through the provided scripts rather than
duplicating configuration logic.

## Upload code

When the user asks to:

- sync code
- upload code
- deploy current source code
- update the AutoDL copy

run:

    scripts/push-code.sh <project-root>

If the project root is already the current working project, the argument
may be omitted.

The upload filter always applies mandatory safety exclusions. In `auto`
mode it uses Git's tracked and non-ignored file list when the repository
root has a `.gitignore`; otherwise it uses configured exclusions. Project
`EXCLUDES_APPEND` entries apply in every mode.

`SYNC_DELETE=true` is supported only when the resolved upload mode is
`excludes`; Git file-list mode cannot safely identify every stale remote
file and must fail instead of implying a complete deletion mirror.

## Download results

When the user asks to:

- pull training results
- download checkpoints
- retrieve logs
- retrieve predictions
- synchronize experiment outputs

run:

    scripts/pull-results.sh <project-root>

`PULL_DIRS` entries are relative to `REMOTE_DIR`. An empty array pulls
nothing. `PULL_ALL=true` explicitly pulls the whole remote project and
must not be combined with non-empty `PULL_DIRS`. Pull exclusions, maximum
file size, local deletion, and overwrite protection are independent of
upload filtering.

## Coding workflow

When project instructions explicitly require synchronization after code
changes:

1. Complete the requested source-code modifications.
2. Run appropriate local validation or tests.
3. If validation succeeds, run `push-code.sh`.
4. Report whether synchronization succeeded.

Do not automatically start remote training unless the user explicitly
requests remote execution.

## SSH authentication

AutoDL authentication uses the dedicated local SSH key configured by
the project's `.autodl-sync`.

The private key must remain on the local machine.

If public-key authentication has not yet been configured for a new
AutoDL instance, run:

    scripts/setup-key.sh <project-root>

This operation may interactively request the AutoDL account password
once in order to install the public key.

After setup succeeds, push and pull operations must use public-key
authentication.

Never print, read, upload, copy, or expose the SSH private key.

## Safety

Never inspect, print, copy, or modify SSH private keys.

SSH connection settings are read from the project's `.autodl-sync` and
passed explicitly to `ssh` and `rsync`. The scripts do not require an entry
in `~/.ssh/config`.

Do not upload credentials or secrets.

Respect the exclusions and synchronization behavior defined by the
project's `.autodl-sync`.

Do not enable upload or pull deletion unless the project configuration
explicitly requests it. After each synchronization, report the script's
file-operation summary to the user.

