SkillsGrove
SkillsGrove/Design & Bilder/mofa-org/mofa-skills/mofa-poster

mofa-poster

Installation

$npx skills add https://github.com/mofa-org/mofa-skills --skill mofa-poster
$git clone --depth 1 https://github.com/mofa-org/mofa-skills.git /tmp/mofa-skills && mkdir -p ~/.claude/skills && cp -r /tmp/mofa-skills/_unpublished/mofa-poster ~/.claude/skills/mofa-poster
Bitte installiere diesen Agent Skill für mich: https://github.com/mofa-org/mofa-skills/tree/d8e2beaf3db5e3a14db5fb6d6131a468b07d3121/_unpublished/mofa-poster – lies zuerst seine SKILL.md und seine Skripte und installiere ihn erst dann in meinen Skills-Ordner, wenn du bestätigt hast, dass er sicher ist.

Zusammenfassung

Originalbeschreibung · Apache-2.0从论文源码自动生成学术会议海报。支持 Overleaf LaTeX 项目、交互式布局编辑、PDF 导出。Triggers: poster, 海报, 生成海报, make poster
Die folgende SKILL.md ist aus mofa-org/mofa-skills (Commit d8e2bea) unter der Lizenz Apache-2.0 wiedergegeben. Der Text ist unverändert; lediglich die Metadaten im Dateikopf sind weggelassen, Bilder werden als Links angezeigt und sehr lange Dateien werden gekürzt. Copyright owner or entity authorized by. Lizenz: LICENSE. Es wird nur die Anleitungsdatei angezeigt; etwaige Skripte finden Sie im Original-Repository.

MoFA Poster - 学术海报生成器

从论文源码(Overleaf LaTeX)和项目网站自动生成专业学术海报。输出为交互式 HTML 文件,可拖拽调整布局、导出 PDF。

Onboarding / 开始使用

第一步:安装依赖

# 安装 Vercel CLI(用于下载网页图片)
npm install -g vercel

# 安装 Playwright(用于截图和自动化)
pip3 install playwright
playwright install chromium

第二步:准备论文源码

# 创建海报项目目录
mkdir my-poster && cd my-poster

# 从 Overleaf 克隆论文源码
git clone https://git.overleaf.com/YOUR_PROJECT_ID overleaf

# 可选:添加参考海报用于风格匹配
mkdir references
cp ~/some_reference_poster.pdf references/

第三步:生成海报

# 在 Claude Code 中运行
/make-poster

# 或告诉 Claude
"帮我从 overleaf 目录生成一个学术海报,项目网站是 https://..."

使用方法

基础流程

  1. 准备素材

    • 论文源码放入 overleaf/ 目录
    • 参考海报放入 references/ 目录(可选)
  2. 运行生成

    告诉 Claude:"生成学术海报"
    
  3. 交互编辑

    • 拖拽蓝色分隔线调整列宽/行高
    • 点击卡片菱形按钮交换位置
    • A-/A+ 调整字体大小
  4. 导出 PDF

    • 点击 Preview 预览打印效果
    • 浏览器打印 → 另存为 PDF

示例对话

你: "从 overleaf 目录生成一个 CVPR 海报,项目网站是 https://my-project.github.io"

Claude:

好的!我来为你生成 CVPR 学术海报。

计划:
- 读取 overleaf/main.tex 提取内容
- 抓取项目网站的图片和链接
- 分析 reference/ 中的参考海报风格
- 生成 A0 横向海报

开始生成...
✓ 提取论文内容(标题、作者、摘要)
✓ 下载项目图片
✓ 转换 PDF 图表为 PNG
✓ 生成海报 HTML
✓ 优化布局(最小化空白)
✓ 导出 PDF

🎉 海报生成成功!
打开 poster/index.html 进行编辑

功能特性

输入支持

输入类型 来源 必需
论文源码 overleaf/ 目录 ✅
项目网站 URL ✅
参考海报 references/ 目录 可选
作者网站 URL 可选(用于 Logo)

输出文件

poster/
├── index.html              # 交互式海报(主文件)
├── poster-config.json      # 布局配置
├── poster.pdf              # 导出 PDF
├── logos/                  # 机构 Logo
├── figures/                # 图表文件
├── qr.png                  # 项目页二维码
└── qr-posterskill.png      # Posterskill 二维码

交互编辑器功能

  • 拖拽列分隔线 - 调整列宽
  • 拖拽行分隔线 - 调整卡片高度
  • 点击菱形按钮 - 交换卡片位置
  • A-/A+ 按钮 - 全局字体缩放
  • Preview 模式 - 预览打印效果
  • Copy Config - 导出布局配置

架构

┌─────────────────────────────────────────────────────────────┐
│                    MOFA-POSTER 海报生成流程                  │
└─────────────────────────────────────────────────────────────┘

User Input
    ↓
┌─────────────────────────────────────────────────────────────┐
│ 1. 内容提取                                                  │
│    ────────                                                  │
│    • 读取 overleaf/*.tex(主文件 + \input{})                │
│    • 提取:标题、作者、摘要、方法、结果、结论                  │
│    • WebFetch 项目网站抓图和链接                             │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ 2. 资源准备                                                  │
│    ────────                                                  │
│    • PDF 转 PNG(sips -Z 3000)                              │
│    • Playwright 下载网页图片                                 │
│    • 测量图片宽高比(sips -g pixelWidth/Height)             │
│    • 生成二维码(qrserver API)                              │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ 3. 布局优化                                                  │
│    ────────                                                  │
│    • 根据宽高比分配图片到合适列                              │
│    • Playwright 自动测量空白区域                             │
│    • 遍历列宽组合寻找最优布局                                │
│    • 最小化 whitespace                                       │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ 4. 生成海报                                                  │
│    ────────                                                  │
│    • 基于 React CDN 的交互式 HTML                            │
│    • CARD_REGISTRY:定义卡片内容                             │
│    • DEFAULT_LAYOUT:列结构和卡片顺序                        │
│    • 自适应视口缩放(translate + scale)                     │
│    • @media print 优化打印样式                               │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ 5. 输出                                                      │
│    ────                                                      │
│    • poster/index.html(交互编辑器)                         │
│    • poster/poster.pdf(Playwright 导出)                    │
│    • poster/poster-config.json(布局配置)                   │
└─────────────────────────────────────────────────────────────┘

技术细节

关键命令

# PDF 转高分辨率 PNG
sips -s format png input.pdf --out output.png -Z 3000

# 测量图片尺寸
sips -g pixelWidth -g pixelHeight poster/*.png

# 生成二维码
curl -sL -o qr.png "https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=URL"

Playwright 自动化

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto('file://poster/index.html')

    # 测量空白
    waste = page.evaluate('window.posterAPI.getWaste()')

    # 优化列宽
    page.evaluate('window.posterAPI.setColumnWidth("col1", 300)')

    # 导出 PDF
    page.pdf(path='poster.pdf', width='841mm', height='594mm',
             margin={'top':'0','right':'0','bottom':'0','left':'0'},
             print_background=True)

    browser.close()

图片宽高比策略

宽高比 类型 最佳列
> 2:1 宽图(架构图) 最宽列
~1:1 方图(实验结果) 中等列
< 1:1 竖图(示意图) 最窄列

故障排除

常见问题

问题 解决方案
playwright not found pip3 install playwright && playwright install
sips: image not found 确保输入文件存在且为 PDF/图片
图片下载失败 使用 Playwright 而非 curl(处理跳转)
海报空白太多 调整列宽或交换卡片位置
打印时样式丢失 勾选"背景图形"选项

字体太小/太大

  • 使用 A-/A+ 按钮实时调整
  • 或修改 DEFAULT_FONT_SCALE(默认 1.3)

图片模糊

  • 检查 PDF 转换分辨率(-Z 3000)
  • 确保使用 object-fit: contain 而非 max-width

相关 Skills

mofa-vercel-web

组合使用:

mofa-poster: 生成海报
mofa-vercel-web: 部署海报到线上

mofa-firecrawl / mofa-defuddle

组合使用:

mofa-firecrawl: 获取论文网页内容
mofa-poster: 基于内容生成海报

最佳实践

  1. 内容精简 - 海报是视觉展示,用要点而非段落
  2. 图片优先 - 大图表 + 简短说明,让观众 2 分钟看懂
  3. 参考风格 - 放入 references/ 参考海报让 Claude 匹配风格
  4. 迭代优化 - 先用 Claude 生成,再手动微调布局
  5. 测试打印 - Preview 模式下打印为 PDF 验证效果

致谢

本 Skill 基于 ethanweber/posterskill 适配为 MoFA 格式。

Vollständigen Lizenztext ansehen (Apache-2.0)
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.