Content
# Math Modeling Agent Workspace Suite
This repository is not a global plugin exclusively for Codex, but rather an Agent suite that can be used directly as a working directory. It provides project-level instructions, math modeling skills, and a Dify knowledge bridge, suitable for Codex, Claude Code, and other agents that can read project descriptions or connect to stdio MCP.
## Directory Structure
```text
math-modeling-skill-dify/
├─ AGENTS.md # General Agent Workspace Instructions
├─ CLAUDE.md # Claude Code Entrance
├─ .agents/skills/math-modeling/ # Complete Math Modeling Skill
└─ dify_knowledge_bridge/ # Dify 8 text libraries + 1 multimodal library retrieval bridge
```
## The Simplest Usage
1. Download and unzip Release.
2. Open the unzipped folder directly as a working directory; you can also merge its contents into an existing project root directory. If the existing project already has `AGENTS.md` or `CLAUDE.md`, merge the instructions instead of directly overwriting them.
3. Launch your commonly used Agent.
4. Send:
```text
Please read the AGENTS.md in this workspace; enable the math modeling suite and guide me to configure the Dify knowledge base.
```
Claude Code will also obtain the same entrance from `CLAUDE.md`.
The Agent should complete the following tasks on its own:
- Read `.agents/skills/math-modeling/SKILL.md`;
- Detect whether it is currently Codex, Claude Code, or another client;
- Ask for the Dify Service API address, key, and knowledge base name;
- Create a dedicated `.venv` for this project;
- Configure the nine-library YAML;
- Register the project-level stdio MCP according to the current client's support;
- Run unit tests, connection diagnostics, and MCP protocol tests.
You can use the local math modeling skill without Dify; in this case, knowledge base retrieval will degrade to unavailability, but modeling, programming, Office/PDF tools, and paper workflows will remain.
## Manual Configuration Entrance
For troubleshooting or manual operations, read:
- `dify_knowledge_bridge/README.md`: Dify address, key, and nine-library YAML;
- `dify_knowledge_bridge/MCP_SETUP.md`: General stdio MCP parameters and client adaptation principles;
- `.agents/skills/math-modeling/SKILL.md`: Complete modeling workflow.
## Basic Testing
```powershell
cd .\dify_knowledge_bridge
python -m venv .venv
.\.venv\Scripts\python -m pip install -r requirements.txt
.\.venv\Scripts\python -m unittest test_kb_bridge.py
```
After configuring `.env` and `knowledge_bases.yaml`, run:
```powershell
.\.venv\Scripts\python .\kb_bridge.py doctor
.\.venv\Scripts\python .\test_mcp_protocol.py
```
## Security and Licensing
`.env`, virtual environment, cache, and query results are all ignored by Git. Do not submit real Dify keys to the repository.
The code and skill descriptions are released under the MIT License; the referenced competition rules, papers, images, templates, and third-party tools still follow their respective licenses.