Skill
Tạo và chỉnh sửa Office artifact với ak:document-skills
Route công việc PDF, spreadsheet, Word và PowerPoint qua hướng dẫn format đi kèm với intermediate file cùng visual hoặc formula verification rõ ràng.
Dùng ak:document-skills để đọc, tạo, chỉnh sửa hoặc phân tích artifact PDF,
XLSX, DOCX và PPTX. Skill cha route task vào bốn format subskill đi kèm cùng
script, reference, schema và validation workflow của chúng.
Chọn ak:document-skills cho file artifact
Dùng ak:document-skills khi
- Bạn cần tạo, merge, split, extract, render hoặc điền PDF.
- Bạn cần workbook XLSX hoặc phân tích CSV/TSV với formula, formatting, chart hay giá trị đã recalculation.
- Bạn cần tạo, phân tích, chỉnh sửa, comment hoặc redline DOCX trong khi giữ change history có thể review.
- Bạn cần tạo, kiểm tra, điều chỉnh từ template, chỉnh sửa hoặc render deck PPTX để visual review.
- Một deliverable trải qua nhiều format, như workbook cấp dữ liệu cho slide deck được review và bản PDF export cuối.
Chọn workflow khác khi
- Bạn chỉ cần prose trong Markdown. Dùng
ak:docshoặcak:interview-docsvà tránh Office container. - Bạn cần application code để import hoặc export document. Dùng Skill phát triển phù hợp; workflow này tập trung vào artifact.
- Bạn cần điều khiển live ứng dụng Office desktop hoặc cloud document. Chọn runtime capability cung cấp rõ session đó.
- Bạn không thể kiểm tra kết quả đã render. Đừng tuyên bố layout fidelity chỉ từ XML, extracted text hoặc formula.
Hiểu ranh giới format lồng nhau
ak:document-skills chứa vật lý ak:pdf, ak:xlsx, ak:docx và ak:pptx.
Chúng là implementation guidance lồng nhau, không phải top-level export Engineer
được đăng ký riêng. Hãy gọi Skill cha rồi nêu format cùng outcome; đừng giả định
/ak:pdf, /ak:xlsx, /ak:docx hay /ak:pptx là command được cài riêng.
| Artifact | Workflow đi kèm | Verification cốt lõi |
|---|---|---|
| Extract text và table, tạo file, page operation, rendering cùng form fillable hoặc dựa trên annotation | Page count, extracted content, field validation, bounding box và rendered page | |
| XLSX | Data analysis, tạo hoặc chỉnh workbook, formula, formatting, chart và recalculation | Formula scan, cached result, sample reference, data type và template convention được giữ |
| DOCX | Extract Markdown, tạo document mới, chỉnh OOXML, comment và tracked change | Text hoặc change được extract lại, package hợp lệ, structure được giữ và rendered page |
| PPTX | Extract text, tạo deck mới, tái dùng template, chỉnh raw OOXML và thumbnail | Slide inventory, package validation, text overflow, thumbnail và rendered slide |
Chuẩn bị input, tool và output boundary
Trước khi bắt đầu:
- Hoàn tất Onboarding, rồi xác nhận Engineer Kit được cài cho runtime và scope hiện tại.
- Cung cấp source file, output format cùng path dự kiến, audience, content bắt buộc, template hoặc brand constraint và có được overwrite bản gốc hay không. Nên tạo output file mới.
- Nêu comment, tracked change, formula, external link, macro, metadata, speaker note, animation, accessibility tag hoặc form field nào phải được giữ.
- Cung cấp data và content có thẩm quyền. Xác định input confidential, personal, regulated, licensed hoặc được bảo vệ bằng password trước khi xử lý.
- Chuẩn bị tool bắt buộc hoặc duyệt cài đặt riêng. Tùy route, chúng có thể gồm Python, Node.js, pandas, openpyxl, pypdf, pdfplumber, reportlab, Pandoc, MarkItDown, docx, PptxGenJS, Playwright, Sharp, LibreOffice, Poppler, qpdf, OCR tool và defusedxml.
| Runtime | Cách gọi | Ranh giới khả dụng |
|---|---|---|
| Claude Code | /ak:document-skills ... | Delivery native có thể đọc, ghi project file và chạy converter sẵn có; Office application, font, browser rendering và system package vẫn phụ thuộc environment. |
| Cursor | /ak:document-skills ... | Cách gọi slash đã được người dùng xác minh; converter, filesystem access và visual inspection tương đương chưa được xác lập. |
| Codex | $ak:document-skills ... | Hỗ trợ native Skill discovery; document library đi kèm và local rendering tool vẫn phụ thuộc environment đang hoạt động. |
Skill cha không khai báo positional argument, flag hay output directory mặc định. Hãy cung cấp chính xác source, target, operation, preservation requirement và verification standard được yêu cầu.
Chạy request hiểu rõ format
/ak:document-skills "Create board-report.xlsx from approved-metrics.csv with formulas for totals and growth, preserve source precision, add a Sources sheet, recalculate with LibreOffice, scan every formula result for errors, and save to ./deliverables without changing the CSV."/ak:document-skills "Create board-report.xlsx from approved-metrics.csv with formulas for totals and growth, preserve source precision, add a Sources sheet, recalculate with LibreOffice, scan every formula result for errors, and save to ./deliverables without changing the CSV."$ak:document-skills "Create board-report.xlsx from approved-metrics.csv with formulas for totals and growth, preserve source precision, add a Sources sheet, recalculate with LibreOffice, scan every formula result for errors, and save to ./deliverables without changing the CSV."Với redline, hãy nêu rõ review boundary: giữ DOCX gốc, chỉ thực hiện thay đổi text được duyệt dưới dạng tracked change, giữ comment cùng formatting, render mọi page và trả cả file đã review lẫn change ledger. Với deck, cung cấp aspect ratio, template, slide count, audience, yêu cầu speaker note, asset đã duyệt và thumbnail hoặc rendered-slide review mong đợi.
Quan sát artifact workflow
- Skill phân loại task. Skill chọn guidance PDF, spreadsheet, Word hoặc PowerPoint và xác định đây là read-only, creation, editing, redlining, template reuse hay form filling.
- Skill kiểm tra trước khi thay đổi. Skill extract text hoặc data, inventory page, sheet, slide, field, relationship cùng formatting và ghi nhận nội dung phải tồn tại sau transformation.
- Skill tải nested guidance bắt buộc. Creation hoặc OOXML editing DOCX và PPTX yêu cầu đọc đầy đủ guide được tham chiếu trước implementation. PDF form chỉ phân nhánh sau khi kiểm tra field thật có tồn tại không.
- Skill tạo working artifact riêng. Workflow dùng structured source, unpacked OOXML, HTML slide, JSON inventory, rendered page hoặc intermediate khác phù hợp format.
- Skill xác minh semantic và structure. Formula, reference, field, tracked change, slide shape, package relationship cùng content được kiểm tra trước visual judgment.
- Skill render và kiểm tra khi layout quan trọng. Page, slide, form, overflow, contrast, clipping và shift ngoài ý muốn được review rồi sửa.
- Skill giao evidence. Báo cáo cuối nêu output, intermediate, check, preserved feature, mutation, dependency và gap còn lại.
Biết file mỗi route có thể tạo
| Route | Intermediate effect thường gặp | Ranh giới final artifact |
|---|---|---|
| Extracted text hoặc table, page image, field-info JSON, field-values JSON, bounding-box JSON, validation image, split page hoặc repaired copy | PDF mới cùng extracted data được yêu cầu; bản gốc không đổi trừ khi overwrite được nêu rõ | |
| XLSX | Analysis table, source note, formula, chart và LibreOffice recalculation; lần dùng đầu có thể tạo LibreOffice user macro trong local profile | Workbook đã recalculation không còn formula error được báo và hardcode được document |
| DOCX | Extracted Markdown, unpacked OOXML directory, editing script, repacked working copy, PDF render và page image | DOCX mới có comment hoặc tracked change được yêu cầu cùng text và visual verification |
| PPTX | Extracted Markdown, thumbnail grid, template inventory, outline, working deck, text inventory JSON, replacement JSON, HTML hoặc JavaScript slide source, unpacked OOXML và rendered image | PPTX mới có content, structure, overflow và visual review đã được xác minh |
PDF form có hai route riêng. Fillable form extract field được khai báo rồi xác minh field ID và value trước khi ghi PDF mới. Non-fillable form dùng page image, bounding box cho label và entry, automated intersection check, review thủ công validation image cùng text annotation. Visual guess thiếu các check đó không phải filled form đã xác minh.
Với spreadsheet, formula phải giữ là formula thay vì hardcode kết quả tính bằng
Python. recalc.py đi kèm dùng LibreOffice để recalculation workbook, sau đó
scan mọi cell tìm #VALUE!, #DIV/0!, #REF!, #NAME?, #NULL!, #NUM! và
#N/A. JSON của script báo status, error count, location có giới hạn và formula
count. Lần dùng đầu có thể khởi tạo LibreOffice và ghi Module1.xba vào profile
LibreOffice của người dùng.
Kiểm soát document mutation và dữ liệu nhạy cảm
Office file là executable workflow, không phải plain text
Conversion, unpacking, recalculation, OCR, browser rendering và repacking có thể tạo nhiều file, đổi cached value, làm mất unsupported feature, lộ hidden content hoặc thực thi tooling đã cài. Hãy làm trên bản sao và xác định output directory trước khi bắt đầu.
- Không gỡ encryption, signature, protection, macro, external link hoặc metadata trừ khi người dùng sở hữu file và cho phép rõ thay đổi đó.
- Coi comment, tracked change, hidden sheet, speaker note, embedded media, formula, link và document property là dữ liệu có thể nhạy cảm dù chúng không hiển thị trong main view.
- Không gửi file tới OCR, conversion, font, image hay cloud service khi chưa được duyệt. Guidance đi kèm ưu tiên local nhưng không làm mọi dependency trở thành local hoặc đã cài sẵn.
- Template slide replacement có thể xóa mọi inventoried text shape thiếu replacement paragraph. Hãy review inventory đầy đủ và làm trên bản duplicate.
- Mở XLSX với
data_only=Truerồi lưu có thể thay formula bằng cached value. Tách riêng pass giữ formula và pass đọc value. - Không bao giờ overwrite bản duy nhất của source artifact. Chỉ commit, upload, email, publish, print hoặc share deliverable qua action được cấp quyền riêng.
Xác minh output và evidence
Kết quả đầy đủ nên gồm:
- Path chính xác của source và final artifact, format, size, page, sheet hoặc slide count cùng checksum khi integrity quan trọng.
- Mọi intermediate directory và file còn lại, temporary file đã xóa cùng local profile change do tool thực hiện.
- Content check: extracted text, đối chiếu table hoặc data, formula count và error, field mapping, tracked-change ledger, slide inventory cùng việc giữ speaker note hoặc comment khi phù hợp.
- Structural check: package validation, relationship, formula, named range, field, reference và khả năng mở bằng format đã chọn.
- Visual evidence từ rendered page, slide, thumbnail hoặc validation image với clipping, overlap, overflow, contrast, pagination và font substitution được đánh giá khi liên quan.
- Gap rõ ràng khi Office application, font, converter, OCR, browser engine, password, source asset hoặc human review không khả dụng.
Hai release stable và beta được ghim chứa cùng parent cùng nested document tree. Riêng description của parent không bảo đảm mọi dependency đã được cài hoặc mọi advanced Office feature round-trip không mất mát.
Khắc phục sự cố và hiểu giới hạn
| Triệu chứng | Bước an toàn tiếp theo |
|---|---|
| Parent Skill không chọn đúng route | Nêu source extension, operation chính xác, output extension, preservation need và evidence bắt buộc. |
Không tìm thấy nested command như ak:pdf | Gọi ak:document-skills; bốn format subskill là guidance đi kèm, không phải top-level export đã đăng ký. |
| PDF text hoặc table không đầy đủ | Xác định source là scan, có structure bất thường, encrypted hay corrupt; render page và chỉ dùng OCR được duyệt khi cần. |
| PDF form không có field | Dùng non-fillable annotation workflow với validation image và bounding-box check; không ép chạy fillable-field script. |
| Formula workbook hiển thị value cũ | Chạy recalculation path đi kèm bằng LibreOffice, kiểm tra JSON, sửa mọi error được báo và mở lại mà không lưu bản data_only=True. |
| DOCX edit mất formatting hoặc change khó review | Dùng raw OOXML cùng redlining workflow, tạo minimal tracked edit theo batch nhỏ, repack, extract lại và render. |
| PPTX text biến mất sau replacement | Kiểm tra lại toàn bộ text inventory. Shape bị bỏ khỏi replacement paragraph sẽ được packaged workflow xóa theo chủ đích. |
| Artifact mở được nhưng layout sai | Render bằng tool tương thích target và kiểm tra mọi page hoặc slide bị ảnh hưởng; package thành công không phải visual proof. |
| Converter hoặc library không khả dụng | Báo stage bị chặn cùng dependency thiếu. Không cài system package hay tuyên bố verification khi chưa được duyệt. |
| Runtime không nhận diện Skill | Xác nhận target và scope, khởi động lại session, rồi làm theo Runtime không tìm thấy Skill hoặc Agent. |
Dùng ak:docs cho documentation ưu tiên Markdown và xem
Project, artifact và checkpoint
trước transformation artifact lớn hoặc có tính phá hủy.
Biến quyết định thành tài liệu bền vững với ak:interview-docs
Phỏng vấn người dùng về vision, principle, strategy hoặc architectural decision của chính họ rồi giữ từng câu trả lời trong tài liệu project được duy trì.
Viết conversion copy với ak:copywriting
Biến brief về audience, offer, proof và format thành copy cùng variant có thể review mà không bịa claim hay che giấu xử lý bên ngoài.