设计与多媒体

Markdown Images to R2

试用

Prepare local image references in Markdown for Cloudflare R2 or another S3-compatible object store, upload them only after explicit confirmation, and replace...

它能做什么

Prepare local image references in Markdown for Cloudflare R2 or another S3-compatible object store, upload them only after explicit confirmation, and replace...

技能文档

Markdown Images to R2

Prepare Markdown image references for public distribution without exposing private configuration or changing files by default.

Position In A Publishing Workflow

Use this skill after reviewed local images have been inserted into the target Markdown with relative paths. It is the image transport and URL-rewrite layer; illustration decisions, image generation, captions, tags, and final publish approval belong to upstream or downstream content skills.

When an image manifest exists, compare its target Markdown files, local paths, and R2 states with the generated plan. Return the plan or replacement report to the final publish check.

Workflow

  1. Read the target Markdown and identify local Markdown, HTML, and reference-style image links.
  2. Run the bundled script without --apply first. It writes an image-publish plan and predicts stable public URLs without uploading or rewriting.
  3. Review missing files, skipped remote URLs, object keys, and the planned replacements.
  4. Choose one apply path:
    • Upload to an R2 or S3-compatible endpoint with --apply --confirm-upload.
    • Apply a reviewed URL map with --apply --confirm-write --url-map.
  5. Inspect the backup and replacement report after every applied change.
  6. Verify required public URLs separately, update the manifest to verified, and hand the report to the final publish check.

Commands

# Default: plan only. No upload and no Markdown rewrite.
./run.sh path/to/article.md

# Scan a directory.
./run.sh path/to/posts --recursive

# Upload only after an explicit confirmation gate.
# Set reviewed R2_* values through your secure shell environment first.
./run.sh path/to/article.md --apply --confirm-upload

# Apply a previously reviewed URL map without contacting object storage.
./run.sh path/to/article.md --apply --confirm-write --url-map replacements.json

The script uses R2_REGION=auto and R2_KEY_PREFIX=md-assets when they are not supplied. R2_ACCOUNT_ID is optional when R2_ENDPOINT is set.

Output Contract

  • Plan mode writes .image-publish-plan.json and leaves the Markdown unchanged.
  • Apply mode creates .bak, writes the same plan with result details, and changes only successful local-image references.
  • Object keys use a content hash plus a sanitized filename so repeat runs are stable.
  • Remote URLs, data URLs, and missing files stay unchanged and are recorded in the report.
  • A successful upload or rewrite is not a publish approval; the downstream release gate still decides readiness.

Boundaries

  • Do not use it to publish private material, account credentials, or local paths.
  • Do not run --apply until the user has reviewed the plan and explicitly confirmed the upload or write path.
  • Do not infer a public base URL, bucket, endpoint, or key prefix from a personal environment.
  • Stop when a local image is missing, outside the reviewed project root, or the planned URL is not acceptable for the target platform.
  • Verify the resulting public URLs separately when a publishing workflow requires network acceptance.

作者入口

相关技能

Read a plain Markdown file (e.g. 260321_openclawConfig.md), generate header and section images using the default OpenClaw image model and API key from ~/openclaw/.env, create a new *_img.md copy with embedded PNGs, and move all generated images into an img/ folder next to the original file.

13 次安装

Localize HTTP(S) images in SoMark Markdown into ZIP-like directory packages for one Markdown file or a batch of .md/.markdown files. Use when a user needs to persist SoMark object-storage image URLs, replace remote Markdown image links with local relative paths, produce images plus rewritten Markdown without creating a ZIP archive, or batch-convert a directory of SoMark Markdown documents.

Read an attached Markdown document, analyze and summarize it, then generate a minimalist image from the summary using the default image model. Ask the user for aspect ratio when needed, and support social-banner formats such as 5:2 and 5:4. Use when the user wants a document turned into a simple tutorial-style visual with handwritten whiteboard aesthetics.

2 次安装

Cloudflare R2 (cloudflare.com). Use this skill for ANY Cloudflare R2 request — reading, creating, updating, and deleting data. Whenever a task involves Cloudflare R2, use this skill instead of calling the API directly.

9 次安装

把图片上传到 img402.dev 并拿到公开链接,无需账号或 API key,1 MB 以下永久免费。

105 次安装7 星标

Upload image files to PixelVault and get a public CDN URL back. Use when the user says "screenshot this and host it", "upload this image", "host this mockup"...

1 次安装