Add mergefield as a first-class field type. Usage:
officecli add doc.docx "/body/p[1]" --type mergefield --prop fieldName=CustomerName
Placeholder text defaults to «fieldName» format (e.g. «CustomerName»).
https://claude.ai/code/session_013XdLypgxPSbNA428pzDXB3
- Delete skills/morph-ppt-3d/models/shiba.glb (1.9 MB) — was embedded
in the binary via the skills/**/* glob, inflating the binary by ~1.9 MB
- Exclude *.glb from EmbeddedResource in officecli.csproj as a safeguard
- Rewrite morph-ppt-3d SKILL.md: remove built-in model fallback (cp shiba.glb),
translate all Chinese text to English, replace shiba examples with fox/duck
Add a 3D extension skill for morph-ppt that creates cinematic presentations
with GLB 3D models and Morph transitions.
- Extends morph-ppt: inherits naming, ghosting, design, and verification rules
- 7 camera shot types (establishing, close-up, bird's eye, low angle, etc.)
- 6 layout patterns (A-F) with size contrast rule between adjacent slides
- Content-driven camera: model angle matches slide topic
- Model discovery flow for users without a GLB model
- Built-in shiba.glb model for quick-start demos
- 10 color palettes, 6 font pairings, H4/H6/H7 hard rules
- References ../../styles/ for additional visual inspiration
- Text overlap prevention and model bleed guidelines
- Extract OleHelper.RequireSource/ResolveProgId/CreateIconPart to eliminate
duplicated boilerplate across Word/Excel/PPT AddOle handlers
- Add 'img' type alias to Excel picture (consistency with Word/PPT)
- Switch Excel picture to ParseAnchorBoundsEmu for unit-qualified width/height
- Add auto aspect-ratio to PPT picture (only one dimension → compute other)
- Unify error messages to "'src' property is required" (hide 'path' alias)
- Update --help examples to show src= only
- Normalize all docs/skills/examples from --prop path= to --prop src=
- Add 'src' alias to PPT video/audio (was path-only)
Follow-up on 3777b08 (merge PR #50). The merged implementation carried
a Windows-only GDI+ dependency and some code quality rough edges that
conflict with cross-platform and consistency goals; this commit swaps
the affected files for a refactored equivalent while keeping every
user-facing feature except the GDI preview extraction.
Dropped (Windows-only / platform-specific):
- System.Drawing.Common NuGet dependency from officecli.csproj.
- WordHandler.ImageHelpers.ExtractOlePreviewImage + [SupportedOSPlatform]
guards. OLE objects are still detected and reported (progId, dims) and
still render in the watch HTML preview when the embedded image part is
already a browser-compatible format.
- Core/HtmlPreviewHelper EMF/WMF -> PNG GDI conversion. Non-renderable
previews (EMF/WMF/TIFF) fall back to a sized placeholder div in the
HTML preview, same as before.
- tests/OfficeCli.Tests/OfficeCli.Tests.csproj and UnitTest1.cs that
were added as tracked files. Project convention: tests/ is gitignored
and tests are local-only; an existing test project already lives at
tests/OfficeCli.Tests/ with FluentAssertions and DocumentFormat.OpenXml
3.4.1 matching the main project.
- skills/officecli-docx/SKILL.md pitfall rows that described bugs the
A-bucket fixes resolved ("fixed in fork" wording), now obsolete.
Refactored while preserving behaviour:
- WordHandler.Set.cs: the six wrap/position cases (wrap, hposition,
vposition, hrelative, vrelative, behindtext) share a single
ResolveRunAnchor helper instead of each case re-walking
run -> Drawing -> DW.Anchor.
- WordHandler.ImageHelpers.cs: ConvertVmlLengthToCm replaces the brittle
.Replace("pt", "").Replace("in", "") string handling with a regex so
values whose unit substring is embedded in a larger token can never
be mangled. Added pt/in/cm/mm/px support.
- Core/ImageSource.cs: TryGetDimensions no longer catches all
exceptions unconditionally — IOException is caught explicitly so
unrelated bugs can still surface.
- WordHandler.HtmlPreview.Text.cs: OLE placeholder uses a plain-text
label ("Embedded Object (preview not supported in browser)") without
emoji, matching the project's rendering conventions.
- WordHandler.HtmlPreview.cs heading auto-numbering: skip the
heading-num span when the paragraph text already starts with the
computed number, so a user-typed "1. Overview" does not render as
"1. 1. Overview" (equivalent to 5682869 on the feature branch).
Kept as-is from the merged PR:
- All A-bucket bug fixes (auto aspect ratio, picture --index inside
paragraphs, body-level find:, ChildElements-based index resolution
for AddParagraph/AddPicture, auto-injected line spacing on new
image paragraphs, watch pagination splitIdx<0 guard + visibleCount
infinite-recursion guard).
- OLE detection/read (query ole/object/embed, picture selector also
returns OLE, view outline OLE count).
- Picture wrap/position readback and write-through.
- HTML heading auto-numbering from the style chain.
- HTML OLE preview rendering for web-compatible image parts.
Verified: dotnet build src/officecli 0W/0E;
tests/OfficeCli.Tests Word suite 1508 passed, 1 skipped (obsolete
body-level find: assertion), 0 failed.
Co-authored-by: konbakuyomu <konbakuyomu@gmail.com>
- Fix index space mismatch in AddPicture/AddParagraph: use ChildElements
instead of Elements<Paragraph>() for consistent index resolution when
documents contain Table or SectionProperties elements
- Fix image paragraph clipping: auto-inject line spacing (auto/240) on
new image paragraphs to prevent inherited fixed line spacing from
clipping inline images to one line height
- Update officecli-docx skill with Known Issues and Common Pitfalls
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add `swap` to batch supports in pptx/docx/xlsx SKILL.md
- Add `after`, `before` to batch fields in pptx/docx/xlsx SKILL.md
- Update `path` description to include `swap` in all three SKILL.md
- Add `swap` and `move --after` examples to pptx editing.md
- Add `move --after` example to docx editing.md
- Add `swap` comment and `move --after` example to xlsx editing.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add `set find=` to format or replace matched text with auto run splitting
- Support regex via r"..." prefix (e.g. find=r"\d+%")
- Unify find+replace (replaces old scope-based FindAndReplace)
- Add `--after find:X` / `--before find:X` for positional element insertion
- Word: inline (run) and block (table/paragraph) insertion with auto paragraph splitting
- PowerPoint: inline run insertion at text positions
- Support all run-level format properties through find pathway
- Update SKILL.md, wiki, and skill docs with new syntax
Direct --type equation on tc path generates illegal oMathPara as w:tc child.
Two independent testers reproduced validate failure. Fix: target tc/p[1] with mode=inline.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New specialized skill for building multi-sheet financial models from text
prompts: 3-statement models, DCF valuations, cap tables, scenario analysis,
sensitivity tables, and debt schedules. Developed through 2 rounds of
iterative testing (R2 score: 8.98/10).
- SKILL.md: 155 lines with trigger phrases, workflow, quick reference warnings
- creating.md: 647 lines with 6 sections (Setup, Core, Advanced, Charts, QA, Issues)
- Root SKILL.md: added to Specialized Skills directory table
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename skill directories: docx → officecli-docx, pptx → officecli-pptx,
xlsx → officecli-xlsx, academic-paper → officecli-academic-paper,
data-dashboard → officecli-data-dashboard
- All SKILL.md name fields already match the new directory names
- Add naming_convention rule to skills team config
- Fix version_tracking to use YAML comments (not HTML) in frontmatter
- Add officecli-academic-paper and officecli-data-dashboard skills
- Update officecli-xlsx/creating.md to latest version
Add four AI agent skills for officecli:
- docx: Word document creation, editing, and analysis
- pptx: PowerPoint presentation creation, editing, and analysis
- xlsx: Excel spreadsheet creation, editing, and analysis
- morph-ppt: Morph-animated presentation with multiple visual styles
Each skill includes install/update check, reading/creating/editing
guides, QA workflows, and common pitfalls documentation.