跳到正文
Skillpedia
PDF、Word 与幻灯片17k · #10757

paperjsx

它能做什么

这个技能帮助 AI 智能体根据 JSON 描述创建新的办公文档,例如幻灯片、报告和电子表格。适合需要根据自己的内容生成全新文件的人。

适用场景

  • ✓当你需要根据描述的幻灯片生成 PowerPoint 演示文稿时。
  • ✓当你希望根据结构化内容生成 Word 文档或 PDF 报告时。
  • ✓当你需要根据提供的数据生成带图表的 Excel 电子表格时。

技能链接

https://github.com/composio-community/awesome-codex-skills/blob/master/paperjsx/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/composio-community/awesome-codex-skills/blob/master/paperjsx/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请根据我接下来粘贴的笔记,创建一份标题为 Q4 Review、包含三张幻灯片的 PowerPoint 演示文稿。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会编写描述文档的 JSON 版式,运行一个小脚本将其转换为文件,然后检查文件是否已创建。该工具只创建新文件,不编辑现有文件。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

PaperJSX Document Generation

Generate professional documents from JSON layout specs. PaperJSX is generation-only — it creates new files, it does not edit existing ones.

Triggers

Use this skill when the user asks to:

  • Create a presentation or generate slides
  • Make a PPTX or PowerPoint file
  • Create a Word document or DOCX
  • Generate an Excel spreadsheet with charts
  • Create a JSON to PPTX, JSON to DOCX, or JSON to XLSX file
  • Generate a PDF invoice, report, or chart document

Install

Install the format-appropriate package:

# Presentations
npm install @paperjsx/json-to-pptx

# Word documents
npm install @paperjsx/json-to-docx

# Spreadsheets
npm install @paperjsx/json-to-xlsx

# PDF documents
npm install @paperjsx/json-to-pdf

How it works

  1. Build a JSON layout spec matching the schema in references/json-schema.md
  2. Write a Node.js script that passes the JSON to the PaperJSX engine
  3. Run the script to generate the output file
  4. Validate the output file exists and is non-zero bytes

Do not write imperative PaperJSX API code. The execution model is always: JSON spec in, document file out.

Example: PPTX generation

import { PaperEngine } from "@paperjsx/json-to-pptx";
import fs from "node:fs";

const spec = {
  type: "Document",
  meta: { title: "Q4 Review" },
  slides: [
    {
      type: "Slide",
      children: [
        { type: "Text", content: "Q4 2025 Business Review", style: { fontSize: 36, bold: true } }
      ]
    }
  ]
};

const buffer = await PaperEngine.render(spec);
fs.writeFileSync("presentation.pptx", buffer);
console.log("Generated presentation.pptx");

Example: DOCX generation

import { renderToDocx } from "@paperjsx/json-to-docx";
import fs from "node:fs";

const result = await renderToDocx({
  type: "DocxDocument",
  pageSize: "a4",
  orientation: "portrait",
  pages: [
    {
      elements: [
        { type: "heading", level: 1, text: "Quarterly Report" },
        { type: "paragraph", text: "Section content here." }
      ]
    }
  ]
});

fs.writeFileSync("report.docx", result.buffer);
console.log("Generated report.docx");

Example: XLSX generation

import { SpreadsheetEngine } from "@paperjsx/json-to-xlsx";
import fs from "node:fs";

const spec = {
  meta: { title: "Revenue Data", creator: "PaperJSX" },
  sheets: [{
    name: "Revenue",
    rows: [
      { cells: [{ value: "Quarter" }, { value: "Revenue" }] },
      { cells: [{ value: "Q1 2026" }, { value: 420000 }] },
      { cells: [{ value: "Q2 2026" }, { value: 510000 }] }
    ]
  }]
};

const buffer = await SpreadsheetEngine.render(spec);
fs.writeFileSync("revenue.xlsx", buffer);
console.log("Generated revenue.xlsx");

Validation

After generating any file, always verify:

import fs from "node:fs";

const stats = fs.statSync("output.pptx");
if (stats.size === 0) {
  throw new Error("Generated file is empty");
}
console.log(`Output file: ${stats.size} bytes`);

If the engine throws an error, surface the full error message to the user.

Schema reference

See references/json-schema.md for the complete JSON layout spec schema for all supported formats.

常见问题

它能编辑现有文件吗?

不能。该技能只用于生成新文件。

它能制作哪些格式?

它可以制作 PowerPoint、Word、Excel 和 PDF 文件。

智能体需要安装软件包吗?

需要。在生成文件之前,它会为所需格式安装相应的软件包。

详情

作者的原始描述

Generate PPTX presentations, DOCX documents, XLSX spreadsheets, and PDF reports from structured JSON input using PaperJSX.

repo: composio-community/awesome-codex-skills

热度

GitHub 星标
17k
排名
#10757
许可证
—
更新时间
2026/7/25

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能