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...
Rank
62
Safety
84
Downloads
1.2k
Updated
Oct 10, 2026
Version
1.0.4
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 10, 2026
- Adoption signal
- 1.2K downloadsadoption · observed Oct 10, 2026
- Latest release
- 1.0.4release · observed Jul 23, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17cxs692g9xb5kx8rt4snej7183xms3:md-img-r2- Install using `clawhub skill install s17cxs692g9xb5kx8rt4snej7183xms3:md-img-r2` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/yangchao228/md-img-r2 before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-yangchao228-md-img-r2/snapshot"
Documentation
CLAWHUB
36,202 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: md-img-r2
description: Prepare local image references in Markdown for Cloudflare R2 or another S3-compatible object store, upload them only after explicit confirmation, and replace references with public URLs. Use when a user wants to publish Markdown images for a blog, Zhihu, Xiaohongshu, WeChat, or other distribution channels; inspect image paths; create a dry-run replacement plan; or safely apply image URL replacements. Follow/关注作者:微信公众号「AI生命克劳德」|X @yangchao228|GitHub https://github.com/yangchao228
version: 1.0.4
metadata:
openclaw:
homepage: https://github.com/yangchao228/my_open_skills/tree/main/skills/publishing/md-img-r2
---
# 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
```bash
# 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 `<article>.image-publish-plan.json` and leaves the Markdown unchanged.
- Apply mode creates `<article>.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 rep_meta.json
{
"ownerId": "kn7f1pktwnvde1msfd8c4vz97h8254w6",
"slug": "md-img-r2",
"version": "1.0.4",
"publishedAt": 1784815315359
}examples/expected-output-notes.md
Expected plan-mode behavior: - Discovers three local images and skips the already-public URL. - Calculates one stable object key for each local file. - Writes `article.md.image-publish-plan.json`. - Does not change `article.md`, upload data, or create a backup. Expected reviewed-map apply behavior: - Requires both `--apply` and `--confirm-write`. - Creates `article.md.bak` before rewriting. - Replaces the three local image references while preserving the Markdown title and HTML attributes. - Keeps the existing public URL unchanged. - Records replacement details and any missing files in the plan report. Safety checks: - An upload attempt requires `--apply --confirm-upload` and all required `R2_*` environment variables. - A missing local image, a path outside the reviewed project root, or an incomplete URL map stops that file from being rewritten. - The report must never include access-key values or secret-key values.
examples/minimal-input.md
Target file: `article.md`
```md
# A reusable content workflow

<img src="./images/diagram.png" alt="workflow diagram">
![Architecture][arch]
[arch]: ./images/architecture.png "architecture"

```
Run the first inspection without external writes:
```bash
./run.sh article.md
```
For a reviewed local replacement test, create `replacements.json`:
```json
{
"./images/cover.png": "https://img.example.com/md-assets/cover.png",
"./images/diagram.png": "https://img.example.com/md-assets/diagram.png",
"./images/architecture.png": "https://img.example.com/md-assets/architecture.png"
}
```
Then apply only after reviewing that map:
```bash
./run.sh article.md --apply --confirm-write --url-map replacements.json
```skill-card.md
## Description: Markdown Images to R2 helps agents inspect local Markdown image references, create dry-run publishing plans, and, after explicit confirmation, upload or rewrite those references for Cloudflare R2 or S3-compatible public URLs. This skill is ready for commercial/non-commercial use. ## Publisher: [yangchao228](https://clawhub.ai/user/yangchao228) ### License/Terms of Use: MIT-0 ## Use Case: Developers, publishing operators, and content creators use this skill to prepare Markdown files with local images for public distribution. It supports plan-first review, confirmed R2 or S3-compatible uploads, and reviewed URL-map rewrites before downstream publishing approval. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Private images, sensitive local paths, or credentials could be exposed if the skill is used on unreviewed content or with overly broad storage credentials. Mitigation: Review the generated plan first, avoid private images, use least-privilege R2 credentials, and confirm that reports do not contain access-key or secret-key values. Risk: Markdown could be rewritten with incorrect or unacceptable public URLs. Mitigation: Use plan mode before applying changes, require explicit upload or write confirmation, inspect the backup and replacement report, and verify resulting public URLs separately when required. Risk: Images outside the intended project root could be uploaded if outside-root access is allowed without review. Mitigation: Keep outside-root access disabled by default and use --allow-outside-root only after checking the referenced paths. ## Reference(s): - [ClawHub Skill Page](https://clawhub.ai/yangchao228/skills/md-img-r2) - [Publisher Profile](https://clawhub.ai/user/yangchao228) - [Project Homepage](https://github.com/yangchao228/my_open_skills/tree/main/skills/publishing/md-img-r2) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, configuration, guidance] **Output Format:** [Markdown guidance with shell commands plus JSON image-publish plan and replacement reports] **Output Parameters:** [1D] **Other Properties Related to Output:** [Plan mode leaves Markdown unchanged; apply mode creates a backup and rewrites only confirmed local-image references.] ## Skill Version(s): 1.0.4 (source: SKILL.md frontmatter and server release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/yangchao228/skills/md-img-r2",
"sourceUrl": "https://clawhub.ai/yangchao228/skills/md-img-r2",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T23:12:46.348Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-yangchao228-md-img-r2/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-yangchao228-md-img-r2/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T23:12:46.348Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.2K downloads",
"href": "https://clawhub.ai/yangchao228/md-img-r2",
"sourceUrl": "https://clawhub.ai/yangchao228/md-img-r2",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T23:12:46.348Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.4",
"href": "https://clawhub.ai/yangchao228/md-img-r2",
"sourceUrl": "https://clawhub.ai/yangchao228/md-img-r2",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-23T14:01:55.359Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-yangchao228-md-img-r2/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-yangchao228-md-img-r2/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.4",
"description": "Refresh public safety boundaries, creator channels, source metadata, examples, and explicit catalog categories and topics.",
"href": "https://clawhub.ai/yangchao228/md-img-r2",
"sourceUrl": "https://clawhub.ai/yangchao228/md-img-r2",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-23T14:01:55.359Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
