Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| `pptx-generator` | 生成、编辑和读取 PowerPoint 演示文稿。支持用 PptxGenJS 从零创建(封面、目录、内容、分节页、总结页),通过 XML 工作流编辑现有 PPTX,或用 markitdown 提取文本。 | Official |
| `minimax-xlsx` | 打开、创建、读取、分析、编辑或验证 Excel/电子表格文件(.xlsx、.xlsm、.csv、.tsv)。支持通过 XML 模板从零创建 xlsx、使用 pandas 读取分析、零格式损失编辑现有文件、公式重算与验证、专业财务格式化。 | Official |
| `minimax-docx` | 基于 OpenXML SDK(.NET)的专业 DOCX 文档创建、编辑与排版。三条流水线:从零创建新文档、填写/编辑现有文档内容、应用模板格式并通过 XSD 验证门控检查。 | Official |
| `minimax-docx-latex` | 在 DOCX 中插入 LaTeX 格式数学公式。支持 LibreOffice 实时预览,所有公式变量用 $ 包裹(如 $\alpha$、$\sqrt{x+y}$)。 | Official |
| `vision-analysis` | 使用视觉 AI 模型分析、描述和提取图像信息。支持描述、OCR 文字识别、UI 界面审查、图表数据提取和物体检测。基于 MiniMax VL API,OpenAI GPT-4V 作为备选。 | Community |
| `minimax-multimodal-toolkit` | 通过 MiniMax API 生成语音、音乐、视频和图片内容 — MiniMax 多模态使用场景的统一入口。涵盖 TTS(文字转语音、声音克隆、声音设计、多段合成)、音乐(带词歌曲、纯音乐)、视频(文生视频、图生视频、首尾帧、主体参考、模板、长视频多场景)、图片(文生图、图生图含角色参考),以及基于 FFmpeg 的媒体处理(格式转换、拼接、裁剪、提取)。 | Official |
| `minimax-music-gen` | 使用 MiniMax Music API 生成人声歌曲、纯音乐和翻唱。支持基础模式(一句话生成)和强控制模式(编辑歌词、调整 prompt、规划曲式)。内置歌词生成、风格词表、流式播放和迭代反馈。 | Official |
Expand Down
149 changes: 149 additions & 0 deletions skills/minimax-docx-latex/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Contributing to MiniMax Skills

Thank you for your interest in contributing! This document covers PR requirements, skill structure specifications, and development guidelines.

## Pull Request Requirements

### Title Format

Use [Conventional Commits](https://www.conventionalcommits.org/) style:

```
feat(<skill-name>): add new skill for X
fix(<skill-name>): fix YAML frontmatter parsing error
docs: update README skill table
chore: add CI workflow
```

Common prefixes: `feat` (new skill or feature), `fix` (bug fix), `docs` (documentation only), `refactor` (restructure without behavior change), `chore` (tooling, CI, config).

### Scope

**One PR, one purpose.** Each PR should do exactly one of:

- Add a new skill
- Fix a bug in an existing skill
- Improve an existing skill

Do not bundle unrelated changes together.

### PR Description

Every PR must include:

1. **What** — what you added or changed
2. **Why** — the motivation or use case

## Skill Structure

### Directory Layout

```
skills/<skill-name>/
├── SKILL.md # Required — entry point with YAML frontmatter
├── references/ # Optional — detailed reference docs
│ └── *.md
└── scripts/ # Optional — helper scripts
├── *.py
└── requirements.txt # Required if scripts/ exists
```

- The directory name is the skill identifier. Use lowercase `kebab-case` (e.g., `gif-sticker-maker`).
- `SKILL.md` is the only required file. All other files and directories are optional.

### SKILL.md Frontmatter

```yaml
---
name: my-skill # Required — must match directory name
description: > # Required — what this skill does and when to trigger it
One-paragraph description. Include trigger conditions so the agent
knows when to activate this skill (e.g., "Use when the user asks to
create, edit, or format Excel files").
license: MIT # Recommended — defaults to MIT if omitted
metadata: # Recommended
version: "1.0"
category: productivity # e.g., frontend, mobile, productivity, creative
sources:
- Relevant documentation or standards
---
```

**Required fields:** `name`, `description`

- `name` must exactly match the directory name
- `description` must clearly state trigger conditions — this is what the agent uses to decide whether to load your skill

**Recommended fields:** `license`, `metadata` (version, category, sources)

### No Hardcoded Secrets

**Never hardcode API keys, tokens, or credentials in any file.**

If your skill involves calling an external API, instruct the agent to read credentials from environment variables. Follow the pattern established by existing skills:

```python
API_KEY = os.getenv("MINIMAX_API_KEY")
if not API_KEY:
raise SystemExit("ERROR: MINIMAX_API_KEY is not set.\n export MINIMAX_API_KEY='your-key'")
```

Your `SKILL.md` should document the required environment variables as a prerequisite. See `frontend-dev/references/env-setup.md` for a good example.

### README Sync

When adding a new skill, update both `README.md` and `README_zh.md` to include your skill in the skill table. Community-submitted skills should set the Source column to `Community`.

## Guidelines

The following are not hard blockers, but PRs that follow these guidelines will be reviewed and merged faster.

### 1. Skill Scope — Avoid Overlap

Before creating a new skill, check existing skills for functional overlap. If your feature could be an extension of an existing skill, prefer extending over creating a new one.

In your PR description, briefly explain how your skill differs from related existing skills. For example, if you are adding a voice synthesis skill, clarify how it relates to the TTS capabilities already in `frontend-dev`.

### 2. File Size Awareness

Skills are loaded into the agent's context window. Every token counts.

- Keep individual `.md` files focused and concise
- If a reference document grows very large, split it into logical parts (see `minimax-docx/references/openxml_encyclopedia_part{1,2,3}.md` for an example)
- Avoid embedding large data blobs (base64 images, full API response dumps) directly in Markdown files
- Prefer linking to external resources over inlining lengthy content

### 3. Script Standards

If your skill includes helper scripts (typically in a `scripts/` directory):

- Include a shebang line (e.g., `#!/usr/bin/env python3`)
- Provide a `requirements.txt` listing all dependencies
- Handle errors gracefully — fail with a clear message rather than a raw traceback
- Document script usage in `SKILL.md` or a reference file

### 4. Language and Encoding

- Skill names and file names: ASCII only, `kebab-case`
- SKILL.md content and code should be written in English
- Reference docs are recommended to be in English
- All files must be UTF-8 encoded

## Review Process

You can run the validation script locally to check part of the requirements before submitting:

```bash
python .claude/skills/pr-review/scripts/validate_skills.py
```

You can also use the [pr-review skill](./.claude/skills/pr-review/SKILL.md) to let your AI coding agent assist with the review.

1. Submit your PR following the requirements above
2. At least one maintainer will review
3. Address review feedback
4. Once approved, a maintainer will merge

## Questions?

Open an issue if you have questions about contributing. We're happy to help.
36 changes: 36 additions & 0 deletions skills/minimax-docx-latex/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Credits & Acknowledgments

MiniMax Skills builds upon ideas and work from the open-source community. We are grateful to the following projects and authors whose contributions helped shape skills in this repository.

## frontend-dev

The design engineering framework — including the design-variance system, motion recipes, card archetypes, color rules, and forbidden-pattern checklist — is derived from and inspired by:

- **[taste-skill](https://github.com/Leonxlnx/taste-skill)** by [Leonxlnx (Leon Lin)](https://github.com/Leonxlnx) — Anti-Slop Frontend design engineering skill framework.

The visual art section — including the philosophy-first workflow, static/interactive art modes, viewer template, and generator template — is derived from:

- **[canvas-design](https://github.com/anthropics/skills/tree/main/skills/canvas-design)** by Anthropic (Andi Brae) — Philosophy-first static visual art workflow. [Apache 2.0 License](./LICENSES/Apache-2.0.txt).
- **[algorithmic-art](https://github.com/anthropics/skills/tree/main/skills/algorithmic-art)** by Anthropic (Andi Brae) — Philosophy-first generative art workflow with p5.js. [Apache 2.0 License](./LICENSES/Apache-2.0.txt).

MiniMax extended the original frameworks with MiniMax API asset generation, copywriting modules (AIDA/PAS/FAB), multi-framework support, accessibility guidelines, and additional motion presets.

## react-native-dev

The core UI patterns, navigation, animations, and styling guidance is derived from:

- **[expo/skills](https://github.com/expo/skills/tree/main/plugins/expo/skills)** by [Expo](https://github.com/expo) (Kudo Chien / 650 Industries) — Expo development skills including building-native-ui. MIT License.

MiniMax extended the original with state management (Zustand/Jotai), forms, networking, testing, performance profiling, native capabilities, and engineering/CI/CD guidance.

## flutter-dev

The widget patterns, state management (Riverpod/Bloc), GoRouter navigation, performance optimization, and testing strategies are derived from:

- **[flutter-expert](https://github.com/Jeffallan/claude-skills/blob/main/skills/flutter-expert/SKILL.md)** by [Jeff Smolinski (@Jeffallan)](https://github.com/Jeffallan) — Flutter expert skill for Claude. MIT License.

MiniMax restructured the workflow-based guide into a reference-based format and expanded the reference system with additional topics.

---

If you believe your work has been included in this repository without proper attribution, please [open an issue](https://github.com/MiniMax-AI/skills/issues) and we will address it promptly.
21 changes: 21 additions & 0 deletions skills/minimax-docx-latex/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 MiniMax

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
110 changes: 110 additions & 0 deletions skills/minimax-docx-latex/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
name: minimax-docx-latex
license: MIT
metadata:
version: "1.0.0"
category: document-processing
author: MiniMaxAI
description: >
在 DOCX 中插入 LaTeX 格式数学公式。核心发现:LibreOffice 打开 DOCX 时不锁定文件,
minimax-docx 可以同时修改,实现实时预览编辑。
默认规则:所有公式变量必须用 $ 包裹,如 $\alpha$、$\beta$、$\sqrt{x+y}$。
triggers:
- 添加公式
- 插入 latex
- latex 公式
- docx 公式
- 修改 docx
- 转换 markdown 到 docx
---

# minimax-docx-latex

在 DOCX 中插入 LaTeX 格式的数学公式。

## 默认规则

**重要:所有公式变量必须用 $ 包裹**

| 类型 | 正确 | 错误 |
|------|------|------|
| 单变量 | $\alpha$ | \alpha |
| 分数 | $\frac{x}{y}$ | \frac{x}{y} |
| 开方 | $\sqrt{x+y}$ | \sqrt{x+y} |
| 积分 | $\int_{a}^{b} f(x) dx$ | \int_{a}^{b} f(x) dx |
| 求和 | $\sum_{i=1}^{n} i^2$ | \sum_{i=1}^{n} i^2 |
| 矩阵 | $\begin{pmatrix} a & b \end{pmatrix}$ | \begin{pmatrix} a & b \end{pmatrix} |
| 独立公式 | $$\int_{0}^{\infty} e^{-x^2} dx$$ | $$\int_{0}^{\infty} e^{-x^2} dx$$ |

**示例:**
- ✅ $\alpha + \beta = \gamma$
- ❌ \alpha + \beta = \gamma

## 核心发现

| 软件 | 打开 DOCX 时 | 外部程序能同时修改? |
|------|-------------|---------------------|
| Word | 锁定文件 | ❌ 否 |
| LibreOffice | **不锁定** | ✅ **可以** |

**原理:**
- DOCX 本质是 ZIP 包(包含 word/document.xml)
- LibreOffice 打开时显示内存缓存,不影响磁盘文件
- minimax-docx 直接操作磁盘上的 ZIP 包
- 外部修改后,LibreOffice 按 Ctrl+Shift+R 刷新即可看到变化

## 使用流程

### 1. 启动 LibreOffice(保持连接)

```bash
# 方式 A:图形界面打开(推荐)
libreoffice /path/to/document.docx

# 方式 B:命令行 headless 模式
libreoffice --headless --norestore \
--accept="socket,host=localhost,port=2003;urp;" \
--nofirststartwizard &
```

### 2. 用 minimax-docx 修改 DOCX

```bash
# 在 LibreOffice 打开文件的同时,直接修改
dotnet run --project MiniMaxAIDocx.Cli -- edit replace-text \
--input document.docx \
--output document.docx \
--search "OLD_TEXT" \
--replace "$\alpha + \beta$"
```

### 3. 刷新预览

在 LibreOffice 中按 **Ctrl+Shift+R**(或 文件 → 重新装入)

## LaTeX 公式格式

Word/LibreOffice 支持的 LaTeX 公式语法:

| 类型 | 语法 | 示例 |
|------|------|------|
| 行内公式 | `$...$` | `$x^2 + y^2$` |
| 独立公式 | `$$...$$` | `$$\int_0^\infty e^{-x} dx$$` |
| 分数 | `\frac{分子}{分母}` | `$\frac{a}{b}$` |
| 上标 | `^{指数}` | `$x^{2}$` |
| 下标 | `_{下标}` | `$x_{i}$` |
| 平方根 | `\sqrt{内容}` | `$\sqrt{x+y}$` |
| 求和 | `\sum_{下标}^{上标}` | `$\sum_{i=1}^{n}$` |
| 积分 | `\int_{下标}^{上标}` | `$\int_{a}^{b}$` |
| 无穷 | `\infty` | `$\infty$` |
| 希腊字母 | `\alpha \beta \gamma` | `$\alpha + \beta$` |

## 完整公式库

见 `references/formula_library.md`

## 限制

- 仅 LibreOffice 支持实时预览(Word 会锁定)
- LaTeX 文本格式,非渲染图片
- 如需渲染,需在 Office 软件中手动转换格式
40 changes: 40 additions & 0 deletions skills/minimax-docx-latex/references/formula_library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# LaTeX 公式库

## 常用公式

### 基础运算
- `$\frac{x}{y}$` - 分数
- `$x^{2}$` - 平方
- `$x_{i}$` - 下标
- `$\sqrt{x}$` - 平方根
- `$\pm$` - 加减号
- `$\times$` - 乘号
- `$\div$` - 除号

### 代数
- `$a^2 + b^2 = c^2$` - 勾股定理
- `$\frac{-b \pm \sqrt{b^2-4ac}}{2a}$` - 一元二次方程求根公式
- `$\binom{n}{k} = \frac{n!}{k!(n-k)!}$` - 组合数

### 微积分
- `$\int_{a}^{b} f(x) dx$` - 定积分
- `$\int_{0}^{\infty} e^{-x^2} dx$` - 高斯积分
- `$\sum_{i=1}^{n} i^2$` - 求和
- `$\lim_{x \to \infty} \frac{1}{x}$` - 极限
- `$\frac{dy}{dx}$` - 导数
- `$\frac{\partial f}{\partial x}$` - 偏导

### 矩阵
- `$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$` - 2×2 矩阵
- `$\det(A-\lambda I) = 0$` - 特征方程
- `$A^{-1}$` - 逆矩阵

### 物理
- `$E = mc^2$` - 质能方程
- `$e^{i\pi} + 1 = 0$` - 欧拉公式
- `$\Delta x \cdot \Delta p \geq \frac{\hbar}{2}$` - 不确定性原理
- `$i\hbar\frac{\partial}{\partial t}\Psi = \hat{H}\Psi$` - 薛定谔方程
- `$\lambda = \frac{h}{p}$` - 德布罗意波长

### 希腊字母
`$\alpha$ $\beta$ $\gamma$ $\delta$ $\theta$ $\pi$ $\sigma$ $\omega$ $\hbar$ $\nabla$
Loading