paperjsx – skill Tài liệu & Office cho agent AI
Tạo bản trình chiếu PPTX, tài liệu DOCX, bảng tính XLSX và báo cáo PDF từ đầu vào JSON có cấu trúc bằng PaperJSX.
Cài skill paperjsx bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/paperjsx-23bb8.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /paperjsx – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/paperjsx-23bb8.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $paperjsx – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/paperjsx-23bb8.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /paperjsx – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/paperjsx-23bb8.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /paperjsx – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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-pdfHow 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.
Skill liên quan
- akf-trust-metadata – Định dạng tệp AI-native. EXIF cho AI: gắn mỗi tệp với điểm tin cậy, nguồn gốc dữ liệu và…
- board-prep – Chuẩn bị họp hội đồng quản trị cho kịch bản đối đầu, không phải kịch bản thân thiện…
- book-to-skill – Chuyển sách, thư mục tài liệu và bộ sưu tập nguồn (PDF, EPUB, DOCX, HTML, Markdown, RST…
- deepspot-m – Tạo spatial transcriptomics ảo trên toàn bộ transcriptome từ mô học H&E bằng DeepSpot-M…
- baoyu-slide-deck – Tạo hình ảnh slide chuyên nghiệp từ nội dung. Tạo dàn ý kèm hướng dẫn phong cách, sau đó…
- baoyu-url-to-markdown – Tải bất kỳ URL nào và chuyển thành markdown bằng CLI baoyu-fetch (Chrome CDP với adapter…
- pdf – Dùng khi tác vụ liên quan đến đọc, tạo hoặc rà soát file PDF mà render và bố cục quan…
- dcf-model – Xây dựng bảng tính định giá dòng tiền chiết khấu (DCF) trong Excel.