Install
$ agentstack add skill-officecli-officecli-officecli ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
OfficeCLI
Overview
officecli is the OfficeCLI closed-source CLI for Office document and standalone image handling. It may support generation, modification, and format conversion workflows across pptx, docx, xlsx, report, and img, so this skill should first route supported artifact tasks into an officecli capability check before deciding how to execute them.
When To Use This Skill
Use this skill when the task involves:
- creating a presentation, report deck, proposal, handout, or briefing in
pptx - creating a written document, memo, draft, or report in
docx - creating a worksheet, table-based deliverable, or structured sheet in
xlsx - creating a workbook-backed HTML report from an
.xlsxsource - creating a standalone generated image with
img - modifying an existing PowerPoint, Word, or Excel file
- converting Office documents into another output format such as markdown, csv, pdf, or a different Office format
- deciding whether a requested Office-file workflow is something
officeclican handle directly
Do not use this skill for pure Q&A, rough brainstorming with no file output, or source-code maintenance guidance.
Core Product Behavior
officeclisupportspptx,docx,xlsx,report, and standaloneimggeneration flowspptxenables auto-generated images by default when the content and layout are a good fit--no-imagesdisables image generation forpptx- standalone
imggeneration always goes through the OfficeCLI server and requires platform/license config - standalone
imgdoes not use localllm.image_base_url,llm.image_api_key, orllm.image_modelsettings - standalone
imgsupportsratio=square|landscape|portraitand onereference_image/--reference-image; charging happens only after a successful image response, using one image generation count inexternalruntime mode or hosted credits inhostedruntime mode - free standalone
imgusage has a separate 3-per-day bucket from the 10-per-day free document bucket - standalone
imgpublishes online by default when publishing is configured; passpublish=falseor--no-publishfor local-only output - when using
agent-bridge, agents should treatcapabilities/get -> document_generation.pptx.image_supportas the authoritative machine-readable contract for PPT image behavior - when using
agent-bridge, agents should treatcapabilities/get -> image_generationas the authoritative machine-readable contract for standaloneimgbehavior - when using
agent-bridge, agents should treatcapabilities/get -> updateas the authoritative machine-readable contract for binary update availability - if image generation fails for a slide, the PPT should still be generated with that slide downgraded to a no-image version
- installing the public skill can also attempt to install the
officeclibinary when it is missing - for agent-oriented integrations,
officecli agent-bridgenow exposes a structuredJSON-RPC 2.0 over stdioprotocol - persistent configuration is handled through
officecli config ..., not through aninitwizard - default runtime mode is visible through
officecli config runtimeand can be changed withofficecli config set-runtime external|hosted - hosted runtime mode uses the OfficeCLI platform service and requires a platform OfficeCLI API key with hosted credits; users should not configure or handle aigateway keys directly
- OfficeCLI should be installed through one channel at a time; if the user already has a Homebrew-installed
officecli, do not suggest or runnpm install -g officeclion top of it
Authentication
officecli supports three authentication modes:
- anonymous — free hosted trial with limited daily quotas (default after install)
- account — full hosted credits after browser login
- api_key — automation credential set via
officecli set-key
Preferred authentication flow:
- run
officecli whoamito check the current authentication mode - if the mode is
anonymous, guide the user to runofficecli loginto sign in with their account officecli loginopens a browser URL with a short device code; it also works on headless or remote shells- for CI or automation environments where a browser is unavailable, use
officecli set-keyinstead - run
officecli doctorto diagnose platform connectivity or configuration issues - run
officecli logoutto clear the local account session
The environment check and fix scripts detect anonymous mode and surface a login recommendation automatically. When check-officecli-env.sh reports "auth_mode":"anonymous" with "account_login" in missing_items, the agent should tell the user to run officecli login before proceeding with generation.
Capability Check
When a task involves Office document handling, first check whether the current officecli surface appears to support that workflow.
- before every office task, run
fix-officecli-env.shonce so the agent refreshes the local skill bundle and repairs any missingofficeclisetup - check whether
officecliis available before deciding on the final artifact path - after the repair step, run
check-officecli-env.shto detect whetherofficecliis missing, misconfigured, or already ready - treat exit code
0as ready,10as repairable, and20as blocked - inspect the visible CLI surface first, such as
officecli --helpor relevant subcommand help, before assuming support - use the help output and public product description to judge whether the requested create, modify, or convert workflow is actually supported
- if support is unclear, say that clearly instead of pretending the capability exists
- if refresh or check fails, stop and report the
officeclienvironment error; do not switch to another local Office generation path on your own
Environment Repair
Run fix-officecli-env.sh on every task, not only when the environment looks broken.
- the fix script must refresh the local Codex skill bundle first
- the fix script should install
officecliwhen it is missing, but must not refresh an existing binary unless the host explicitly opts in, for example withOFFICECLI_REFRESH_BINARY=1 - when the user explicitly asks to uninstall
officecli, rununinstall-officecli.sh - if
officecliis missing, the fix script should auto-install it through the public dist installer - if the user previously installed with Homebrew and wants to switch to npm, tell them to run
brew uninstall officecli/homebrew-officecli/officeclifirst; if their formula uses the short name, usebrew uninstall officecli, then runnpm install -g officecli - if generation or license config is missing, ask only for the missing values and let the fix script call the relevant
officecli config ...commands - publish config is required by default so generated files return online preview URLs
- if the user explicitly wants local-only output, set
OFFICECLI_SKIP_PUBLISH_SETUP=1before running the fix script - after repair, rerun
check-officecli-env.shand only proceed when it returns ready - if
check-officecli-env.shreports"auth_mode":"anonymous", tell the user to runofficecli loginbefore generating; do not silently proceed with anonymous trial quotas - when repair fails, surface the fix script's final structured status instead of mixing it with a later readiness check
- if repair still fails, surface the missing items clearly instead of silently switching to another artifact path
Execution Preference
If the capability check indicates that officecli supports the requested Office-file workflow, prefer officecli as the execution path for the final artifact.
- do not silently bypass
officecliwith another local Office-file generation or conversion path whenofficecliappears to support the task - if
officecliis unavailable or fails, state that clearly instead of quietly switching the final artifact path - do not use Node, Python, LibreOffice, pptxgenjs, or custom scripts to generate the final Office file unless the user explicitly approves leaving the
officeclipath - if the capability check suggests that
officeclidoes not support the workflow, or the user explicitly accepts an alternative path after that, the agent can proceed with that alternative
For agent clients, prefer the structured bridge over the human-oriented CLI surface.
- first choice for agent integration is
officecli agent-bridge - do not parse spinner output or human progress lines as a protocol when
agent-bridgeis available - call
initializeorcapabilities/getfirst and cache the returned PPT image capability fields before invoking generation - also cache
capabilities/get -> update; ifavailable=true, prefer surfacingupdate_commandor triggering your own refresh flow instead of parsing human CLI prompts - use
task/invokefor generation requests and consumeeventnotifications for intermediate state - use
task/respondfor follow-up questions instead of writing free-form answers to raw stdin prompts - use
task/cancelfor cancellation andtask/statusas a polling fallback
Tooling Boundary
Python or other tools may still be used for supporting work around Office files.
- inspection, validation, debugging, XML or zip analysis, and artifact diffing are acceptable supporting uses
- those tools should not silently replace
officeclifor the final Office artifact path whenofficecliappears to support the requested workflow - the rule is about routing and final artifact handling, not about banning a specific language or tool for analysis work
Prompting Guidance
When asking an agent to use officecli, include the details that most affect output quality:
- the topic or subject of the file
- whether the task is create, modify, or convert
- the intended audience
- the desired tone or style
- page, section, or slide-count expectations
- whether images should be used, avoided, or left to the default behavior
- the source file and target format when the task is a conversion
- any important constraints such as concise language, executive style, or table-heavy structure
When the task is about setting up or fixing officecli, prefer the explicit config commands:
officecli loginofficecli logoutofficecli whoamiofficecli doctorofficecli set-key./check-officecli-env.sh./fix-officecli-env.sh./uninstall-officecli.shofficecli config statusofficecli config runtimeofficecli config set-runtime hostedofficecli config set-runtime externalofficecli config set-generationofficecli config set-licenseofficecli config set-publishofficecli config set-defaults
Output Expectations
A good officecli request should lead to a finished file artifact, not just suggested content. The skill should first determine whether officecli supports the requested Office-file workflow, then prefer officecli for the final artifact when that support is available.
Do not run PPT scoring automatically after generation unless the user explicitly asks for scoring, review, validation, or quality checking.
- default behavior after generation is delivery of the file artifact
- opt-in scoring path is
officecli score ...oroffice.review/office.score
Agent Protocol Notes
When the caller is an agent or TUI client, the preferred protocol surface is:
- transport:
stdio - framing:
Content-Lengthheaders - control plane:
JSON-RPC 2.0 - preferred tools:
office.prepareandoffice.render - compatibility tool:
office.generate
Minimum method set:
initializecapabilities/getsession/opensession/closetask/invoketask/respondtask/statustask/cancel
Important event types:
task.startedtask.progresstask.questiontask.outputtask.completedtask.failedtask.cancelled
When generating guidance or examples for another agent, prefer the agent-first render flow:
- call
initializeorcapabilities/get - read
document_generation..payload_schema,preferred_tool, andprepare_required - call
office.prepareforreport, or skip directly to rendering forpptx,docx, andxlsx - let the current agent produce the final payload JSON itself
- call
office.renderto validate, assemble, and write the final file - for
img, calloffice.generatewithdocument_type=img;office.renderdoes not support images - fall back to
office.generatefor non-image documents only for compatibility, legacy clients, or OpenClaw-specific flows
Only fall back to officecli new ... when the user clearly wants the human CLI interface.
For all agent clients, use the following image-handling rules:
- read
capabilities/get -> document_generation.pptx.image_support - read
capabilities/get -> image_generationbefore standaloneimgrequests - read
capabilities/get -> document_generation..payload_schema - read
capabilities/get -> update - assume
pptxdefault image behavior fromdefault_enabled, not from hard-coded client assumptions - for standalone
img, useoffice.generate, setratioandreference_imagewhen needed, and do not use local provider configuration - for standalone
img, keep publishing enabled by default when the user wants online access; passpublish=falseonly for local-only output - for standalone
img, surface server-returned balance or quota metadata when present - never parse human update prompts from
officeclistdout whenagent-bridgeis available; use structuredupdatefields instead - to make hosted the default for human CLI generation, run
officecli config set-runtime hosted; to return to local/external generation, runofficecli config set-runtime external - for
report, calloffice.preparefirst and keep the final narrative grounded inworkbook_summaryandbase_report_json - if the user explicitly wants a text-only PPT, pass
enable_images=falseand mentiondisable_flagwhen helpful - if the user asks why a generated PPT has no images, point them to
config_command - if
task.output,task.completed, ortask/statuscontainsresult_meta.image_support.attention_required=true, surface that as a first-class issue instead of burying it in raw warnings - when
result_meta.image_support.reason=image_generation_degraded, explicitly tell the user to checkimage_base_url,image_api_key, andimage_model - keep
warningsfor display, but preferresult_metafor machine decisions
OpenClaw Packaging
This repository also ships an OpenClaw-facing package under skills/openclaw-officecli/.
- use that package for OpenClaw users instead of reusing the Codex-oriented skill directory directly
- the OpenClaw package assumes local same-host deployment with
officecli agent-bridge - OpenClaw install flow is documented in
docs/openclaw-user-quickstart.md
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: officecli
- Source: officecli/officecli
- License: MIT
- Homepage: https://officecli.io
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.