agentleFS
lamvu211lamvu211/office-skills/SKILL.md

office-skills

Skill4 starsChanged 6 months agoMITView on GitHub

Use this skill when you need to create, edit, convert, analyze, validate, or QA Office/document artifacts: DOCX, XLSX, PPTX, PDF, HTML dashboards, business reports, Vietnamese administrative documents, or raw data to chart/report workflows. It routes the task, asks for missing source/template/field/business-rule/output details, uses the bundled resources/scripts, and verifies that the final artifact opens correctly and is not blank or repair-required.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. dgoomeez002-afk/claude-skills★ 0same name
    2. guyue55/ai-office-example★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 16 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Ask before acting if missing details can change the output: source files, template/format to preserve, sheet/table/page/slide, fields, …

    line 30
  2. Distinctive:

    Never overwrite source files unless the user explicitly requests it.

    line 31
  3. Distinctive:

    Prefer local, simple, reproducible workflows.

    line 32
  4. Distinctive:

    Do not hard-code report year, source filename, sheet name, title/subtitle, or business filters when they can be inferred from data.

    line 35
  5. Distinctive:

    Do not report completion if an Office file needs repair, is blank, or lacks its main expected content.

    line 36
  6. Very specific:

    Run headless/hidden Office automation when possible.

    line 37
  7. Distinctive:

    Read the most relevant asset before producing professional output:

    line 42
  8. Distinctive:

    Do not copy bundled resources into the target project unless the workflow needs a reusable script or local project memory.

    line 55
  9. Distinctive:

    Before group B/C workflows, confirm only the missing items that affect correctness:

    line 75
  10. Distinctive:

    When file inspection can answer a question safely, inspect first and state assumptions rather than asking the user to enumerate everything.

    line 84
  11. Very specific:

    Read existing INSTRUCT.md and LOG.md before workflows that use or update them.

    line 105
  12. Very specific:

    Use resources/library-selection.md as the decision table.

    line 127
  13. Distinctive:

    When a file is a format/template source and the user expects formatting preservation, profile before rendering:

    line 155
  14. Very specific:

    If a library cannot profile an important part, record the limitation in INSTRUCT.md and use Office XML, COM, or LibreOffice where necessary.

    line 161
  15. Distinctive:

    Use the lightest verification tier that proves the requested outcome:

    line 165
  16. Very specific:

    Use for simple extraction/conversion/creation:

    line 169
  17. Distinctive:

    Use when output is based on source data, business rules, charts, dashboards, or reports:

    line 176
  18. Distinctive:

    Check title/subtitle, period, filters, source name, chart readability, and label wrapping/truncation.

    line 180
  19. Distinctive:

    Use when template fidelity, presentation quality, copied images/charts, or final client-facing layout matters:

    line 184
  20. Distinctive:

    Check fonts, text overflow, spacing, contrast, image/chart dimensions, z-order, and blank frames.

    line 188
  21. Distinctive:

    Do not escalate to heavier verification just because it is possible.

    line 190
  22. Distinctive:

    If the task was only explanation or inspection, answer directly without forcing file creation.

    line 203

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

office-skills

Office automation skill for agents that need to handle documents and workplace data safely and reproducibly.

This skill is intentionally a router plus toolkit. The user should not need to know whether the right workflow is DOCX, XLSX, PPTX, PDF, Office XML, dashboard, report, or conversion. Determine the shortest workflow that produces a correct verified output.

Use this skill when

  • Creating or editing .docx, .xlsx, .pptx, .pdf, .html dashboards, charts, or reports.
  • Converting between document formats.
  • Extracting tables/text from Office or PDF files.
  • Filling a template while preserving layout and style.
  • Turning raw data into cleaned tables, charts, dashboards, or narrative reports.
  • Creating Vietnamese administrative documents or formal business documents.
  • Validating Office files after generation or OOXML patching.

Do not use this skill when

  • The user only asks a general programming question unrelated to documents or workplace data.
  • The user asks for destructive edits to original files without explicit confirmation.
  • The task needs cloud-only integrations or credentialed systems that are not available locally.

Core rules

  1. Ask before acting if missing details can change the output: source files, template/format to preserve, sheet/table/page/slide, fields, business rules, filters, output format, or overwrite risk.
  2. Never overwrite source files unless the user explicitly requests it.
  3. Prefer local, simple, reproducible workflows.
  4. For raw data to chart/dashboard/report, create checked bridge artifacts before rendering final output.
  5. For template-based work, profile the template before patching or rendering.
  6. Do not hard-code report year, source filename, sheet name, title/subtitle, or business filters when they can be inferred from data.
  7. Do not report completion if an Office file needs repair, is blank, or lacks its main expected content.
  8. Run headless/hidden Office automation when possible; do not bring Word/Excel/PowerPoint windows to the user's screen unless requested.
  9. If a bundled script fails because of environment/path/version assumptions, only patch the bundled script when working inside this office-skills repo. When the skill is installed as a runtime package, copy or create a task-local script in the target project's scripts/ and patch that local copy instead.

Repository assets

Read the most relevant asset before producing professional output:

NeedRead/use
DOCX creation/editingresources/docx.md, standards/structure/docx-*.md, standards/color/docx-*.md
Vietnamese administrative DOCXstandards/nd30.md, templates/docx-hanh-chinh-*.md
XLSX report/dashboardresources/xlsx.md, standards/structure/xlsx-structure.md, standards/color/xlsx-palettes.md
PPTX presentationresources/pptx.md, standards/structure/pptx-structure.md, standards/color/pptx-palettes.md
PDF extraction/conversionresources/pdf.md, resources/convert.md
Preserve Office template formatresources/office-xml.md, scripts/office/unpack.py, scripts/office/pack.py, scripts/office/clone_text.py
Library/tool selectionresources/library-selection.md
Bridge artifactsresources/bridge.md

Do not copy bundled resources into the target project unless the workflow needs a reusable script or local project memory.

Workflow router

Classify the request first:

A. Explain / inspect only

Answer directly or inspect the file. Do not bootstrap folders or create scripts unless needed.

B. Simple one-step task

Examples: convert one file, extract one small table, inspect a workbook, create a simple document. Use the shortest safe workflow. If writing a file, create only output/ unless the task needs reusable scripts, remembered requirements, template profiling, or error lessons.

C. Multi-step workflow

Examples: multiple source files, cleaning/aggregation, charts, dashboards, reports, template filling, multi-format output. Bootstrap target project memory and bridge artifacts at the minimum level needed for traceability and reruns.

Intake checklist

Before group B/C workflows, confirm only the missing items that affect correctness:

  • Purpose: what final artifact and what audience/use?
  • Source: which file(s), sheet/table/page/slide/range, header row, primary source vs lookup/template?
  • Fields: period, entity, category, measure, status, ID, owner, mapping.
  • Business rules: filters, exclusions, grouping, aggregation, ranking, top N, rounding, date/currency/percent formats.
  • Template/format: whether layout, style, logo, fonts, formulas, charts, slide masters, or headers/footers must be preserved.
  • Output: format, name, folder, language, tone, required KPIs/charts, validation criteria.

When file inspection can answer a question safely, inspect first and state assumptions rather than asking the user to enumerate everything.

Target project bootstrap

Bootstrap only as much structure as the task needs:

Task levelCreate/use
Explain or inspect onlyNo project bootstrap.
Simple one-step outputoutput/ only.
Simple task with reusable script or observed erroroutput/, scripts/, LOG.md.
Template-preserving taskoutput/, INSTRUCT.md, LOG.md; add scripts/ if automation is saved.
Raw data to chart/dashboard/reportoutput/, bridge/, INSTRUCT.md, LOG.md; add scripts/ when rerunnable automation is useful.
Long-lived Office automation workspaceOptional CLAUDE.md only when the user wants persistent project-level agent instructions.
  • INSTRUCT.md: confirmed requirements, source/template roles, field mapping, business rules, template profile, output requirements, validation checklist.
  • LOG.md: execution issues, environment/script fixes, repair/blank-output causes, and things not to repeat.
  • bridge/: cleaned data, summaries, chart sources, metadata, validation, evidence.
  • output/: final user-facing artifacts only.
  • CLAUDE.md: optional target-project agent context, not required for one-off tasks.

Read existing INSTRUCT.md and LOG.md before workflows that use or update them.

Default workflows

SituationWorkflow
Read/inspect fileEXTRACT
Merge tabular filesEXTRACT → MERGE
Clean/summarize dataEXTRACT/MERGE → TRANSFORM
Create polished ExcelTRANSFORM → CREATE_EXCEL
Create chartTRANSFORM → CREATE_CHART
Create dashboardTRANSFORM → CREATE_CHART → CREATE_DASHBOARD
Create reportTRANSFORM → CREATE_CHART → CREATE_REPORT
Create Word documentCREATE_DOCX
Create PowerPointCREATE_PPTX
Convert formatCONVERT
Preserve existing Office formattingOFFICE_XML

Choose the simpler valid workflow.

Library and tool priority

Use resources/library-selection.md as the decision table. In short:

  • Tables/data: pandas + numpy; read/write Excel with openpyxl or xlsxwriter; .xlsb with pyxlsb.
  • XLSX editing with existing formulas/styles: openpyxl; new styled report workbooks: xlsxwriter or openpyxl depending on formula/edit needs.
  • DOCX new documents: python-docx; Markdown to DOCX: bundled converter or Pandoc + scripts/format/format_docx.py; preserving template format: Office XML scripts.
  • PPTX basic generation/editing: python-pptx; complex template-preserving changes: Office XML; visual QA: LibreOffice/PowerPoint headless export when available.
  • PDF text/tables: pdfplumber; merge/split/page operations: pypdf; PDF to DOCX: pdf2docx; generated PDFs: reportlab; scanned PDFs: vision/OCR workflow, not digital extraction.
  • OOXML safety/validation: bundled scripts/office/*, defusedxml, lxml, zipfile checks.
  • Charts/dashboards: plotly for interactive/static HTML; matplotlib only if already available or needed; prefer HTML dashboards when no dynamic app is required.

Bridge requirements for reports/dashboards

For raw data to chart/dashboard/report, do not render directly from raw source when traceability matters. Create bridge artifacts such as:

bridge/01-cleaned-data.xlsx
bridge/02-summary-tables.xlsx
bridge/03-chart-sources.xlsx
bridge/metadata.json
bridge/validation.txt
bridge/evidence.json
bridge/qa.log

At minimum, metadata should record source file, sheet/page where relevant, report period, business filters, row counts, entity counts, field mapping, and output path.

Template profile requirement

When a file is a format/template source and the user expects formatting preservation, profile before rendering:

  • DOCX: page size, margins, sections, headers/footers, styles, fonts, heading/list/table styles, image/shape positions.
  • XLSX: sheets, column widths, row heights, merged ranges, formats, formulas, freeze panes, filters, fills, borders, charts, images, print setup.
  • PPTX: slide size, masters/layouts, shape tree, placeholders, geometry, fonts, fills, lines, images, charts, z-order.

If a library cannot profile an important part, record the limitation in INSTRUCT.md and use Office XML, COM, or LibreOffice where necessary.

Verification checklist

Use the lightest verification tier that proves the requested outcome:

Basic verification

Use for simple extraction/conversion/creation:

  • Confirm the output file exists in output/ or the requested path.
  • Reopen/read it with the appropriate library: python-docx, openpyxl, python-pptx, pypdf, zipfile, or OOXML validation.
  • Confirm expected document elements are non-zero: paragraphs/tables, sheets/cells, slides/shapes/images, pages/text/tables.

Data/report verification

Use when output is based on source data, business rules, charts, dashboards, or reports:

  • Perform Basic verification.
  • Reconcile final KPI/chart/table values against bridge tables.
  • Confirm metadata: source file, sheet/page where relevant, period, filters, row counts, field mapping, and output path.
  • Check title/subtitle, period, filters, source name, chart readability, and label wrapping/truncation.

High-fidelity visual verification

Use when template fidelity, presentation quality, copied images/charts, or final client-facing layout matters:

  • Perform Basic and Data/report verification as applicable.
  • For Office XML edits, pack correctly and run scripts/office/validate.py when applicable.
  • Render/export DOCX/PPTX/PDF pages/slides to PDF/PNG when tools are available.
  • Check fonts, text overflow, spacing, contrast, image/chart dimensions, z-order, and blank frames.

Do not escalate to heavier verification just because it is possible; use it when the task risk justifies it.

Response format

For completed tasks, answer briefly with:

  • What was done.
  • Input files used.
  • Output path(s).
  • Bridge files created, if any.
  • Scripts saved/changed, if any.
  • Assumptions or remaining limits, if any.

If the task was only explanation or inspection, answer directly without forcing file creation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.