commentmd for Openclaw

commentmd lets an AI agent open a Markdown review session in the browser, collect structured human comments, and revise the document with precision.

zxl-lxz
v0.1.0
Jul 8, 2026
0
381
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install md-comment

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install md-comment using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is commentmd?

commentmd is an Openclaw Skills workflow for turning Markdown review into a guided, browser-based feedback loop. When an agent has generated a design doc, tech spec, README, or PR description, it can launch a local review page so a human can highlight text, leave targeted comments, and submit structured feedback the agent can parse.

This skill is designed to reduce back-and-forth, preserve comment context with exact text anchors, and keep review artifacts machine-readable. Openclaw Skills users can use commentmd to safely insert human approval into an AI writing workflow without losing traceability or forcing freeform feedback.

commentmd Use Cases

  • Reviewing AI-generated Markdown documents before finalizing them.
  • Collecting precise feedback on design docs, technical specs, READMEs, and PR descriptions.
  • Letting a human annotate exact text spans instead of leaving vague general comments.
  • Running a review session on a local machine with automatic browser launch.
  • Supporting remote or headless workflows where the reviewer downloads a static HTML review page.
  • Feeding structured review output back into the agent so it can revise the source document intelligently.

How commentmd Works

  1. The agent receives a Markdown file path from the user or detects that a generated document needs human review.
  2. It resolves the Markdown path to an absolute file location.
  3. It starts the review server with the provided Python script, which serves the document locally and opens a browser tab.
  4. The reviewer highlights text, adds comments, and clicks the Finish button to submit feedback.
  5. The server writes a structured JSON file next to the source Markdown file, usually named <md_name_without_ext>.comments.json.
  6. The agent reads the JSON output, inspects each comment's quote and text anchors, and checks whether the document changed during review.
  7. The agent revises the original Markdown file and summarizes how each comment was addressed.
  8. In remote or headless environments, the agent serves a static review page instead and ingests the downloaded JSON file after review.

commentmd Setup

  1. Ensure Python 3 is available in the environment.
  2. Make sure the skill files are installed under ~/.agents/skills/commentmd/.
  3. Review a Markdown file by passing its path to the skill command:
/commentmd <md_path>
  1. The agent will resolve the path and run the review server:
python3 ~/.agents/skills/commentmd/scripts/serve.py "$ABS"
  1. For headless or remote environments, generate a static review page instead:
python3 ~/.agents/skills/commentmd/scripts/serve.py "$ABS" --static /tmp/review.html
  1. Open the served page, leave comments, click Finish, then provide the downloaded JSON path if the review was completed remotely.
  2. After the JSON is produced, read it and update the source Markdown accordingly.

commentmd Data Schema & Taxonomy

commentmd produces a structured review artifact that keeps Markdown feedback machine-readable and easy to apply.

Field Type Purpose
schema_version number Version of the review JSON schema.
md_file string Absolute path to the reviewed Markdown file.
md_sha256 string Hash of the reviewed Markdown content for integrity tracking.
md_changed_during_review boolean Indicates whether the source file changed while the review was open.
created_at string ISO-8601 timestamp for when the review was created.
comment_count number Total number of comments submitted.
comments array Ordered list of structured review comments.

Each object in comments contains:

  • id: stable comment identifier such as c1.
  • quote: the exact excerpt selected by the reviewer.
  • prefix: a 32-character anchor window before the quote.
  • suffix: a 32-character anchor window after the quote.
  • comment: the human review note or requested change.
  • created_at: timestamp for the individual comment.

Output behavior:

  • The default output file is written next to the source Markdown file as <md_name_without_ext>.comments.json.
  • A comment_count of 0 means the reviewer had no objections.
  • If md_changed_during_review is true, the agent should warn the user that the source changed externally during the review session.

commentmd Advanced Features

  • Opens a local HTTP server on 127.0.0.1:3118, automatically moving to the next free port up to 3128 if needed.
  • Supports browser-based highlight-and-comment review for precise text anchoring.
  • Generates structured JSON output so the agent can process feedback deterministically.
  • Detects external file changes during review with md_changed_during_review.
  • Supports remote and headless workflows via --static /tmp/review.html.
  • Preserves exact quote context with prefix and suffix anchor windows for reliable comment mapping.
  • Works especially well in Openclaw Skills pipelines where human approval is needed before the agent proceeds.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*