Commit graph

31 commits

Author SHA1 Message Date
Claude
db013baea6
docs: consolidate field examples into compact format
https://claude.ai/code/session_013XdLypgxPSbNA428pzDXB3
2026-04-16 12:28:14 +00:00
Claude
d94fd582ac
docs: trim field examples in skill doc
https://claude.ai/code/session_013XdLypgxPSbNA428pzDXB3
2026-04-16 12:27:18 +00:00
Claude
13f5067d55
feat(word): add remaining common field types
Zero-param: SECTIONPAGES, SECTION, CREATEDATE, SAVEDATE, PRINTDATE,
EDITTIME, LASTSAVEDBY, NUMWORDS, NUMCHARS, REVNUM, TEMPLATE,
COMMENTS, KEYWORDS

Parameterized: NOTEREF (bookmarkName), STYLEREF (styleName),
DOCPROPERTY (propertyName)

https://claude.ai/code/session_013XdLypgxPSbNA428pzDXB3
2026-04-16 12:25:42 +00:00
Claude
dc3c644bc5
feat(word): add REF, PAGEREF, SEQ, IF field types
- REF: cross-reference bookmark text (--prop bookmarkName, hyperlink)
- PAGEREF: cross-reference bookmark page number
- SEQ: auto-numbering sequences (--prop identifier=Figure/Table)
- IF: conditional field (--prop expression, trueText, falseText)

https://claude.ai/code/session_013XdLypgxPSbNA428pzDXB3
2026-04-16 11:58:54 +00:00
Claude
2f936c3745
feat(word): add MERGEFIELD support for mail merge templates
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
2026-04-16 11:20:29 +00:00
zmworm
2bb6e7e015 chore(skill): remove bundled shiba.glb from morph-ppt-3d, translate skill to English
- 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
2026-04-14 02:03:39 +08:00
zmworm
bfff02223b fix(skills): use repo-relative path for built-in shiba.glb model
$(dirname "$0") doesn't work in skill context — Claude reads the file
as a prompt, not as a shell script. Use the repo-relative path instead.
2026-04-13 16:32:53 +08:00
goworm
f7b14897b6
Merge pull request #55 from ringringlin/ringringlin/feat/morph-ppt-3d-skill
feat(skills): add morph-ppt-3d skill for 3D model presentations
2026-04-13 16:32:23 +08:00
ringringlin
aaf24a89ab feat(skills): add morph-ppt-3d skill for 3D model presentations
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
2026-04-13 15:46:09 +08:00
zmworm
edb61c3040 refactor(add): unify import params — deduplicate OLE helpers, normalize src as canonical prop name
- 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)
2026-04-13 14:58:54 +08:00
zmworm
b88cc3ad61 refactor(word): align PR #50 implementation to project conventions
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>
2026-04-10 13:36:29 +08:00
goworm
3777b08834
Merge pull request #50 from konbakuyomu/feat/word-ole-image-improvements
feat(word): OLE object support, image auto aspect ratio, and insertion positioning fixes
2026-04-10 13:30:44 +08:00
Waili(瓦砾)
886384f9af docs(skills): shorten install guidance wording 2026-04-10 12:34:06 +08:00
Waili(瓦砾)
4ffe3e15ca docs(skills): standardize officecli install guidance 2026-04-10 12:25:36 +08:00
konbakuyomu
4667f57b9e fix: resolve image insertion positioning and line spacing bugs
- 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>
2026-04-10 08:47:02 +08:00
Waili(瓦砾)
cb183604f6 docs(skills): add Adjustments section to specialized skills for v1.0.34
Each creation-focused skill now includes an "Adjustments After Creation"
section covering swap, move --after/--before, find+replace, and remove
for post-creation user feedback scenarios.

- officecli-pitch-deck: slide swap/move + shape index re-query reminder
- morph-ppt: uses @name=!! paths + morph pair alignment warning
- officecli-academic-paper: paragraph-level swap/move
- officecli-financial-model: sheet-level swap/move
- officecli-data-dashboard: sheet-level swap/move + chart data update

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 16:27:04 +08:00
Waili(瓦砾)
fa1ed5f0ee docs(skills): sync swap, move --after/--before, and batch fields for v1.0.34
- 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>
2026-04-05 15:29:17 +08:00
zmworm
f7441946e8 feat: add find+format, find+replace, and text-anchored insert for Word and PowerPoint
- 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
2026-04-04 21:19:02 +08:00
Waili(瓦砾)
1b5dcc6515 feat(skills): R9 skill optimization — all 8 skills updated + 4 bug fixes
Skills-only cherry-pick from PR #35. Excludes src/officecli changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 00:32:24 +08:00
Waili(瓦砾)
3fd8e56656 Revert "Merge pull request #35 from iOfficeAI/feat/skills-optimize"
This reverts commit 4980872359, reversing
changes made to 516d87c45c.
2026-04-03 00:20:53 +08:00
Waili(瓦砾)
c21d686d27 fix(skills): fix 3 doc bugs found in R9 testing
- academic-paper D-4b: raw-set pbdr workaround now uses correct --xpath/--action syntax (two-step: remove then append)
- pitch-deck C.5b: replace hardcoded 444444 bare hex with $MUTED_HEX placeholder + note
- pptx Timeline Recipe 3: formula now subtracts circle_width from usable_width to prevent last-node overflow; update example coords accordingly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 23:36:17 +08:00
Waili(瓦砾)
9da8e7ba5b fix(academic-paper): equation in table cell must use mode=inline on tc/p[1] path
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>
2026-04-02 23:36:17 +08:00
Waili(瓦砾)
014d397b55 feat(skills): R9 skill optimization — all 8 skills updated
- morph-ppt: namespace prefix rules, scene planning, ghost accumulation docs
- officecli-academic-paper: equation table method, pbdr bug workaround
- officecli-data-dashboard: chart hidden-column rule, print area requirement
- officecli-docx: various R9 fixes
- officecli-financial-model: font color verification, balance check anti-patterns, sheet name quoting
- officecli-pitch-deck: H-PALETTE banned hex codes, H-FONT shape coverage, QA checklist
- officecli-pptx: Section Divider / KPI Box / Timeline recipes added
- officecli-xlsx: R9 fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 23:36:17 +08:00
zmworm
f4731bb93a docs: update data-dashboard and financial-model skill templates 2026-04-02 16:34:27 +08:00
Waili(瓦砾)
73c02212e6 Merge branch 'main' into feat/morph-ppt-python-migration 2026-03-29 12:27:38 +08:00
Waili(瓦砾)
d842750c0e fix(skill): update bash-specific notes to Python in morph-ppt and pitch-deck
- pptx-design.md: replace shell single-quote note with Python equivalent
- officecli-pitch-deck/SKILL.md: morph-helpers.sh → morph-helpers.py in comparison table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 23:39:37 +08:00
Waili(瓦砾)
ec6c9e380b feat(skill): migrate morph-ppt helpers from bash to Python for cross-platform support
- Add morph-helpers.py: cross-platform replacement for morph-helpers.sh (Mac/Windows/Linux)
- Update SKILL.md: build script template switched to Python, remove shell quoting notes
- Fix 8 style build.sh files: replace non-existent `validate` command with `final-check`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 23:36:57 +08:00
Waili(瓦砾)
b1e7c9c113 feat(skill): add officecli-financial-model skill for formula-driven Excel models
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>
2026-03-28 20:13:50 +08:00
Waili(瓦砾)
50ebfde259 feat(skills): add pitch-deck skill and update academic-paper
- Add officecli-pitch-deck skill with SKILL.md and creating.md
- Update officecli-academic-paper: add D-10 dollar sign warning, inline equation note
2026-03-28 17:57:58 +08:00
Waili(瓦砾)
e695ec65ab feat(skills): standardize officecli- naming convention
- 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
2026-03-28 12:44:33 +08:00
Waili(瓦砾)
a35f02c1f5 feat(skills): add docx, pptx, xlsx, and morph-ppt skills
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.
2026-03-28 02:40:17 +08:00