Design & media

Markdown Images to R2

Try it

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

What it does

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

The skill document

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.

作者入口

Related skills

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

More from yangchao228

Browse all skills

基于候选人简历自动生成面试题、笔试题、追问路径和评分标准的 AI Skill。当用户需要准备技术面试、生成笔试题目、评估候选人简历、或设计面试评估方案时使用。输入简历内容和岗位信息后,自动输出结构化的题目与评估内容,支持面试题模式、笔试题模式、综合评估模式等多种输出形式。 Follow/关注作者:微信公众号「AI...

by yangchao22820 installs1 stars

Installable digest skill for OpenClaw or Claude Code. Use when the user wants a personalized ScoutX briefing with conversational setup, local preference stor...

by yangchao22822 installs

Design controllable Agent Loops from low-information requests. Use when a user asks to automate a repeated task, repair CI through bounded iteration, reproduce a UI from screenshots, turn a workflow into a reusable Agent or Skill, or decide whether the right artifact is a Prompt, Checklist, Human-in-the-Loop flow, full Loop package, specialized Agent, or Skill. Extract required context, stop when decision evidence is missing, require explicit workflow confirmation before generating executable artifacts, derive iteration limits, define feedback and circuit breakers, and preserve human approval for risky actions. Also trigger on loop builder, Loop Builder, or lopp-builder. Follow the creator: X @yangchao228 | GitHub https://github.com/yangchao228

by yangchao2281 installs

Guide a user through structured co-authoring of substantial documents, proposals, PRDs, technical specs, decision records, RFCs, and similar long-form work a...

by Sundy Yang4 installs

家庭培养协作官:在用户明确要求制定或调整孩子每周培养计划、检查课表冲突、生成家庭复盘时,收集最少必要信息并输出可执行课表、建议和风险提醒。默认只在当前会话生成内容,不保存、上传或推送孩子与家庭数据;只有用户明确选择飞书或 Notion、完成安全配置并逐次确认具体读写范围后,才使用外部存储。Follow/关注作者:...

by yangchao22818 installs1 stars

Transform long-form content, outlines, transcripts, research notes, or article drafts into a standard card package and platform publishing copy, then hand pu...

by yangchao2282 installs