Environment:AMAP ML SkillClaw Object Storage
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Cloud_Storage |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Pluggable object storage backend (local filesystem, AWS S3-compatible, or Alibaba Cloud OSS) for shared skill synchronization and session storage.
Description
SkillClaw supports three storage backends for skill sharing, session recording, and validation job storage:
- local — Filesystem directory tree, zero external dependencies
- s3 — AWS S3 and S3-compatible APIs (MinIO, Cloudflare R2, Backblaze B2) via `boto3`
- oss — Alibaba Cloud OSS via `oss2`
The backend is auto-detected from the endpoint URL (`aliyuncs.com` → OSS) or explicitly configured via `sharing_backend`. The `build_object_store` factory normalizes aliases (`filesystem`→`local`, `minio`/`r2`/`b2`→`s3`) and creates the appropriate store class. All backends implement a common interface: `get_object`, `put_object`, `delete_object`, `iter_objects`.
Usage
Use this environment when sharing skills across machines, running the evolve server, or distributing validation jobs. It is required by SkillHub (bidirectional skill sync), oss_helpers (shared storage operations), build_object_store (storage factory), EvolveServer (session draining), and ValidationStore (job queue storage).
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Any (Python runs on) | Backend-agnostic |
| Network | Required for S3/OSS backends | Local backend needs no network |
| Disk | Varies by usage | Local backend needs disk; cloud backends use minimal local disk |
Dependencies
System Packages
- Python 3.10+ (see Environment:AMAP_ML_SkillClaw_Python_3_10_Plus)
Python Packages
- `boto3` (for S3 backend — `pip install skillclaw[sharing]`)
- `oss2` (for Alibaba OSS backend — `pip install skillclaw[sharing]`)
No Additional Packages for Local Backend
- Local filesystem backend requires only Python stdlib (`os`, `pathlib`)
Credentials
The following environment variables / config fields may be required depending on backend:
- `EVOLVE_STORAGE_BUCKET` / `sharing_bucket`: Bucket name
- `EVOLVE_STORAGE_ENDPOINT` / `sharing_endpoint`: Storage endpoint URL
- `EVOLVE_STORAGE_ACCESS_KEY_ID` / `sharing_access_key_id`: Access key
- `EVOLVE_STORAGE_SECRET_ACCESS_KEY` / `sharing_secret_access_key`: Secret key
- `EVOLVE_STORAGE_REGION` / `sharing_region`: Region (S3 only)
- `EVOLVE_STORAGE_SESSION_TOKEN` / `sharing_session_token`: Temporary session token (S3 only)
Quick Install
# For local storage (no extras needed)
pip install skillclaw
# For S3-compatible storage
pip install skillclaw[sharing]
# For evolve server with cloud storage
pip install skillclaw[sharing,server]
Code Evidence
Backend factory from `skillclaw/object_store.py:225-264`:
def build_object_store(
*,
backend: str | None,
endpoint: str = "",
bucket: str = "",
access_key_id: str = "",
secret_access_key: str = "",
region: str = "",
session_token: str = "",
local_root: str = "",
):
resolved = normalize_backend(backend, endpoint=endpoint, local_root=local_root)
if not resolved and (bucket or endpoint):
resolved = "oss" if endpoint and "aliyuncs.com" in endpoint else "s3"
if resolved == "local":
return LocalObjectStore(local_root)
if resolved == "s3":
return S3ObjectStore(...)
if resolved == "oss":
return OSSObjectStore(...)
Backend alias normalization from `skillclaw/object_store.py:46-65`:
def normalize_backend(backend: str | None, *, endpoint: str = "", local_root: str = "") -> str:
value = str(backend or "").strip().lower().replace("_", "-")
aliases = {
"filesystem": "local",
"fs": "local",
"s3-compatible": "s3",
"minio": "s3",
"r2": "s3",
"b2": "s3",
}
S3 dependency check from `skillclaw/object_store.py:135-141`:
try:
import boto3
except ImportError as exc:
raise ImportError(
"S3-compatible skill sharing requires the 'boto3' package. "
"Install it with: pip install skillclaw[sharing]"
) from exc
OSS dependency check from `skillclaw/object_store.py:195-201`:
try:
import oss2
except ImportError as exc:
raise ImportError(
"Alibaba Cloud OSS skill sharing requires the 'oss2' package. "
"Install it with: pip install skillclaw[sharing]"
) from exc
R2 endpoint validation from `skillclaw/object_store.py:128-134`:
if (parsed_endpoint.hostname or "").endswith(".r2.cloudflarestorage.com"):
if parsed_endpoint.path not in {"", "/"}:
raise ValueError(
"Cloudflare R2 endpoint must be the account endpoint without a bucket/path suffix"
)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ImportError: S3-compatible skill sharing requires the 'boto3' package` | boto3 not installed | `pip install skillclaw[sharing]` |
| `ImportError: Alibaba Cloud OSS skill sharing requires the 'oss2' package` | oss2 not installed | `pip install skillclaw[sharing]` |
| `ValueError: Cloudflare R2 endpoint must be the account endpoint without a bucket/path suffix` | R2 endpoint URL includes bucket path | Use `https://<ACCOUNT_ID>.r2.cloudflarestorage.com` without path suffix |
| `ValueError: S3 storage backend requires a bucket` | Bucket not configured | Set `sharing_bucket` or `EVOLVE_STORAGE_BUCKET` |
| `ValueError: OSS storage backend requires endpoint and bucket` | Missing OSS config | Set both `sharing_endpoint` and `sharing_bucket` |
Compatibility Notes
- Local backend: No external dependencies; uses `os` and `pathlib` only.
- Cloudflare R2: Endpoint must be the account-level URL without bucket suffix; bucket is configured separately.
- MinIO/R2/B2: All map to the S3 backend via alias normalization.
- Nacos: Separate backend (`nacos_skill_hub.py`) for skill registry only; sessions and validation jobs still use local/S3/OSS object storage.
- Endpoint auto-detection: Endpoints containing `aliyuncs.com` are auto-detected as OSS; others with bucket/endpoint default to S3.
Related Pages
- Implementation:AMAP_ML_SkillClaw_SkillHub
- Implementation:AMAP_ML_SkillClaw_build_object_store
- Implementation:AMAP_ML_SkillClaw_oss_helpers
- Implementation:AMAP_ML_SkillClaw_EvolveServer
- Implementation:AMAP_ML_SkillClaw_ValidationStore
- Implementation:AMAP_ML_SkillClaw_Dashboard_Ingest
- Implementation:AMAP_ML_SkillClaw_Dashboard_Server