计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
lovpen-cli【效率与协作】调用已验证的 lovpen-cli,把 Markdown 渲染成与 Lovpen 微信公众号复制链一致的内联 HTML,或显式生成独立 HTML,并返回资源解析、文件大小和 SHA-256 证据。Use when users say “/lovpen-cli”“排版这篇 Markdown” or “render this Markdown with Lovpen”.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: lovpen-cli description: > 调用已验证的 lovpen-cli,把 Markdown 渲染成与 Lovpen 微信公众号复制链一致的内联 HTML,或显式生成独立 HTML,并返回资源解析、文件大小和 SHA-256 证据。Use when users say “/lovpen-cli”“排版这篇 Markdown” or “render this Markdown with Lovpen”. license: MIT compatibility: "Python 3.9+, Node.js 20+, Chrome/Chromium 109+, and lovpen-cli 0.2.0 or a ready Lovpen agent-harness checkout." allowed-tools:
把用户的 Markdown 交给 Lovpen 已验收的真实渲染链。默认生成与
LovpenReact → 微信公众号 → extractWechatClipboardHTML 相同契约的内联
HTML;只有用户明确要求独立网页时才输出带 <style> 的完整文档。
Public identifier: lovpen-cli intentionally matches the Lovpen product and
installed command. Do not rewrite it as lov-lovpen-cli; that would break the
existing $lovpen-cli trigger and installation paths.
lov-cli-creator 或目标项目开发流程。lov-skill-publisher。Every invocation reads the shared user-profile/v1 contract declared in
skill.yaml. Resolve the CLI path, Lovpen project root, output directory,
default template kit, theme, and highlight in this order: current request,
project context, skills.lovpen-cli.records, shared preferences, workspace
Profile, then safe defaults.
Persist only a directly stated durable preference. For example, when the user explicitly says to always use one theme:
python3 "$SKILL_DIR/scripts/profile_store.py" record \
--skill-id lovpen-cli \
--path records.default_theme \
--value '"wabi-sabi"' \
--confirm
Report the saved Profile path. Never persist inferred project paths, document
contents, credentials, or tokens. Read references/user-profile.md for the
complete contract.
Read references/skill-composition.md before invoking an adjacent Skill.
lovpen-cli owns intent routing and verified use of the existing CLI. The CLI
is the product backend, not an embedded Skill module or copied implementation.
Follow these steps in order.
SKILL_DIR from the active Skill context.skill.yaml, references/skill-composition.md, and
references/cli-contract.md completely.$SKILL_DIR/scripts/run_lovpen_cli.py exists.LOVPEN_CLI, an installed lovpen-cli on PATH, or a ready project root
from the request, LOVPEN_PROJECT_ROOT, Profile, or current directory.Manual resolution check:
python3 "$SKILL_DIR/scripts/run_lovpen_cli.py" \
--project-root PROJECT_ROOT \
--resolve-only
doctor.info.capabilities.resources.render.For render, resolve the input Markdown, output HTML, format, template kit or
individual resources, title, and author. The safe format default is wechat.
If the output is omitted, use INPUT_STEM.lovpen.wechat.html; use
INPUT_STEM.lovpen.html only for explicitly requested standalone output.
Without a named kit, safe resource defaults are theme wabi-sabi, highlight
default, and no HTML template.
Use global --json before the subcommand:
python3 "$SKILL_DIR/scripts/run_lovpen_cli.py" \
--project-root PROJECT_ROOT \
-- --json doctor
Continue only when the JSON envelope has ok: true and data.ready: true.
For WeChat format, confirm the browser, clipboard_renderer, and
article_transforms checks are also true. On failure, return the CLI or wrapper
context_id, failed check, and hint.
Run resources before choosing an unverified theme, highlight, or template:
python3 "$SKILL_DIR/scripts/run_lovpen_cli.py" \
--project-root PROJECT_ROOT \
-- --json resources
Match theme names or class_name exactly. Match highlight and HTML template
names exactly. Match a template kit by its exact id or name; for example,
the UI's “Typora Newsprint” selection is --template-kit typora-newsprint, not
--template typora. A kit atomically resolves its theme, highlight, optional
HTML layout, and theme color. Do not combine --template-kit with --theme,
--highlight, or --template.
python3 "$SKILL_DIR/scripts/run_lovpen_cli.py" \
--project-root PROJECT_ROOT \
-- --json render INPUT.md \
--output OUTPUT.html \
--format wechat \
--template-kit typora-newsprint
For an explicitly requested independent document, pass --format standalone
and select --theme, --highlight, and optionally --template. Add --title
or --author only when requested or resolved from the current document
context. Use --dry-run when the user asks to preview the planned write. Never
reconstruct a shell command from untrusted input; pass arguments as an array
through the supplied wrapper.
For a successful render, verify all of the following from the JSON response and filesystem:
ok and data.written are true, unless this was a dry run.data.renderer_source identifies Lovpen's standalone renderer.data.bytes is positive and data.sha256 is a 64-character digest.data.format, renderer_mode, theme, highlight, template kit/template, and
disabled_preview_plugins are reported without hiding limitations.wechat, renderer_mode is wechat-browser-copy, clipboard_source
identifies extractWechatClipboardHTML, the output root is
<section class="lovpen-renderer">, inline styles are present, and no
<style> tag remains.standalone, renderer_mode is standalone-headless-core, the document
contains its embedded <style>, and browser-only disabled plugins remain
explicit.Lead with the output file, then report resource choices and verification. Do not blur the two contracts. WeChat format runs Lovpen's shared preview-plugin and clipboard extractors in Chromium using the same built-in defaults and resolved kit as the UI; standalone format intentionally remains the DOM-free document path. If the UI has additional persisted per-document settings that were not provided to the CLI, report that scope instead of claiming those settings were reproduced.
lovpen-cli 0.2.0 on PATH, or a Lovpen source checkout whose
agent-harness/lov-cli.json status is readyNo credentials are required for local rendering.
python3 "$SKILL_DIR/scripts/validate_skill.py" "$SKILL_DIR"
python3 "$SKILL_DIR/scripts/run_lovpen_cli.py" \
--project-root PROJECT_ROOT \
-- --json doctor