# LiteFileShare Skill Install Guide (for AI Agents)

> This page is the **self-install / self-update guide** for the LiteFileShare skill (pickup-code mode; a file-sharing product by Lite Lake / 轻湖). You (the AI agent) can complete installation or update by following the steps below — no human intervention needed.
>
> **Current version: 1.0.0**

## What this is

Once installed, you can upload local files with one command and hand back a 6-digit pickup code, or download files with a code (no auth; files are kept for 48 hours). The skill has two files, both served by this deployment:

| File | URL |
|---|---|
| `SKILL.md` (skill description / trigger rules) | `https://fileshare.litelake.com/skill/SKILL.md` |
| `fileshare.py` (stdlib-only CLI, zero dependencies) | `https://fileshare.litelake.com/skill/fileshare.py` |

This site is the public entry of the current deployment — the URLs above work as-is, and the skill connects back to this entry by default.

**Communication**: the skill and CLI speak English, but you should always converse with the user in the user's own language (e.g. reply in Chinese if the user writes Chinese).

## Install steps

### Step 1: pick a skills directory

Pick the skills directory for your platform (reuse it if it exists, otherwise create it):

| Platform | Skills directory |
|---|---|
| ZCode | `~/.agents/skills/` or repo-level `.zcode/skills/` |
| Claude Code | `~/.claude/skills/` or repo-level `.claude/skills/` |
| Other / generic | `~/.agents/skills/` |

Below, `$SKILLS_DIR/fileshare` is the skill install directory (e.g. `~/.agents/skills/fileshare`).

### Step 2: download the skill files (install or update; idempotent overwrite)

```bash
mkdir -p "$SKILLS_DIR/fileshare" && cd "$SKILLS_DIR/fileshare" \
  && curl -fsSL https://fileshare.litelake.com/skill/SKILL.md -o SKILL.md \
  && curl -fsSL https://fileshare.litelake.com/skill/fileshare.py -o fileshare.py \
  && chmod +x fileshare.py
```

### Step 3: verify

```bash
python3 "$SKILLS_DIR/fileshare/fileshare.py" --version
# expected output: fileshare-skill 1.0.0
python3 "$SKILLS_DIR/fileshare/fileshare.py" --help
```

Once verified, read `SKILL.md` for the trigger rules and command usage (`upload` / `list` / `download`), then follow it when the user asks to share or fetch files.

## Update check

If already installed, compare the version at the top of this page with the installed one:

```bash
python3 "$SKILLS_DIR/fileshare/fileshare.py" --version
```

If the printed version is older than `1.0.0`, re-run step 2 to overwrite (the files are stateless; the device id persisted at `~/.cache/litelake/fileshare/device_id` survives updates).

## Quick start

```bash
# Upload (prints a pickup code, valid for 48 hours)
python3 "$SKILLS_DIR/fileshare/fileshare.py" upload report.pdf

# Download by code
python3 "$SKILLS_DIR/fileshare/fileshare.py" download K7M2XQ -o /tmp/pickup
```

Endpoint-level docs (for writing raw HTTP calls instead of using the skill): [`/docs/api.md`](/docs/api.md) (English) · [`/docs/api.zhs.md`](/docs/api.zhs.md) (Chinese).
