MD Web - Markdown to Web Page
Upload 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.
When to use this skill
Uploaded content is publicly accessible. Only use this skill when the user explicitly requests it:
- - User wants to show or preview content as a web page in a browser
- User wants to generate, export, or publish content as a web page
- User wants a shareable link to content
- User wants output delivered as a web page rather than as long text in chat
- User wants to compile or organize content and present it as a web page
- User invokes this skill by name (e.g.,
/md-web)
How to use this skill
Step 1: Check configuration
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.
Step 2: Prepare the markdown file
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, system temp dir on Windows). Use whichever path works in the current shell environment.
Step 3: Upload via upload.js
CODEBLOCK0
- -
{SKILL_DIR}: the base directory of this skill (shown at the top when skill is loaded) - INLINECODE6 : a descriptive lowercase name with hyphens (e.g.,
api-docs.md, project-guide.md). A timestamp is prepended automatically to avoid filename collisions. - On first run, the script auto-detects and deploys Docsify server files. No manual setup needed.
Step 4: Return the result
- - On success: the script prints the URL. Reply with only the filename and clickable link. Do NOT paste the markdown content into the chat.
- On failure (non-zero exit code): report the error to the user, then fall back to sending the markdown content as text directly in the chat.
Example success output:
INLINECODE9 - https://example.r2.dev/index.html#/20260305-091500-api-docs
Configuration
This only needs to happen once. On subsequent runs, config.json already exists.
- 1. Tell the user this skill needs an S3-compatible storage bucket with public access. Point them to
{SKILL_DIR}/README.md for detailed setup instructions (Cloudflare R2 / AWS S3 / other S3-compatible services). - Ask the user to provide these 5 required fields:
-
access_key: API access key ID
-
secret_key: API secret access key
-
endpoint: S3 endpoint hostname, without
https:// (e.g.,
ACCOUNT_ID.r2.cloudflarestorage.com)
-
bucket: bucket name
-
public_url: public access URL. If the user has a custom domain bound to the bucket, use that (e.g.,
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.
- 3. Ask about optional settings:
-
region: S3 region. Use
auto for Cloudflare R2, or the actual region for AWS S3 (e.g.,
us-east-1). Default is
auto.
-
expire_days: how many days before uploaded markdown files are automatically deleted from the bucket. Default is
30. Set to
0 to keep files forever. The script sets an S3 lifecycle rule automatically — only timestamped uploads are affected; Docsify server files are never expired.
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.
- 4. Write the config to
~/.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):
CODEBLOCK1
- 5. Then proceed with the upload.
Important notes
- - Do NOT generate HTML. Just upload the raw
.md file — Docsify handles rendering. - Do NOT send markdown content to the chat unless upload fails.
- INLINECODE26 uses only Node.js built-in modules (zero dependencies).
- All Docsify assets (JS/CSS) are bundled locally — no external CDN dependency at runtime.
External endpoints
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 |
Security & privacy
- - All uploaded content is publicly accessible via the generated URL.
- Credentials (
access_key, secret_key) are stored locally in ~/.md-web/config.json (outside the skill directory, safe from upgrades) and only sent to the user's own S3 endpoint for authentication. - No telemetry, analytics, or data collection by the skill itself.
- INLINECODE32 uses only Node.js built-in modules — no third-party dependencies.
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.
MD Web - Markdown 转网页
将原始 .md 文件上传至兼容 S3 的存储桶,由预部署的 Docsify 服务器自动渲染为网页。避免在对话中发送长文本。
何时使用此技能
上传内容可公开访问。 仅在用户明确要求时使用此技能:
- - 用户希望在浏览器中以网页形式展示或预览内容
- 用户希望生成、导出或发布内容为网页
- 用户希望获得内容的可分享链接
- 用户希望输出以网页形式呈现而非聊天中的长文本
- 用户希望编译或整理内容并以网页形式呈现
- 用户通过名称调用此技能(例如 /md-web)
如何使用此技能
步骤 1:检查配置
检查 ~/.md-web/config.json 是否存在(跨平台:使用用户主目录)。如果不存在或包含空字段,请先按照下方配置部分操作。
步骤 2:准备 Markdown 文件
使用现有的 .md 文件,或将内容写入临时文件。根据当前平台选择临时路径(例如 Linux/macOS 使用 /tmp/,Windows 使用系统临时目录)。使用当前 shell 环境中可用的路径。
步骤 3:通过 upload.js 上传
bash
node {SKILL_DIR}/upload.js <本地文件> <远程键名>
- - {SKILL_DIR}:此技能的基础目录(技能加载时显示在顶部)
- <远程键名>:描述性的小写名称,使用连字符(例如 api-docs.md、project-guide.md)。会自动添加时间戳前缀以避免文件名冲突。
- 首次运行时,脚本会自动检测并部署 Docsify 服务器文件。无需手动设置。
步骤 4:返回结果
- - 成功时:脚本输出 URL。仅回复文件名和可点击链接。不要将 Markdown 内容粘贴到聊天中。
- 失败时(非零退出码):向用户报告错误,然后回退为直接在聊天中以文本形式发送 Markdown 内容。
成功输出示例:
api-docs - https://example.r2.dev/index.html#/20260305-091500-api-docs
配置
仅需执行一次。后续运行时 config.json 已存在。
- 1. 告知用户此技能需要一个可公开访问的兼容 S3 的存储桶。引导用户查看 {SKILL_DIR}/README.md 获取详细设置说明(Cloudflare R2 / AWS S3 / 其他兼容 S3 的服务)。
- 要求用户提供以下 5 个必填字段:
-
access_key:API 访问密钥 ID
-
secret_key:API 秘密访问密钥
-
endpoint:S3 端点主机名,不含 https://(例如 ACCOUNT_ID.r2.cloudflarestorage.com)
-
bucket:存储桶名称
-
public_url:公共访问 URL。如果用户已将自定义域名绑定到存储桶,则使用该域名(例如 https://docs.example.com);否则使用默认的 R2.dev URL(例如 https://pub-XXXX.r2.dev)。
建议生产环境使用自定义域名——R2.dev URL 存在速率限制。
- 3. 询问可选设置:
-
region:S3 区域。Cloudflare R2 使用 auto,AWS S3 使用实际区域(例如 us-east-1)。默认值为 auto。
-
expire_days:上传的 Markdown 文件自动从存储桶中删除的天数。默认值为 30。设置为 0 表示永久保留文件。脚本会自动设置 S3 生命周期规则——仅影响带时间戳的上传文件;Docsify 服务器文件永不过期。
注意:这要求 API 令牌具有
管理员读写权限(不仅仅是对象读写)。如果令牌缺少权限,脚本会发出警告但仍正常上传——用户可以在 Cloudflare 仪表盘中手动设置生命周期规则。
- 4. 将配置写入 ~/.md-web/config.json(如果 ~/.md-web/ 目录不存在则创建)。使用用户主目录(Unix 上为 $HOME,Windows 上为 %USERPROFILE%):
json
{
access_key: ...,
secret_key: ...,
endpoint: ...,
bucket: ...,
region: auto,
public_url: ...,
expire_days: 30
}
- 5. 然后继续上传。
重要说明
- - 不要生成 HTML。只需上传原始 .md 文件——Docsify 负责渲染。
- 不要将 Markdown 内容发送到聊天中,除非上传失败。
- upload.js 仅使用 Node.js 内置模块(零依赖)。
- 所有 Docsify 资源(JS/CSS)均本地打包——运行时无需外部 CDN 依赖。
外部端点
此技能仅连接到用户在 config.json 中配置的 S3 端点。不会向技能作者或任何第三方服务发送数据。
| 端点 | 用途 | 发送的数据 |
|---|
| 用户的 S3 端点(config.json → endpoint) | 上传 .md 文件和 Docsify 服务器资源 | 文件内容、S3 认证头 |
安全与隐私
- - 所有上传的内容通过生成的 URL 可公开访问。
- 凭据(accesskey、secretkey)本地存储在 ~/.md-web/config.json 中(位于技能目录之外,升级时安全),仅发送到用户自己的 S3 端点进行身份验证。
- 技能本身不进行遥测、分析或数据收集。
- upload.js 仅使用 Node.js 内置模块——无第三方依赖。
使用此技能时,Markdown 内容将上传到您自己的兼容 S3 的存储桶并公开访问。不会向技能作者或任何第三方服务发送数据。仅当您信任所配置的存储提供商时才安装。