openlist

$npx mdskill add uvwt/agentdock/openlist

Upload UTF-8 text files via OpenList HTTP API for AgentDock

  • Automatically uploads UTF-8 text files using OpenList's file upload API.
  • Depends on OpenList v4 HTTP API and AgentDock environment variables.
  • Decides based on user input and configuration settings.
  • Delivers uploaded files to the specified storage location.

SKILL.md

.github/skills/openlistView on GitHub ↗
---
name: openlist
description: OpenList v4 HTTP API integration for AgentDock: authentication, file browsing/search, safe text uploads, file operations, storage/driver inspection, and restricted generic API calls.
version: 0.2.5
---

# OpenList Skill

把 [OpenList](https://github.com/OpenListTeam/OpenList) v4 的 HTTP API 封装为 AgentDock 原生 Skill。

## 能力

- 服务状态与公开配置检查
- 登录、登出、本地会话保存与清理
- 当前用户查询
- 文件/目录列表、详情、目录树与搜索
- 新建目录、上传 UTF-8 文本文件、重命名、移动、复制、删除
- 管理员存储列表、驱动列表
- 受限通用 `/api/*` JSON 请求

## 默认连接

默认连接 `http://127.0.0.1:5244`。可在调用中传 `base_url`,或设置 `OPENLIST_URL`。

登录成功后默认把 token 保存到 `$XDG_STATE_HOME/openlist-skill/session.json`;未设置 `XDG_STATE_HOME` 时使用 `~/.local/state/openlist-skill/session.json`。目录权限为 `0700`、文件权限为 `0600`。也可通过 `OPENLIST_SESSION_FILE` 指定会话文件,在单次调用中传 `token`,或设置 `OPENLIST_TOKEN`。

AgentDock 安装会通过 `OPENLIST_SESSION_FILE` 将私有会话保存在 `~/.agentdock/skill-data/openlist/session.json`,因此升级不会迁移或丢失当前登录态。

## 环境变量

| 变量 | 类型 | 必填 | 说明 |
|---|---|---:|---|
| `OPENLIST_URL` | config | 否 | OpenList 服务地址,默认 `http://127.0.0.1:5244` |
| `OPENLIST_TOKEN` | secret | 否 | 直接提供访问令牌;未配置时尝试读取本地会话 |
| `OPENLIST_SESSION_FILE` | config | 否 | 自定义会话文件路径 |
| `XDG_STATE_HOME` | config | 否 | 未配置会话文件时的可移植状态目录 |

## 上传

`upload` 操作通过 OpenList 官方 `/api/fs/put` 接口上传 UTF-8 文本,默认限制 1 MiB,最高允许 10 MiB,并校验 SHA-256。

## 安全约束

- `base_url` 仅允许 `http`/`https`,禁止 URL 内嵌用户名和密码。
- 通用请求仅允许 `/api/*` 路径和 GET/POST/PUT/PATCH/DELETE 方法。
- 登录结果默认不回显 token;只有显式传 `return_token: true` 才返回。
- 不包含 OpenList 上游源码或二进制,仅提供 API 适配层;OpenList 本身继续遵循其 AGPL-3.0 许可证。

## 辅助脚本执行

Skill 本体是本说明文档。确需调用包内辅助脚本时,在 Skill 包根目录使用相对路径执行;运行宿主负责切换到包根目录并把所需变量注入当前子进程。

```bash
printf '%s' '{"skill_action":"<动作>"}' | python3 run.py
```

输入必须是 JSON 对象。写操作仍按本文档中的确认规则执行。

| 动作 | 用途 |
|---|---|
| `status` | Check OpenList public settings endpoint and report connectivity. |
| `login` | Login to OpenList; saves token locally by default and does not echo it unless return_token=true. |
| `logout` | Logout from OpenList and clear the locally saved session by default. |
| `me` | Return the current authenticated OpenList user. |
| `list` | List a directory through /api/fs/list; guest access is supported when OpenList allows it. |
| `get` | Get file or directory details and raw URL through /api/fs/get. |
| `dirs` | List child directories through /api/fs/dirs. |
| `search` | Search the OpenList index. |
| `mkdir` | Create a directory. |
| `rename` | Rename a file or directory. |
| `move` | Move one or more names between directories. |
| `copy` | Copy one or more names between directories. |
| `remove` | Remove one or more names from a directory. |
| `upload` | Upload a small UTF-8 text file through /api/fs/put. Designed for safe automation and verification. |
| `storage-list` | List configured storages (admin token required). |
| `driver-list` | List OpenList storage driver definitions (admin token required). |
| `api-request` | Call an OpenList JSON API endpoint not covered by a dedicated action. |
| `session-status` | Show whether a local OpenList session token is saved without revealing it. |
| `session-clear` | Delete the locally saved OpenList session token. |

More from uvwt/agentdock

SkillDescription
baidu-netdiskUse this skill when managing Baidu Netdisk files through the bdpan CLI inside the application data scope.
barkSend Bark-compatible notifications with Python standard library while keeping the device key in the private Skill data environment.
cloudsaverUse this skill when calling the local CloudSaver API for status checks, resource search, Douban hot lists, share parsing, or transfer actions.
code-debriefExplain and teach the core implementation produced by vibecoding from real code, focusing on the main call chain, core code, state and data flow, design reasoning, and transferable engineering knowledge. Use when the user asks to explain, review, learn, debrief, or understand recent code changes, a commit, PR, diff, feature, module, or code path.
codex-usageUse this skill when checking the current macOS user Codex CLI account state or Codex usage quota.
desktopmacOS desktop automation as an AgentDock Skill workflow.
douban-marks只读查询豆瓣电影、图书、音乐标记列表和电影条目联想。用于读取用户自己的已看、想看、在看等标记;公开主页可直接读,私密列表需要本机环境或 .env 中的 DOUBAN_COOKIE。禁止用于批量采集、绕登录、写入标记或读取非授权账号。
douyin-hot获取抖音实时热榜并返回标题、热度和跳转链接。
find-skills-skillSearch and discover OpenClaw skills from various sources. Use when: user wants to find available skills, search for specific functionality, or discover new skills to install.
grok-quotaQuery detailed Grok weekly usage, GrokChat/GrokBuild breakdown, plan, monthly credits, and pay-as-you-go state from local xAI OAuth credentials.