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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Development skills for AI coding agents. Plug into your favorite AI coding tool
| `minimax-xlsx` | Open, create, read, analyze, edit, or validate Excel/spreadsheet files (.xlsx, .xlsm, .csv, .tsv). Covers creating new xlsx from scratch via XML templates, reading and analyzing with pandas, editing existing files with zero format loss, formula recalculation, validation, and professional financial formatting. | Official |
| `minimax-docx` | Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET). Three pipelines: create new documents from scratch, fill/edit content in existing documents, or apply template formatting with XSD validation gate-check. | Official |
| `vision-analysis` | Analyze, describe, and extract information from images using vision AI models. Supports describe, OCR, UI mockup review, chart data extraction, and object detection. Powered by MiniMax VL API with OpenAI GPT-4V fallback. | Community |
| `markdown-mcp` | MCP tool for efficient markdown file reading and editing. Replace Python scripts with direct file operations — get file info, grep, read sections, replace text, insert lines via MCP tools. Python stdlib only, no dependencies. | Community |
| `context-maintainer` | Maintain persistent project context across AI agent sessions. Creates and updates `.context/` files (goals, architecture, decisions, active files, stale files). Triggers on git commit, context threshold, or session end. Gitignored by default. | Community |
| `context-search` | Search and retrieve persistent context across sessions. Works with `.context/` files — get active context, search decisions, find file history. Optional QMD integration for semantic search. Export to Obsidian vault supported. | Community |
| `minimax-multimodal-toolkit` | Generate voice, music, video, and image content via MiniMax APIs — the unified entry for MiniMax multimodal use cases. Covers TTS (text-to-speech, voice cloning, voice design, multi-segment), music (songs, instrumentals), video (text-to-video, image-to-video, start-end frame, subject reference, templates, long-form multi-scene), image (text-to-image, image-to-image with character reference), and media processing (convert, concat, trim, extract) via FFmpeg. | Official |

## Installation
Expand Down
13 changes: 8 additions & 5 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,28 @@

> **Beta** — 本项目正在积极开发中。技能内容、API 和配置格式可能会在不另行通知的情况下变更。欢迎反馈和贡献。

面向 AI 编程工具的开发技能库。接入你常用的 AI 编程工具,获得结构化的生产级质量的前端、全栈、Android、iOS 和着色器开发指导。
面向 AI 编程工具的开发技能库。接入你常用的 AI 编程工具,获得结构化的生产级质量的前端、全栈、Android、iOS 和着色器开发指导。

## 技能列表

| 技能                                 | 简介 | 来源 |
|---------------------------------------|------|------|
| `frontend-dev` | 全栈前端开发,融合高级 UI 设计、电影级动画(Framer Motion、GSAP)、通过 MiniMax API 生成媒体资源(图片、视频、音频音乐、TTS)、基于 AIDA 框架的说服力文案、生成艺术(p5.js、Three.js、Canvas)。技术栈:React / Next.js、Tailwind CSS。 | Official |
| `frontend-dev` | 全栈前端开发,融合高级 UI 设计、电影级动画(Framer Motion、GSAP)、通过 MiniMax API 生成媒体资源(图片、视频、音频音乐、TTS)、基于 AIDA 框架的说服力文案、生成艺术(p5.js、Three.js、Canvas)。技术栈:React / Next.js、Tailwind CSS。 | Official |
| `fullstack-dev` | 全栈后端架构与前后端集成。REST API 设计、认证流程(JWT、Session、OAuth)、实时功能(SSE、WebSocket)、数据库集成(SQL / NoSQL)、生产环境加固与发布清单。引导式工作流:需求收集 → 架构决策 → 实现。 | Official |
| `android-native-dev` | 基于 Material Design 3 的 Android 原生应用开发。Kotlin / Jetpack Compose、自适应布局、Gradle 配置、无障碍(WCAG)、构建问题排查性能优化与动效系统。 | Official |
| `android-native-dev` | 基于 Material Design 3 的 Android 原生应用开发。Kotlin / Jetpack Compose、自适应布局、Gradle 配置、无障碍(WCAG)、构建问题排查性能优化与动效系统。 | Official |
| `ios-application-dev` | iOS 应用开发指南,涵盖 UIKit、SnapKit 和 SwiftUI。触控目标、安全区域、导航模式、Dynamic Type、深色模式、无障碍、集合视图,符合 Apple HIG 规范。 | Official |
| `flutter-dev` | Flutter 跨平台开发指南,涵盖 Widget 模式、Riverpod/Bloc 状态管理、GoRouter 导航、性能优化与测试策略。 | Official |
| `react-native-dev` | React Native 与 Expo 开发指南,涵盖组件、样式、动画、导航、状态管理、表单、网络请求、性能优化、测试、原生能力及工程化(项目结构、部署、SDK 升级、CI/CD)。 | Official |
| `shader-dev` | 全面的 GLSL 着色器技术,用于创建惊艳的视觉效果 — 光线行进、SDF 建模、流体模拟、粒子系统、程序化生成、光照、后处理等。兼容 ShaderToy。 | Official |
| `gif-sticker-maker` | 将照片(人物、宠物、物品、Logo)转换为 4 张带字幕的动画 GIF 贴纸。Funko Pop / Pop Mart 盲盒风格,基于 MiniMax 图片与视频生成 API。 | Official |
| `minimax-pdf` | 基于 token 化设计系统生成、填写和重排 PDF 文档。支持三种模式:CREATE(从零生成,15 种封面风格)、FILL(填写现有表单字段)、REFORMAT(将已有文档重排为新设计)。排版与配色由文档类型自动推导,输出即可打印。 | Official |
| `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-xlsx` | 打开、创建、读取分析、编辑或验证 Excel/电子表格文件(.xlsx、.xlsm、.csv、.tsv)。支持通过 XML 模板从零创建 xlsx、使用 pandas 读取分析、零格式损失编辑现有文件、公式重算与验证专业财务格式化。 | Official |
| `minimax-docx` | 基于 OpenXML SDK(.NET)的专业 DOCX 文档创建、编辑与排版。三条流水线:从零创建新文档、填写/编辑现有文档内容应用模板格式并通过 XSD 验证门控检查。 | Official |
| `vision-analysis` | 使用视觉 AI 模型分析、描述和提取图像信息。支持描述、OCR 文字识别、UI 界面审查、图表数据提取和物体检测。基于 MiniMax VL API,OpenAI GPT-4V 作为备选。 | Community |
| `markdown-mcp` | 高效读取和编辑 Markdown 文件的 MCP 工具。无需编写 Python 脚本——通过 MCP 工具直接获取文件信息、搜索、读取章节、替换文本、插入行。纯 Python 标准库,无依赖。 | Community |
| `context-maintainer` | 在 AI Agent 会话之间维护持久化项目上下文。创建并更新 `.context/` 文件(目标、架构、决策、活动文件、陈旧文件)。在 git 提交、上下文阈值或会话结束时触发。默认加入 .gitignore。 | Community |
| `context-search` | 在会话之间搜索和检索持久化上下文。与 `.context/` 文件协同工作——获取活跃上下文、搜索决策、查找文件历史。可选 QMD 集成实现语义搜索。支持导出到 Obsidian vault。 | Community |
| `minimax-multimodal-toolkit` | 通过 MiniMax API 生成语音、音乐、视频和图片内容 — MiniMax 多模态使用场景的统一入口。涵盖 TTS(文字转语音、声音克隆、声音设计、多段合成)、音乐(带词歌曲、纯音乐)、视频(文生视频、图生视频、首尾帧、主体参考、模板、长视频多场景)、图片(文生图、图生图含角色参考),以及基于 FFmpeg 的媒体处理(格式转换、拼接、裁剪、提取)。 | Official |

## 安装
Expand Down
209 changes: 209 additions & 0 deletions skills/context-maintainer/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
---
name: context-maintainer
description: >
Maintain persistent project context across AI agent sessions using .context/ files.
Load this skill when: the user asks you to "understand this project" or "get context";
you start a new session and need to understand the project; you complete significant work
and need to record it; the user mentions goals, decisions, or architecture; or you
encounter unfamiliar code and need context.
Triggers: understand this project, get context, maintain context, update goals,
record decision, log this change, what are the current goals, what's the architecture,
what have we done so far.
Also use when: context window is ~70% full (trigger checkpoint); you do a git commit;
you modify more than 30 lines across files; user asks about project structure or goals.
license: MIT
metadata:
version: "1.0"
category: productivity
tools: context-maintainer-mcp
---

# Context Maintainer

Maintain persistent context files in `.context/` that survive across sessions. No more re-scanning the repo every new chat.

## Core Files

`.context/` lives in the project root and contains:

| File | What it holds | When to read/write |
|---|---|---|
| `project.md` | Project overview, key files | Read at session start |
| `architecture.md` | System design, data flow | Read on demand |
| `decisions.md` | Choices made and why | Write when decision made |
| `active-files.md` | Files being worked on + freshness | Update after significant changes |
| `stale-files.md` | Deprecated approaches | Write when flagging stale |
| `goals.md` | Long-term + short-term goals | Read at start, update on checkpoint |
| `relationships.md` | Key dependencies | Read on demand |
| `recent-commits.md` | Last 10 git commits | Update after commits |

## Prerequisites

The `context-maintainer-mcp` MCP server must be installed and configured.

**OpenCode** — add to `~/.config/opencode/opencode.json` or `package.json`:
```json
{
"mcp": {
"context-maintainer": {
"type": "local",
"command": ["uvx", "context-maintainer-mcp"],
"enabled": true
}
}
}
```

Restart the app. Verify with `/mcp` — `context-maintainer` should appear.

## MCP Tools

| Tool | When to call |
|---|---|
| `init_context` | User asks "understand this project" |
| `update_context` | After git commit OR significant change (>30 lines) |
| `checkpoint_goals` | Context window ~70% full OR session end |
| `flag_stale` | When a file/approach becomes outdated |
| `promote_stale` | When a stale file becomes relevant again |
| `gitignore_add` | After init_context (default: context is gitignored) |
| `gitignore_remove` | User wants to commit .context/ to repo |
| `gitignore_status` | Check if .context/ is tracked |

---

## When to Update Context

**NEVER update after every small edit.** Context updates are for significant milestones.

**Call `update_context` when:**
- After a `git add + commit` — a commit signals meaningful work is done
- You modified > 30 lines across one or more files in one session
- You add a new file that changes project structure
- You remove a significant file or feature

**Call `checkpoint_goals` when:**
- Context window is ~70% full (before it runs out)
- User says "save my progress" or ends the session
- You want to summarize what you've done before continuing

**Call `flag_stale` when:**
- A file is deprecated and replaced by a new approach
- A previous decision is invalidated by a new one
- An approach described in active-files.md is no longer relevant

---

## Workflows

### New Project — First Time

```
1. Call init_context(path="/path/to/project")
→ Creates .context/ with all files + recent commits
2. Call gitignore_add(path="/path/to/project")
→ Adds .context/ to .gitignore (context is personal by default)
3. Read goals.md — update it if user has stated goals
4. Present a brief summary of what was created
```

### New Session — Resume Work

```
1. Call get_active_context(path="/path/to/project") [via context-search]
OR read goals.md + project.md directly
2. Ask: "What are the current goals?" (read goals.md)
3. Continue work
4. Call update_context when significant changes happen
```

### After Significant Change (e.g., after git commit)

```
1. Call update_context(path, file="path/to/file.md", summary="What changed")
→ Updates active-files.md with freshness + git history
2. If a design decision was made, also call:
→ decisions.md entry (manually write, not via tool)
3. Call checkpoint_goals if context is getting full
```

### Before Context Runs Out (~70% window)

```
1. Call checkpoint_goals(path, short_term=["current work"], long_term=["original goals"])
→ Updates goals.md with session history
2. This frees context space — the files persist and will be read next session
```

### Recording a Decision

```
1. Read decisions.md
2. Append entry:
## [YYYY-MM-DD] Decision Title
**Status:** Accepted
**Context:** Problem or question
**Decision:** What was chosen
**Consequences:** What changed
```

---

## Goals.md Format

```markdown
---
last_updated: 2026-04-04T18:30:00Z
---

# Long-term Goals
- Migrate MPI halo exchange to non-blocking
- Add benchmarking suite

# Short-term Goals
- [ACTIVE] Fix MPI halo exchange bug
- [DONE] Add Change 1a timing to opt_log.md

# Session History
- [2026-04-04] Project context initialized
- [2026-04-05] Added Change 1a: MPI_Init timing
```

---

## Gitignore — Default: Excluded

`.context/` is added to `.gitignore` by default (not committed). This keeps personal context private.

**To share context with the team:**
```
Call gitignore_remove(path) # removes .context/ from .gitignore
```
Then commit `.context/` to the repo.

**To keep context private:**
```
Call gitignore_add(path) # re-adds .context/ to .gitignore
```

---

## Context Window Management

The agent should track its own context usage. When it notices context is ~70% full:

1. Call `checkpoint_goals` with current short-term and long-term goals
2. Summarize in-session progress into goals.md Session History
3. Continue working — next session will read goals.md and resume

**Key rule:** Never let context run out mid-task. Checkpoint proactively.

---

## Anti-Patterns

- ❌ Calling `update_context` after every file edit
- ❌ Writing full file contents into chat instead of using context files
- ❌ Ignoring goals — always know what the user is trying to achieve
- ❌ Not checkpointing before context runs out
- ❌ Committing `.context/` to git by default (personal context)
- ❌ Let stale files accumulate without flagging them
12 changes: 12 additions & 0 deletions skills/context-maintainer/scripts/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "context-maintainer-mcp"
version = "1.0.0"
description = "MCP server for maintaining persistent .context/ files across AI agent sessions"
requires-python = ">=3.9"
dependencies = []

[project.scripts]
context-maintainer-mcp = "server:main"

[tool.upload]
distributions = ["sdist", "wheel"]
1 change: 1 addition & 0 deletions skills/context-maintainer/scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# No external dependencies — Python stdlib only
Loading