Xpersona
M

Markdown Images to R2

CLAWHUB · Unverified

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

62
Rank
84
Safety
1.2k
Downloads

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

Install and run

Setup complexity: low.

clawhub skill install s17cxs692g9xb5kx8rt4snej7183xms3:md-img-r2
  1. Install using `clawhub skill install s17cxs692g9xb5kx8rt4snej7183xms3:md-img-r2` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. 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"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

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

![Cover](./images/cover.png)

<img src="./images/diagram.png" alt="workflow diagram">

![Architecture][arch]

[arch]: ./images/architecture.png "architecture"

![Existing](https://img.example.com/already-public.png)
```

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.

Sponsored

Ads related to Markdown Images to R2 and adjacent AI workflows.