Skip to content

NocodeMrLi/mr-li-writer-skill

mr-li-writer

Verified

面向中文内容创作的编辑判断、研究、策划、写作与平台原生交付工作流。根据标题、素材、参考资料、核心想法或模糊灵感,先识别读者任务、材料条件和创新必要性,再按需完成语境扫描、可写性判断与方向校准,并区分发布平台与内容目标,进行事实检索、观点设计、平台原生正文写作、标题策划和对应交付。适用于公众号文章、知乎回答、小红书原生笔记、官网/网页、个人博客、行业解读、实用指南和基于素材的扩展研究写作。

FileKindSize
SKILL.mdexecutableskill md62.0 KB
agents/openai.yamlexecutablescript12.9 KB
assets/gzh-design/LICENSEexecutablescript34.2 KB
assets/gzh-design/NOTICE.mdmarkdown568 B
assets/gzh-design/assets/preview-template.htmlexecutablescript3.8 KB
assets/gzh-design/references/common-components.mdexecutablescript14.3 KB
assets/gzh-design/references/eval-cases.mdexecutablescript5.7 KB
assets/gzh-design/references/format-normalize.mdexecutablescript4.4 KB
assets/gzh-design/references/theme-generator.mdexecutablescript25.3 KB
assets/gzh-design/references/theme-graphite-minimal.mdexecutablescript34.1 KB
assets/gzh-design/references/theme-index.mdexecutablescript3.1 KB
assets/gzh-design/references/theme-moyu-green.mdexecutablescript46.1 KB
assets/gzh-design/references/theme-moyu-ticket.mdexecutablescript24.7 KB
assets/gzh-design/references/theme-olive-journal.mdexecutablescript56.2 KB
assets/gzh-design/references/theme-red-white.mdexecutablescript29.9 KB
assets/gzh-design/references/theme-zen-whitespace.mdexecutablescript23.5 KB
assets/mr-li-writer-promo-poster.pngbinary179.4 KB
assets/mr-li-writer-promo-silent.mp4binary1.2 MB
assets/readme-banner.svgother5.3 KB
assets/readme-showcase/moyu-green-content.jpgbinary281.1 KB
assets/readme-showcase/moyu-green-cover.jpgbinary183.8 KB
assets/readme-showcase/moyu-green-list.jpgbinary203.4 KB
assets/readme-showcase/moyu-green-long.jpgbinary431.9 KB
assets/readme-showcase/olive-journal-content.jpgbinary177.7 KB
assets/readme-showcase/olive-journal-cover.jpgbinary214.2 KB
assets/readme-showcase/olive-journal-ending.jpgbinary154.1 KB
assets/readme-showcase/olive-journal-long.jpgbinary352.3 KB
assets/readme-showcase/red-white-cover.jpgbinary183.1 KB
assets/readme-showcase/red-white-long.jpgbinary405.3 KB
assets/readme-showcase/red-white-section.jpgbinary227.4 KB
assets/readme-showcase/red-white-table.jpgbinary219.4 KB
references/commercial-source-terms.txtmarkdown389 B
references/delivery-protocol.mdmarkdown11.7 KB
references/editorial-evaluation-protocol.mdmarkdown3.1 KB
references/editorial-routing-protocol.mdmarkdown6.2 KB
references/genre-structure-protocol.mdmarkdown7.5 KB
references/high-impact-writing-protocol.mdmarkdown6.2 KB
references/humanize-rules.mdexecutablescript11.5 KB
references/ideation-protocol.mdmarkdown6.7 KB
references/lint-checks.mdmarkdown3.9 KB
references/opening-design-protocol.mdmarkdown9.2 KB
references/platform-native-protocol.mdmarkdown19.3 KB
references/research-protocol.mdexecutablescript13.9 KB
references/title-rules.mdexecutablescript9.2 KB
references/writing-rules.mdexecutablescript18.4 KB
scripts/build_gzh_html.pyexecutablescript70.3 KB
scripts/build_html.pyexecutablescript31.8 KB
scripts/component_lint.pyexecutablescript8.1 KB
scripts/extract_seed.pyexecutablescript5.8 KB
scripts/gzh_component_inventory.pyexecutablescript1.8 KB
scripts/lint_article.pyexecutablescript19.5 KB
scripts/scan_sensitive.pyscript2.0 KB
scripts/source_governance.pyscript4.9 KB
scripts/validate_delivery_bundle.pyexecutablescript18.3 KB
scripts/validate_gzh_html.pyexecutablescript14.4 KB
scripts/validate_research_scope.pyexecutablescript10.0 KB
scripts/validate_task_intake.pyscript27.3 KB
scripts/wrap_gzh_preview.pyexecutablescript3.7 KB

scripts/wrap_gzh_preview.py

View on GitHub
#!/usr/bin/env python3
"""把已校验的公众号正文片段(纯 <section>)包成带「复制」按钮的浏览器预览页。

用户打开预览页 → 点右上角「复制到公众号」→ 按钮选中并复制里面渲染后的富文本
(等价手动 Ctrl+A/Ctrl+C,样式全保留)→ 到公众号编辑器 Ctrl+V 粘贴即可。

按钮和 JS 只存在于预览外壳里,**不在被复制的 section 内**,所以粘进公众号的
仍是干净合规的正文,不含 <script>/<button>。校验请对原始 section 文件跑
validate_gzh_html.py(本预览页含 script/style,不参与校验)。

用法:
    wrap_gzh_preview.py <section.html> [output.html] --task-state <任务状态.json>
    默认输出 <section去扩展名>-preview.html
"""

import argparse
import hashlib
import html
import os
import re
import subprocess
import sys


def require_task_state(task_state):
    if not task_state:
        print("[错误] 生成公众号复制预览前必须传入 --task-state,并通过 scripts/validate_task_intake.py 确认必问项。", file=sys.stderr)
        return 2
    checker = os.path.join(os.path.dirname(os.path.abspath(__file__)), "validate_task_intake.py")
    return subprocess.call([sys.executable, checker, task_state, "--phase", "layout", "--platform", "公众号"])


def parse_args():
    parser = argparse.ArgumentParser(description="把公众号正文片段包成带复制按钮的浏览器预览页")
    parser.add_argument("section", help="已校验的公众号正文片段 HTML")
    parser.add_argument("output", nargs="?", help="输出预览页路径,默认 <section>-preview.html")
    parser.add_argument("--task-state", required=True, help="任务状态 JSON;必须已确认必问项")
    return parser.parse_args()


def main():
    args = parse_args()
    src = args.section
    intake_rc = require_task_state(args.task_state)
    if intake_rc != 0:
        sys.exit(intake_rc)
    if not os.path.isfile(src):
        print(f"✗ 找不到文件: {src}")
        sys.exit(1)

    content = open(src, encoding="utf-8").read().replace("\r\n", "\n").replace("\r", "\n").strip()
    if 'data-mr-li-writer-renderer="component-library-v1"' not in content:
        print("✗ 正文不是完整组件库正式产物;请先使用 build_gzh_html.py 生成并校验", file=sys.stderr)
        sys.exit(1)
    root = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
    candidates = [
        os.path.join(root, "assets", "gzh-design", "assets", "preview-template.html"),
        os.path.join(root, "assets", "preview-template.html"),
    ]
    tpl_path = next((p for p in candidates if os.path.isfile(p)), candidates[0])
    tpl = open(tpl_path, encoding="utf-8").read()

    title = os.path.splitext(os.path.basename(src))[0]
    theme_match = re.search(r'data-mr-li-writer-theme=["\']([^"\']+)', content)
    if not theme_match:
        print("✗ 正文缺少公众号主题标识,不能生成正式复制预览", file=sys.stderr)
        sys.exit(1)
    theme = theme_match.group(1)
    digest = hashlib.sha256(content.encode("utf-8")).hexdigest()
    out_html = (
        tpl.replace("{{TITLE}}", html.escape(title))
        .replace("{{THEME}}", html.escape(theme, quote=True))
        .replace("{{CONTENT_SHA256}}", digest)
        .replace("<!--GZH_CONTENT-->", content)
    )

    out = args.output if args.output else os.path.splitext(src)[0] + "-preview.html"
    open(out, "w", encoding="utf-8").write(out_html)
    print(f"✓ 已生成带「复制」按钮的预览页: {out}")
    print("  用浏览器打开它,点右上角「复制到公众号」,再去公众号编辑器 Ctrl/⌘+V 粘贴。")


if __name__ == "__main__":
    main()
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall