Logo Office Artifacts

Office Artifacts

Tổ chứcPhổ biến
Prismer-AI
office-artifacts

Generate real DOCX, PPTX, XLSX, PDF, CSV files using python-docx / python-pptx / openpyxl / reportlab by writing them into the dispatch artifacts dir, then explicitly deliver each one with `cloud deliver <abs-path>`. Use whenever the user asks for documents, slides, spreadsheets, reports, or PDFs.

Tổng quan

Nhà phát hànhPrismer-AI
Kho mãPrismerCloud
Tên kỹ năngoffice-artifacts
Sao
1.6K
Bản fork
14
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Prismer-AI công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Office Artifacts trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Prismer-AI/PrismerCloud/tree/main/sdk/prismer-cloud/built-in-skills/office-artifacts
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Prismer-AI/PrismerCloud.git /tmp/PrismerCloud
mkdir -p .claude/skills
cp -r /tmp/PrismerCloud/sdk/prismer-cloud/built-in-skills/office-artifacts .claude/skills/office-artifacts
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Office Artifacts trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Office Artifacts ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Office Artifacts với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Office Artifacts

Produce real binary office files (not markdown-as-PDF) by writing each one into the artifacts dir ($PRISMER_ARTIFACTS_DIR / <artifacts_dir> from <execution_context>). Prose-only completions are not valid.

Delivery contract — explicit, two steps (release202/09 P2)

Delivery is explicit. Writing a file into the artifacts dir does NOT deliver it — there is no auto-scan. You must run cloud deliver for every file you want the user to receive.

  1. Write each deliverable (PDF / DOCX / PPTX / XLSX / CSV / image / archive) into the artifacts dir. Drafts / intermediate scratch → $PRISMER_SCRATCH_DIR (never delivered).

  2. Deliver it with the absolute path:

    bash
    cloud deliver "<artifacts_dir>/report.pdf"

    This attaches the file to your current reply (动作 A — it rides the same message as your text summary). Run it once per file. The command prints the assetId on success.

  • $PRISMER_ARTIFACTS_DIR is injected as an env var by spawn-style adapters (claude-code / codex / openclaw). Hermes does not inject the env var — read the absolute artifacts/ path from the dispatch prompt's [Artifacts directive] block and write there. Either way, pass the absolute path to cloud deliver.

  • Hermes also has NO per-dispatch env ids (PRISMER_RUN_ID / PRISMER_TASK_ID / PRISMER_CONVERSATION_ID are all unset), so plain cloud deliver <path> cannot find the dispatch and exits with an error. On hermes you MUST copy <run_id> (or <task_id>) and <conversation_id> from <execution_context> and pass them as flags:

    bash
    # Hermes — ids come from <execution_context>, not env:
    cloud deliver "<artifacts_dir>/report.pdf" --run-id "<run_id>" --conversation-id "<conversation_id>"

    Spawn-adapter agents (claude-code / codex) do not need these flags — their env is already set; plain cloud deliver "<abs-path>" works there.

  • Sending a file as its OWN message (动作 B — separate from your reply, e.g. to drop it into the session standalone): use cloud file send "$PRISMER_CONVERSATION_ID" "<abs-path>". On hermes the conversation id comes from <execution_context><conversation_id> (pass it as the positional), and you must also add --run-id "<run_id>" so the proxy activates. Prefer cloud deliver (动作 A) for the normal "here is the document you asked for" case.

  • Attaching a file to a message you ALREADY sent (动作 A2 — "I already replied, now I produced a file I want on THAT message"): cloud send / cloud file send return a messageId; run cloud attach <messageId> "<abs-path>" to append the file to that existing message (it does NOT start a new one). On hermes also pass --run-id "<run_id>" and --conversation-id "<conversation_id>" (both copied from <execution_context>). Use this only when the reply already exists; for "this reply carries the file" use cloud deliver (动作 A).

  • Do NOT run cloud task complete to deliver a chat reply — the platform closes the turn from your final reply (dispatch-reply path).

  • cloud task attach / cloud task complete are OPTIONAL and ONLY for when you are genuinely working a kanban TASK you were assigned (e.g. moving a board card to review / done). For a normal @-mention chat reply, never touch them — cloud deliver is all you need.

  • Rejections are visible: if cloud deliver prints a non-zero exit / error (bad MIME, renamed extension, file not found), the file was NOT delivered — fix it and re-run. Do not claim a file you failed to deliver.

HARD RULE — never claim a file you didn't actually write

Lie-guard (src/im/ws/handler.ts) as of release201/30 §8 is warn-only telemetry, not a destructive interceptor — the audit banner ("CEO 声明已生成文件但未真正落盘") that used to render in red is removed. The detector still logs a [warn] claim/asset disagreement (warn-only, see release201/30 §8) for ops dashboards when text claims a file but assetIds is empty. That signal helps investigate broken adapter wiring; it does NOT change the visible chat. Original 2026-05-22 audit: 25 of 27 office tasks shipped a claim with zero attached files.

Forbidden unless every product was actually written to $PRISMER_ARTIFACTS_DIR: "已生成 / 已落盘 / 已附件", "Created report.pdf", "Attached the file", "Generated slides.pptx".

Before claiming a file, all must hold:

  1. Generator import (import docx / pptx / openpyxl / reportlab) succeeds.
  2. Script ran with exit 0 (no traceback).
  3. ls -lah <artifacts_dir> (the absolute path from <execution_context>) shows the file, non-zero size.

If (1)-(3) fail, your reply must start with 无法生成文件 (reason) / Cannot produce file (reason).

Runtime baseline (release 201)

Sandbox image bakes python-docx, python-pptx, openpyxl, reportlab, pandas, pillow, numpy, imageio, apt file. If an import fails at task time, fail with module 'X' missing — rebuild sandbox image. Do not pip install on the fly.

Resolving the output directory

Your artifacts dir is delivered as an ABSOLUTE path in your prompt's <execution_context> block:

xml
<execution_context …>
  <artifacts_dir>/home/user/.prismer/workspaces/<ws>/…/tasks/<id>/artifacts</artifacts_dir>
  …
</execution_context>

It is also re-stated in the [Artifacts directive] block. Use that exact absolute path. The $PRISMER_ARTIFACTS_DIR env var is set ONLY by spawn-style adapters (claude-code / codex / openclaw); Hermes does NOT set it (os.environ.get("PRISMER_ARTIFACTS_DIR") returns None). Never write to a relative path, the CWD, or a literal placeholder — copy the <artifacts_dir> value verbatim:

python
import os
from pathlib import Path
# Paste the absolute path from <execution_context><artifacts_dir> here:
ARTIFACTS_DIR = "/home/user/.prismer/workspaces/.../tasks/.../artifacts"  # ← from <artifacts_dir>
out = Path(os.environ.get("PRISMER_ARTIFACTS_DIR") or ARTIFACTS_DIR)
out.mkdir(parents=True, exist_ok=True)

Generator recipes

python
# DOCX
from docx import Document
d = Document(); d.add_heading("Report", 0)
d.add_paragraph("Executive summary…"); d.save(out / "report.docx")

# PPTX
from pptx import Presentation
p = Presentation(); s = p.slides.add_slide(p.slide_layouts[0])
s.shapes.title.text = "Deck"; s.placeholders[1].text = "Key message"
p.save(out / "deck.pptx")

# XLSX
from openpyxl import Workbook
wb = Workbook(); ws = wb.active; ws.title = "Model"
ws.append(["Metric", "Value"]); ws.append(["Revenue", 100000])
ws.freeze_panes = "A2"; wb.save(out / "model.xlsx")

# PDF — reportlab (never rename markdown/html to .pdf)
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
c = canvas.Canvas(str(out / "report.pdf"), pagesize=letter)
c.drawString(72, 720, "Report"); c.save()

Validation + delivery

  1. File non-empty, magic bytes match (DOCX/PPTX/XLSX → PK; PDF → %PDF; CSV → UTF-8 with headers).
  2. Confirm every product landed in the artifacts dir:
bash
ls -lah <artifacts_dir>   # the absolute path from <execution_context><artifacts_dir>
  1. Deliver each file explicitly (this is the step that actually delivers — there is no auto-scan):
bash
cloud deliver "<artifacts_dir>/report.pdf"
cloud deliver "<artifacts_dir>/deck.pptx"

# On hermes (no env ids) append --run-id / --conversation-id from <execution_context>:
cloud deliver "<artifacts_dir>/report.pdf" --run-id "<run_id>" --conversation-id "<conversation_id>"

Each call attaches the file to your reply (动作 A). Confirm exit 0 and the printed assetId. Then write your final reply describing what you produced. Do NOT run cloud task attach / cloud task complete for chat delivery.

Working a real kanban TASK (board card), not a chat reply? Only then may you optionally cloud task complete "$PRISMER_TASK_ID" --result "..." to move the card — and only when $PRISMER_TASK_ID is a real task id, not a chat run.

Failure mode

Missing library + cannot install → fail with module 'X' missing and list the package. No renamed extensions, no prose-only substitute.

Câu hỏi thường gặp

Kỹ năng AI Office Artifacts làm được gì?

Generate real DOCX, PPTX, XLSX, PDF, CSV files using python-docx / python-pptx / openpyxl / reportlab by writing them into the dispatch artifacts dir, then explicitly deliver each one with `cloud deliver <abs-path>`. Use whenever the user asks for documents, slides, spreadsheets, reports, or PDFs.

Vì sao nên dùng Office Artifacts trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Office Artifacts là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Office Artifacts trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Prismer-AI/PrismerCloud/tree/main/sdk/prismer-cloud/built-in-skills/office-artifacts. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Office Artifacts?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Office Artifacts với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Office Artifacts với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Office Artifacts có miễn phí không?

Có. Kỹ năng này được Prismer-AI phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇