Install
openclaw skills install @rockbenben/md-webopenclaw skills install @rockbenben/md-webUpload raw .md files to an S3-compatible storage bucket, where a pre-deployed Docsify server automatically renders them as web pages. This avoids sending long text in the conversation.
Uploaded content is publicly accessible. Only use this skill when the user explicitly requests it:
/md-web)Check if ~/.md-web/config.json exists (cross-platform: use the user's home directory). If it does NOT exist or has empty fields, follow the Configuration section below first.
One exception: an older install kept config.json in the skill's own directory rather than in the home directory. If ~/.md-web/config.json is absent but that legacy file is sitting next to upload.js, skip the wizard and run the upload — the script copies both it and .deployed into ~/.md-web/ and prints Config migrated to:. Running the wizard instead would ask the user for credentials that are already on disk.
Either use an existing .md file, or write the content to a temporary file. Choose the temp path based on the current platform (e.g., /tmp/ on Linux/macOS, %TEMP%\ on Windows — note Git Bash does not expand %TEMP%, so use $TEMP there). Use whichever path works in the current shell environment.
Only the .md file itself is uploaded. Relative image references () will be broken on the page — tell the user to use absolute image URLs for documents that need pictures.
node "{SKILL_DIR}/upload.js" <local-file> <remote-key>
{SKILL_DIR}: the base directory of this skill (shown at the top when skill is loaded). Keep it inside quotes — a skills directory under a path with spaces breaks the shell otherwise.<remote-key>: a short ASCII, lowercase, hyphenated name with no spaces (e.g., api-docs.md, project-guide.md) — use this even when the document's own title is Chinese, because the key is what appears in the public URL. A timestamp is prepended automatically to avoid filename collisions, the extension is forced to .md, and the object lands under the md-web/ prefix.expire_days are unchanged. If the deploy printed a lifecycle warning — Warning: lifecycle —, or Warning: could not clear the lifecycle rule — when expire_days is 0 — the token lacks Admin Read & Write: grant the permission, delete ~/.md-web/.deployed and run again. Otherwise the rule is never applied, because the skip happens before the script tries.Example success output:
api-docs- https://example.r2.dev/index.html#/md-web/20260305-091500-api-docs
This only needs to happen once. On subsequent runs, config.json already exists.
{SKILL_DIR}/README.md for detailed setup instructions (Cloudflare R2 / AWS S3 / other S3-compatible services), or {SKILL_DIR}/README.zh.md when the user works in Chinese — the same document in the other language, with identical steps.https:// (e.g., ACCOUNT_ID.r2.cloudflarestorage.com)https://docs.example.com); otherwise use the default R2.dev URL (e.g., https://pub-XXXX.r2.dev). Recommend custom domain for production use — R2.dev URLs have rate limits.auto for Cloudflare R2, or the actual region for AWS S3 (e.g., us-east-1). Default is auto.30. Set to 0 to keep files forever — note that this deletes the bucket's entire lifecycle configuration, including rules you set yourself, which is why a dedicated bucket is recommended. The script sets an S3 lifecycle rule scoped to the md-web/ key prefix, so only this skill's own uploads are affected — Docsify server files and any other objects in the bucket are never touched. Note: this requires the API token to have Admin Read & Write permission (not just Object Read & Write). If the token lacks permission, the script will warn but still upload normally — the user can set the lifecycle rule manually in the Cloudflare Dashboard instead.~/.md-web/config.json (create the ~/.md-web/ directory if it doesn't exist). Use the user's home directory ($HOME on Unix, %USERPROFILE% on Windows):{
"access_key": "...",
"secret_key": "...",
"endpoint": "...",
"bucket": "...",
"region": "auto",
"public_url": "...",
"expire_days": 30
}
.md file — Docsify handles rendering.This skill connects only to the S3 endpoint configured by the user in config.json. No data is sent to the skill author or any third-party service.
| Endpoint | Purpose | Data sent |
|---|---|---|
User's S3 endpoint (config.json → endpoint) | Upload .md files and Docsify server assets | File content, S3 auth headers |
access_key, secret_key) are stored in plaintext in ~/.md-web/config.json (outside the skill directory, safe from upgrades) and only sent to the user's own S3 endpoint for authentication. Protect this file — don't commit it or share it.md-web/ key prefix and the auto-expiry rule is scoped to it, but expire_days: 0 clears the bucket's lifecycle config entirely — a dedicated bucket guarantees the skill never affects unrelated objects or lifecycle rules you set yourself.upload.js uses only Node.js built-in modules and all Docsify assets are bundled locally — no third-party dependencies, no CDN at runtime.By using this skill, markdown content is uploaded to your own S3-compatible storage bucket and made publicly accessible. No data is sent to the skill author or any third-party service. Only install if you trust the storage provider you configure.