Cli Anything Wps logo

Cli Anything Wps

CommunityPopular
yb2460
cli-anything-wps

WPS Office CLI — JSON数据驱动PPT自动生成 + 命令行操控WPS文字/表格/演示文稿

Overview

Publisheryb2460
Repositoryharness-anything
Skill namecli-anything-wps
Stars
1.9K
Forks
115
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by yb2460 on GitHub. Read the source before you install it.

Installation

Install the Cli Anything Wps AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/yb2460/harness-anything.git /tmp/harness-anything
mkdir -p .claude/skills
cp -r /tmp/harness-anything/cli_anything/wps/skills .claude/skills/cli-anything-wps
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cli Anything Wps in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cli Anything Wps on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cli Anything Wps is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

cli-anything-wps

通过 COM 自动化接口操控 WPS Office 的命令行工具。支持 WPS 文字(Writer)、WPS 表格(Calc)和 WPS 演示(Impress)。

前置条件

  • Windows 操作系统
  • WPS Office(已安装,版本 12.0+)
  • Python 3.10+
  • pywin32pip install pywin32

安装

bash
pip install -e .
cli-anything-wps --help

JSON 数据驱动 PPT 自动生成 ⭐ 生产环境核心工作流

这是最常用的模式:搜数据 → 生成 matplotlib 图表 → 写 JSON → WPS COM 一键生成。

完整流程(6步)

1. 提取模板背景: 模版.pptx → template_bg.png (960x540)
2. WebSearch 搜索数据: 招生分数线/学科排名/招生计划/科研数据
3. matplotlib 生成图表: 柱状图/饼图/折线图/横向柱/气泡图
4. 编写 data.json: 12-15页 elements[] 编排(标题≤4字 + 间距≥24pt)
5. python build_xxx.py: WPS COM 逐页构建
6. 输出: PPTX + PDF 双格式

标准页序

S1 封面 → S2 目录 → S3-S10 内容页(图+表+卡片) → S11 总结卡片 → S12 致谢

元素类型路由

type用途
text文本框
image图片(含matplotlib图表)
table表格
cards_2x32行x3列彩色卡片
cards_1x4_info4列数字统计卡
card_list_wide目录编号列表
tagline_bar页面底部总结条

关键约束 ⚠️

  • 标题与内容间距:标题 y=14 h=40(结束于y≈54),第一个内容元素必须起始于 y≥76-78(≥24pt gap)
  • 标题最多4字,居中,SimHei 40-44pt,品牌色,无装饰线
  • JSON中文引号:文本内引用用「」代替 ""
  • 所有元素不出画布:960×540,y+h≤518
  • WPS COMFill.ForeColor.RGBSaveAs(path, 32)导出PDF
  • 执行前清理taskkill //F //IM wps.exe //T

参考案例

WPS/ 目录下16个项目:

项目页数主题
清华协和/兰州大学/同济医学院/哈工大/重庆大学/南华大学12页各校招生
中山大学/中科大/国科大15页名校招生
复旦大学12页新工科+医学院
南科大肿瘤医院12页联合培养硕博
北大/清华/南科大/华中科大/浙大城市学院9-14页各校介绍
bash
# 完整执行示例
python -c "import zipfile; ..."  # 提取模板
python gen_charts.py              # 生成图表
python -c "import json; json.load(open('data.json','r',encoding='utf-8'))"  # 验证JSON
taskkill //F //IM wps.exe //T
python build_xxx.py               # 构建PPTX+PDF

CLI 命令结构

wps
├── document          # 文档管理: new/open/save/info
├── writer            # 文字: add-paragraph/heading/list/table/image
├── calc              # 表格: set-cell/get-cell/set-range/merge-cells
├── impress           # 演示: add-slide/remove-slide/set-content/add-element
├── style             # 样式: create/modify/list/apply/remove
├── preset            # 设计预设: list/info/apply
├── export            # 导出: render output.pptx -p pptx
└── session           # 会话: status/undo/redo/history

使用示例

bash
# 创建文档
cli-anything-wps document new --type writer --name "报告" -o report.json
cli-anything-wps --project report.json writer add-heading -t "年度报告" -l 1
cli-anything-wps --project report.json export render report.docx -p docx

# JSON模式(Agent使用)
cli-anything-wps --json document new --type writer --name "test"

设计预设

预设配色适用场景
academic深蓝#1A3C8B学术答辩/基金申请
consultant深蓝#003366+亮青咨询报告
business商务蓝#005294会议汇报/课件
tech近黑#0F1423科技/AI/数据报告

质量审查(5维度)

维度检查项阈值
visual字体层级/对比度/留白70分
pedagogy叙事弧/预备知识75分
proofreading拼写/术语/溢出80分
parityPPTX/PDF一致性85分
substance数据准确性/引用90分

Frequently asked questions

What does the Cli Anything Wps AI skill do?

WPS Office CLI — JSON数据驱动PPT自动生成 + 命令行操控WPS文字/表格/演示文稿

Why use Cli Anything Wps on TypingMind?

Because you install it once and use it with any model. Cli Anything Wps is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cli Anything Wps in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/yb2460/harness-anything/tree/master/cli_anything/wps/skills. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cli Anything Wps?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cli Anything Wps?

As many as you like. As long as a model supports skills, you can use Cli Anything Wps with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cli Anything Wps AI skill free?

Yes. It is published on GitHub by yb2460 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇