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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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
- Build a JSON layout spec matching the schema in
references/json-schema.md - Write a Node.js script that passes the JSON to the PaperJSX engine
- Run the script to generate the output file
- 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.
热度
- GitHub 星标
- 17k
- 排名
- #10757
- 许可证
- —
- 更新时间
- 2026/7/25
评论
- …
同一仓库的更多技能
agent-deep-links
17k帮你的智能体制作可点击的链接,直接在 Codex 或 Cursor 等应用中打开某个线程、文件、文件夹或设置。
brand-guidelines
17k帮你的智能体使用 OpenAI 风格的品牌颜色和字体来设计作品,使其与 Codex 的外观和感觉保持一致。
codebase-migrate
17k帮你的智能体规划并执行涉及数百个文件的大型代码迁移,例如框架升级或 API 重命名。
connect-apps
17k让你的智能体在 Gmail、Slack 和 GitHub 等应用中执行真实操作,例如发送邮件或创建问题单。