ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

seafile-skill

Search, download, and upload files in a single Seafile library using a repo token. Use when an agent needs library-scoped filename or path search, exact-path downloads, or uploads into a Seafile library via the repo-token API.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/andrewreid/seafile
Or

Seafile Skill

Overview

Use this skill to interact with one Seafile library through the repo-token API. It is designed for three tasks only:

  • Search for files or folders by filename or path fragment inside the token's library scope
  • Download a file by exact Seafile path
  • Upload a local file into an existing Seafile directory

This skill does not cover full-text content search, cross-library discovery, deletes, renames, moves, or share-link management.

For endpoint details, see references/seafile-api.md. For reusable shell patterns, see references/command-patterns.md.

Prerequisites

Required:

  • curl
  • jq
  • Network access to the Seafile server
  • SEAFILE_BASE_URL
  • SEAFILE_REPO_TOKEN with access to the target library

Optional with defaults:

  • SEAFILE_LIBRARY_ROOT, which defaults to /
  • SEAFILE_OUTPUT_DIR, which is only needed when saving downloaded files locally

Export the required variables before running commands. The optional variables below are shown with their recommended defaults:

export SEAFILE_BASE_URL="https://seafile.example.com"
export SEAFILE_REPO_TOKEN="<repo-token>"
export SEAFILE_LIBRARY_ROOT="/"        # optional
export SEAFILE_OUTPUT_DIR="$PWD/downloads"  # optional, used for downloads
mkdir -p "$SEAFILE_OUTPUT_DIR"

Defaults and expectations:

  • SEAFILE_BASE_URL should be the server origin without a trailing slash
  • SEAFILE_LIBRARY_ROOT defaults to / if you do not override it
  • SEAFILE_OUTPUT_DIR is only needed for downloads
  • All Seafile paths in this skill are absolute library paths such as /, /docs, or /docs/report.pdf

Authentication

The repo-token endpoints use the repo token in the Authorization header. Use this default form unless your deployment documents a different token scheme:

AUTH_HEADER="Authorization: Token $SEAFILE_REPO_TOKEN"
API_BASE="${SEAFILE_BASE_URL%/}/api/v2.1/via-repo-token"

Before doing search, download, or upload, verify the token and library scope:

curl --fail --silent --show-error \
  -H "$AUTH_HEADER" \
  "$API_BASE/repo-info/" | jq

If this fails with 401 or 403, stop and fix the token, permissions, or server URL before continuing.

Search Workflow

Use repo-token directory listing and filter locally with jq. This is filename and path search, not full-text search.

1. List items from a starting path

START_PATH="${SEAFILE_LIBRARY_ROOT:-/}"

curl --fail --silent --show-error \
  -G \
  -H "$AUTH_HEADER" \
  --data-urlencode "path=$START_PATH" \
  --data-urlencode "recursive=1" \
  "$API_BASE/dir/"

Useful query parameters:

  • path: directory to inspect, default /
  • recursive=1: walk the subtree recursively
  • type=f: files only
  • type=d: directories only

2. Filter by filename fragment

NEEDLE="report"
START_PATH="${SEAFILE_LIBRARY_ROOT:-/}"

Metadata

Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-andrewreid-seafile": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.