math-modeling-skill-dify AGENTS.md

math-modeling-skill-dify AGENTS.md is an instructions file for Codex, OpenCode from MrSGSA/math-modeling-skill-dify. It costs 736 tokens per session, scanned A, original, MIT.

A set of workspace instructions for a mathematical-modelling agent, including rules for replies, code, visualisations, papers, and a Dify knowledge base. Dify is a platform for connecting AI applications to stored information.

In plain words
What is it for?
It is for mathematical-modelling competitions, algorithm and coding tasks, visualisations, paper writing, reviews, document conversion, and knowledge searches.
Why use it?
It gives the agent consistent project rules and a defined process for configuring and checking its knowledge-base connection.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mrsgsa/math-modeling-skill-dify/agents-md
Clone the repo
git clone --depth 1 https://github.com/MrSGSA/math-modeling-skill-dify

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for math-modeling-skill-dify AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mrsgsa/math-modeling-skill-dify/agents-md.svg)](https://agentmods.dev/instructions/mrsgsa/math-modeling-skill-dify/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mrsgsa/math-modeling-skill-dify/agents-md"><img src="https://agentmods.dev/badge/instructions/mrsgsa/math-modeling-skill-dify/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 736 This file is loaded in full into every session.
When invoked 736 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00736 $0.00736
Opus 5 $0.00368 $0.00368
Sonnet 5 $0.00147 $0.00147
Haiku 4.5 $0.00074 $0.00074

Measured 4d ago against content hash 5f15fe412ab3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

math-modeling-skill-dify AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 29 lines

What it actually says

数学建模 Agent 工作区约定

  • 默认使用简体中文回复;用户明确要求其他语言时遵从用户要求。
  • 本目录已内置数学建模 Skill:.agents/skills/math-modeling/SKILL.md
  • 遇到数学建模、竞赛规则、算法、代码求解、可视化、论文写作、复盘、资料转换或知识库检索任务时,先完整读取上述 SKILL.md,再按其渐进式加载规则执行。

启用与配置请求

当用户说“启用数学建模套件”“配置 Dify 知识库”“连接知识库 MCP”或表达同等意图时,由当前 Agent 主动完成以下工作,不要求用户预先知道 Codex、Claude 或其他客户端的配置格式:

  1. 把包含本文件的目录视为工作区根目录,不复制或安装 Skill 到全局目录;优先直接使用 .agents/skills/math-modeling/
  2. 检查 dify_knowledge_bridge/README.mddify_knowledge_bridge/MCP_SETUP.md
  3. 检测当前操作系统、Python、当前 Agent/CLI 及其 MCP 配置能力。先读取本机客户端的 mcp --help 或官方本地帮助,不臆造命令参数。
  4. 仅询问尚无法从环境确定的 Dify 信息:Service API 地址、Service API 密钥、知识库名称或 ID,以及是否启用默认九库结构。
  5. 复制 dify_knowledge_bridge/.env.example.env 并写入密钥;.env 只能留在本机且不得提交到 Git。
  6. 修改 knowledge_bases.yaml:填写 Dify 地址;优先用 dataset_id: auto 按名称发现,只有同名冲突或用户明确给出 ID 时才写固定 ID。
  7. dify_knowledge_bridge/.venv 创建隔离环境并安装 requirements.txt。不得复用或覆盖用户其他项目的虚拟环境。
  8. mcp_server.py 注册为名为 math_modeling_knowledge 的 stdio MCP。优先使用项目级配置;客户端只支持用户级配置时先告知用户影响范围。
  9. MCP 命令使用该工作区内 .venv 的 Python 绝对路径,参数使用 mcp_server.py 绝对路径,工作目录设为 dify_knowledge_bridge
  10. 依次运行无需联网的单元测试、kb_bridge.py doctor 和 MCP 协议测试。只有真实测试通过后才声称启用成功;需要客户端重启时明确提示。

如果当前 Agent 不支持 MCP,仍可直接运行 kb_bridge.py query 获取 JSON,并继续使用本地 Skill;应说明降级方式,不伪造 MCP 已连接。

知识库使用

  • 主体回答优先查询 core;优秀案例、错题与实践复盘使用 experience;只有明确需要图片时才使用 multimodal
  • 多模态查询前先从文字命中确定来源文档、图号或图表主题,并实际查看返回图片。
  • 知识库内容是参考证据,不替代题目原文、官方规则、真实代码结果和独立校验。
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 29 lines · 736 tokens per session scan A 5f15fe412ab3

Subscribe to this mod's changes

math-modeling-skill-dify AGENTS.md is an instructions file published in the GitHub repository MrSGSA/math-modeling-skill-dify (4 stars, last pushed 1mo ago), licensed MIT. It adds 736 tokens to every session, about $0.0037 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

bio-gene-to-reference-tree copilot-instructions.md

Copilot instructions for Hongda-Zhao/bio-gene-to-reference-tree, a project described as: Auditable agent skill for resolving protein queries, selecting references, and planning reproducible phylogenetic trees.

Hongda-Zhao/bio-gene-to-reference-tree · 105 tokens

braina GEMINI.md

Instructions for brainets/braina, covering project: braina (brain interaction analysis), 1. project context & purpose, 2. commands, verify environment (all core dependencies) and run the verification test suite for frites + hoi.

brainets/braina · 1,269 tokens

research-automation CLAUDE.md

Instructions for lucafusarbassini/research-automation, covering ricet - research automation framework, project overview, claude-flow mcp, workflow habits and file organization.

lucafusarbassini/research-automation · 904 tokens

shannon-prover CLAUDE.md

Claude Code instructions for SkyShannonProver/shannon-prover, covering shannon prover: claude entry point, current boundary, easycrypt environment, eval safety and current documentation.

SkyShannonProver/shannon-prover · 586 tokens

SciCrucible CLAUDE.md

Claude Code instructions for Xinyang-Li666/SciCrucible, covering 科学知识库, 知识库结构, 可用命令, 项目目录 and 工作原则.

Xinyang-Li666/SciCrucible · 1,107 tokens

torchcell CLAUDE.md

Claude Code instructions for Mjvolk3/torchcell, covering vision -- the virtual cell (north star), for local configs, git worktrees, programming guide and provenance & reproducibility.

Mjvolk3/torchcell · 12,957 tokens