document-gen-unicode-safe
Fungsinya
Skill ini memandu AI membuat dokumen dalam beberapa format ketika teks memiliki karakter khusus atau alat yang biasa gagal. Skill ini cocok untuk orang yang ekspornya rusak karena simbol atau aksen.
Kapan dipakai
- ✓Saat dokumen saya memuat tanda pisah panjang, tanda kutip melengkung, panah, atau huruf beraksen yang merusak PDF.
- ✓Saat alat dokumen yang biasa mengembalikan galat yang tidak jelas.
- ✓Saat saya membutuhkan dokumen yang sama dalam format Word, PDF, dan HTML sekaligus.
Link skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced-c5d426/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Dokumen saya memuat tanda kutip melengkung dan huruf beraksen, dan ekspor PDF terus gagal. Bisakah Anda membuat versi Word, PDF, dan HTML yang bisa berfungsi?”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI memutuskan apakah jalur sederhana atau jalur manual yang cermat yang sesuai, mengganti karakter yang tidak bisa ditampilkan oleh alat PDF, mengonversi setiap format, dan memeriksa file-filenya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Document Generation Fallback Workflow (Unicode-Safe)
When to Use
First, assess whether to delegate to shell_agent or use manual workflow:
✅ Use shell_agent Directly When:
- Document is straightforward (no special Unicode characters, symbols, or non-ASCII text)
- Single format output needed (e.g., just
.docx) - Content is primarily ASCII text with standard punctuation
- No complex formatting requirements (tables, equations, custom templates)
- You want quick iteration and
shell_agenthas succeeded on similar tasks before
⚠️ Use Manual Workflow When:
shell_agentreturns unknown or unclear errors- Document contains special characters, symbols, or non-ASCII text (see Unicode table below)
- Generating multiple formats simultaneously (e.g.,
.docx,.pdf,.html) - PDF generation fails due to LaTeX encoding issues
- You need fine-grained control over each conversion step
- Previous
shell_agentattempts failed on similar content
📋 Decision Checklist
1. Does the document contain: em-dashes (—), curly quotes (" "), arrows (→),
checkmarks (✓), or other special symbols? → Use Manual Workflow
2. Is non-ASCII text present (é, ñ, ü, 中文,العربية)? → Use Manual Workflow with sanitization
3. Did shell_agent already fail on this or similar content? → Use Manual Workflow
4. Need multiple output formats with guaranteed success? → Use Manual Workflow
5. Simple ASCII document, single format, first attempt? → Try shell_agent First
Core Technique
Quick Path (for straightforward documents): Delegate directly to shell_agent with clear instructions:
shell_agent
task: Create a Word document from markdown content. Write the markdown to
/tmp/document.md, then convert to .docx using pandoc, and verify the output exists.
Manual Path (for complex/Unicode-heavy documents): Split the workflow into discrete, observable steps:
- Content creation → Use
write_fileto create source document (Markdown) - Unicode sanitization → Preprocess markdown to replace problematic characters before PDF conversion
- Format conversion → Use
run_shellwithpandocfor each target format - Verification → Check output files exist and are valid
Why This Adaptive Approach?
| Scenario | Recommended Approach | Rationale |
|---|---|---|
| Simple ASCII doc, single format | shell_agent | Faster, less manual overhead |
| Unicode symbols present | Manual workflow | Prevents LaTeX encoding failures |
| Previous shell_agent failure | Manual workflow | Avoids repeat failures |
| Multiple formats needed | Manual workflow | Granular control per format |
| Time-sensitive, low-risk | shell_agent first | Try fast path, fallback if needed |
- Content creation → Use
write_fileto create source document (Markdown) - Unicode sanitization → Preprocess markdown to replace problematic characters before PDF conversion
- Format conversion → Use
run_shellwithpandocfor each target format - Verification → Check output files exist and are valid
⚠️ Unicode & LaTeX Compatibility Warning
Critical: PDF generation via pandoc typically uses LaTeX (pdflatex or xelatex), which has limited Unicode support. Common problematic characters include:
| Character | Issue | Safe Replacement |
|---|---|---|
— (em dash) |
May not render | -- or - |
– (en dash) |
May not render | - |
" " (curly quotes) |
Encoding errors | " " (straight quotes) |
' ' (curly apostrophe) |
Encoding errors | ' (straight apostrophe) |
… (ellipsis) |
May not render | ... |
→ ← ↑ ↓ (arrows) |
LaTeX incompatibility | -> <- ^ v |
✓ ✗ (checkmarks) |
May not render | [x] [ ] |
★ ● (symbols) |
May not render | * - |
© ® ™ |
May require packages | (c) (r) (tm) |
| Non-ASCII letters (é, ñ, ü) | Font-dependent | Use xeLaTeX or replace |
Step-by-Step Workflow
Step 1: Create Source Content with write_file
Write your document content as Markdown to a temporary source file. This gives you full visibility into the content being generated.
write_file
path: /tmp/document_source.md
content: |
# Document Title
## Section 1
Content here...
## Section 2
More content...
Step 2: Sanitize Unicode Characters (Pre-PDF Conversion)
Before PDF conversion, create a sanitized version of your markdown with LaTeX-safe
Pertanyaan umum
Kapan jalur manual sebaiknya dipakai?
Panduan ini menyarankan jalur manual ketika teks memiliki karakter khusus, ketika alat biasa gagal, atau ketika beberapa format dibutuhkan.
Karakter apa saja yang diganti?
Panduan ini mencantumkan item seperti tanda pisah panjang, tanda pisah pendek, dan tanda kutip melengkung, yang diganti dengan karakter yang lebih sederhana.
Apakah ini membutuhkan alat khusus?
Skill ini memakai pandoc untuk mengonversi file, sehingga pandoc harus tersedia di komputer.
Detail
Deskripsi asli dari pembuat
Unicode-safe fallback workflow for multi-format document generation with character sanitization
repo: HKUDS/AgentPilot
Popularitas
- Bintang GitHub
- 7.8k
- Peringkat
- #12861
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- …
Skill lain dari repositori ini
agentpilot
7.8kMembantu agent Anda meningkatkan proyek langkah demi langkah dengan menyiapkan tugas dan menjalankan loop AgentPilot yang mengusulkan, menguji, dan memberi skor pada perubahan.
openspace
7.8kMembantu agent Anda menyiapkan OpenSpace, alat yang menyimpan dan mengambil skill agent, lalu menghubungkannya ke aplikasi AI Anda melalui MCP.
rsi-arena
7.8kMembantu agent Anda menyiapkan dan menjalankan tes benchmark AI standar, seperti AIME dan Terminal-Bench, untuk membandingkan berbagai metode perbaikan.
experiment-guide
7.8kMembantu agent Anda merencanakan eksperimen kecil, membaca hasilnya, dan mencatat temuan saat menyelidiki cara memperbaiki sebuah program.
Skill serupa
feishu-doc
394kMembantu agent Anda membaca, membuat, dan mengedit dokumen cloud Feishu, termasuk teks, gambar, dan tabel, dengan memakai alat dokumen.
feishu-drive
394kMemungkinkan agent Anda menelusuri, mengatur, dan memberi komentar pada file di folder cloud Feishu yang sudah dibagikan kepada bot.
feishu-perm
394kMembantu agent Anda memeriksa dan mengubah siapa yang dapat mengakses file Feishu, dengan memilih izin terkecil yang memenuhi permintaan Anda.