commentmd for Openclaw

commentmd turns a Markdown file into a browser-based review session that returns structured human feedback the agent can act on.

zxl-lxz
v0.1.1
Jul 8, 2026
0
364
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install commentmd

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 commentmd 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 human-in-the-loop Markdown review. It launches a local browser session for design docs, tech specs, READMEs, and PR descriptions so a reviewer can highlight exact text, leave targeted comments, and submit structured JSON back to the agent.

This makes Openclaw Skills especially valuable when an AI agent has already drafted a document but needs precise human guidance before moving forward. Instead of unstructured chat feedback, commentmd produces anchored comments with stable text context, giving the agent a reliable revision signal and a clear audit trail of reviewer intent.

commentmd Use Cases

  • The agent has generated a Markdown artifact and needs targeted human review before iterating.
  • A user explicitly runs /commentmd <md_path> on a specific Markdown file.
  • You want text-anchored feedback for design docs, tech specs, README files, or PR descriptions.
  • You need a review flow that works in a local browser, remote machine, or headless environment.
  • You want the agent to revise the document and summarize how each comment was addressed.
  • You need Openclaw Skills to convert qualitative feedback into structured, machine-readable JSON.

How commentmd Works

  1. Resolve the provided Markdown path to an absolute file path.
  2. Start the local review server with python3 ~/.agents/skills/commentmd/scripts/serve.py "$ABS".
  3. The server binds to 127.0.0.1:3118 or the next available port up to 3128, then opens the browser for highlight-and-comment review.
  4. The reviewer selects text, adds comments, and clicks Finish to submit the review session.
  5. The tool writes a structured comments JSON file and exits.
  6. The agent reads the output file, checks whether the source Markdown changed during review, and then revises the original document.
  7. The agent replies with a summary of each comment and how it was handled, keeping the Openclaw Skills feedback loop closed.

commentmd Setup

No separate package installation is required beyond Python 3 and a browser; the skill is executed directly from the local skills directory.

  1. Ensure the skill is available at ~/.agents/skills/commentmd/ and that scripts/serve.py is executable.
  2. For an interactive local review, run:
python3 ~/.agents/skills/commentmd/scripts/serve.py "/absolute/path/to/document.md"
  1. For remote or headless environments, generate a static review page:
python3 ~/.agents/skills/commentmd/scripts/serve.py "/absolute/path/to/document.md" --static /tmp/review.html
  1. Open the generated HTML on the reviewer’s machine, complete the review, and download the JSON file produced by Finish.
  2. If using the /commentmd <md_path> command, the agent should resolve the path automatically before launching the review server.

commentmd Data Schema & Taxonomy

commentmd uses a two-file review flow: the source Markdown document and a generated comments JSON file.

Artifact Purpose Location / Naming
Source Markdown The document being reviewed User-supplied <md_path>
Review output JSON Structured review payload returned to the agent Default: <md_name_without_ext>.comments.json next to the source file
Static review HTML Offline review surface for remote environments User-defined path such as /tmp/review.html

Output JSON taxonomy

Field Type Meaning
schema_version integer Fixed schema version for compatibility
md_file string Absolute path to the reviewed Markdown file
md_sha256 string SHA-256 hash of the Markdown content captured at server start
md_changed_during_review boolean Indicates whether the source file was modified externally during review
created_at string ISO 8601 UTC timestamp for the review submission
comment_count integer Number of comments submitted; 0 means no objections
comments array Ordered list of review comments

Comment object fields

Field Type Meaning
id string Stable comment identifier such as c1
quote string The exact excerpt selected by the reviewer
prefix string 32-character anchor window before the quote
suffix string 32-character anchor window after the quote
comment string Reviewer feedback for that excerpt
created_at string ISO 8601 UTC timestamp for the comment

The prefix and suffix anchors let the agent map feedback back to the correct part of the document even when surrounding content shifts slightly, which is a core reliability feature of Openclaw Skills.

commentmd Advanced Features

  • Local browser launch with automatic HTTP serving on 127.0.0.1 for fast review loops.
  • Static/offline review mode via --static /tmp/review.html for remote or headless workflows.
  • Structured JSON output that the agent can parse deterministically without freeform text handling.
  • Anchor-based comment capture using quote, prefix, and suffix for precise document targeting.
  • Source-change detection through md_changed_during_review and content hashing.
  • Explicit no-change path with comment_count: 0 to signal approval or no objections.
  • Seamless handoff from Markdown generation to human review to iterative revision in Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*