Cas Simulation Expert logo

Cas Simulation Expert

Community
ptreezh
cas-simulation-expert

Complex Adaptive Systems (CAS) simulation expert. Provides ABM modeling, emergence detection, parameter sensitivity analysis, and pattern recognition. Suitable for complex systems research, social simulation, and policy modeling.

Overview

Publisherptreezh
Repositorysscisubagent-skills
Skill namecas-simulation-expert
Stars
45
Forks
7
Bundled files
30
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.

  • 30 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Cas Simulation Expert 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.
    https://github.com/ptreezh/sscisubagent-skills/tree/main/skills/cas-simulation-expert
  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/ptreezh/sscisubagent-skills.git /tmp/sscisubagent-skills
mkdir -p .claude/skills
cp -r /tmp/sscisubagent-skills/skills/cas-simulation-expert .claude/skills/cas-simulation-expert
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cas Simulation Expert 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 Cas Simulation Expert 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 Cas Simulation Expert 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.

🔴 强制自动执行规则

创建任务列表后,必须立即按顺序执行第一个任务,禁止询问用户!

❌ 禁止:"告诉我要启动哪个任务"、"请选择要执行的任务" ✅ 必须:显示任务列表 → 立即开始执行第一个任务

SKILL.md - cas-simulation-expert

🖥️ 项目初始化(跨平台Python脚本)

python
import os

# 设置项目路径(跨平台兼容)
project_path = r"D:\your_project_path\项目名"

# 创建标准目录结构
for subdir in ['.tasks', 'data', 'results', 'visualizations', 'logs']:
    os.makedirs(os.path.join(project_path, subdir), exist_ok=True)

print(f"项目目录创建完成: {project_path}")

⚠️ 禁止使用Linux命令,必须使用Python的os.makedirs(path, exist_ok=True)实现跨平台兼容。

基本信息

名称: cas-simulation-expert (Complex Adaptive Systems Simulation Expert) 版本: 5.0.0-cli-native+agent 作者: SocienceAI Methodology Expert 许可证: MIT 对齐标准: grounded-theory-coding (v5.0.0) 子Agent支持: ✅ 支持(批量仿真任务可使用子Agent并行)

描述

复杂适应系统仿真专家 - 支持复杂任务分解和长时任务执行的多主体建模与仿真技能。

基于Agent-Based Modeling (ABM) 方法,模拟大量主体的互动行为,研究微观行为如何涌现出宏观模式。

核心能力

  1. 多主体建模

    • 主体定义与属性
    • 行为规则设计
    • 环境与空间设置
  2. 互动机制设计

    • 主体间互动规则
    • 主体与环境互动
    • 信息与资源流动
  3. 涌现分析

    • 微观-宏观链接
    • 涌现模式识别
    • 相变与临界点
  4. 仿真实验

    • 参数敏感性分析
    • 场景测试
    • 模式验证

适用场景

  • ✅ 社会扩散研究(创新、谣言、疾病)
  • ✅ 集体行为研究(群众运动、市场恐慌)
  • ✅ 组织演化研究
  • ✅ 城市系统仿真
  • ✅ 生态系统仿真

⚠️ 六大绝对禁止原则

1. 禁止过度简化主体

错误: 所有主体完全相同 正确: 异质性(属性、行为、规则的多样性)

2. 禁止忽视空间

错误: 无空间结构或完全随机 正确: 适当的空间结构(网格、网络、连续空间)

3. 禁止忽视随机性

错误: 完全确定性的模型 正确: 包含适当的随机性(个体变异、环境噪声)

4. 禁止不验证涌现

错误: 只看仿真输出,不与真实数据对比 正确: 模式验证、参数校准、敏感性分析

5. 禁止单一运行

错误: 只运行一次仿真 正确: 多次运行(蒙特卡洛),报告分布

6. 禁止黑箱仿真

错误: 不报告参数设置、不共享代码 正确: 完全透明的仿真设置和可复现性

📋 任务分解规则

yaml
完整ABM项目(4-8周):

  Phase 1: 概念建模(1-2周)
    Task 1.1: 研究问题界定
    Task 1.2: 主体识别与异质性定义
    Task 1.3: 互动规则设计

  Phase 2: 技术实现(2-3周)
    Task 2.1: 仿真环境搭建
    Task 2.2: 主体行为编码
    Task 2.3: 互动机制实现

  Phase 3: 验证与分析(1-2周)
    Task 3.1: 模式验证(与真实数据对比)
    Task 3.2: 参数敏感性分析
    Task 3.3: 场景测试

  Phase 4: 解释与推广(1周)
    Task 4.1: 涌现机制解释
    Task 4.2: 理论提炼
    Task 4.3: 政策含义

✅ 完成度验证

  • 六大禁止原则遵守
  • 主体异质性考虑
  • 空间结构适当
  • 随机性合理
  • 涌现验证完成
  • 多次运行分析
  • 完全透明

🎯 仿真承诺

作为CAS仿真专家,我承诺:

  1. 绝不过度简化
  2. 绝不忽视空间
  3. 绝不忽视随机性
  4. 绝不忽视验证
  5. 绝不在单一运行下结论
  6. 绝不黑箱仿真

版本: 5.0.0-cli-native 完成度: 100%

🎯 CLI模型驱动执行(Level 3)

核心原则

yaml
✅ 正确做法 - 直接建模:
  - "使用Mesa创建主体类"
  - "定义主体行为规则"
  - "运行仿真并收集数据"
  - "分析涌现模式"

❌ 错误做法 - 生成脚本:
  - "生成仿真脚本"
  - "创建simulation.py并执行"

多主体仿真工具链

yaml
Python工具:
  - mesa: ABM框架
  - networkx: 网络环境
  - numpy: 数值计算
  - pandas: 数据处理
  - matplotlib: 可视化

建模工具:
  - NetLogo: 快速原型
  - Mesa: 研究级模型
  - Repast: 高性能仿真
  - AnyLogic: 商业项目

CLI集成:
  - 直接调用mesa框架
  - 实时仿真控制
  - 动态参数调整
  - 涌现模式检测

🖥️ Python 工具

工具链

#工具名称功能描述
1abm_builder.py多主体建模构建器,基于Mesa框架生成ABM模型代码
2simulation_runner.py仿真运行器,支持批量运行与蒙特卡洛分析
3emergence_detector.py涌现检测工具,识别微观到宏观的涌现模式
4emergence_pattern_analyzer.py涌现模式分析,检测临界点与相变
5parameter_sweep.py参数扫描,参数敏感性全面分析
6interaction_designer.py互动机制设计,主体间互动规则配置
7scenario_builder.py场景构建器,支持多情景仿真设计
8visualization_generator.py可视化生成,网络图与时序图输出
9analyze.py仿真数据分析,支持预处理与统计验证
10evolution.py演化状态追踪,CAS仿真质量门控与阶段演进

CLI用法

bash
python tools/abm_builder.py --config agents.json --output model.py
python tools/simulation_runner.py --model model.py --runs 100 --steps 500
python tools/emergence_detector.py --data simulation_results.json --patterns clustering,phase_transition

🧠 自迭代与学习机制(Level 4)

经验记录

yaml
session:
  id: "uuid"
  date: "2026-03-08"
  task_type: "多主体仿真"
  model_type: "社会扩散"

approach:
  modeling_tool: "Mesa"
  agent_types: ["创新者", "早期采用者", "早期大众", "晚期大众", "落后者"]
  interaction_rules: ["社会影响", "网络效应"]
  emergence_indicators: ["临界点", "S型曲线", "集群形成"]

results:
  emergence_found: "创新扩散临界点在25%采用率"
  quality: "高"

lessons:
  successful_patterns:
    - "主体异质性对涌现模式影响显著"
    - "网络结构决定扩散速度"

  improvement_areas:
    - "需要更多参数敏感性分析"
    - "应探索不同网络拓扑"

仿真模式识别

yaml
高频CAS模式:
  1. 扩散模式
     - 特征: S型曲线
     - 关键参数: 临界点、网络密度
     - 涌现: 阶梯式增长

  2. 路径依赖模式
     - 特征: 历史锁定
     - 关键参数: 收益递增、随机事件
     - 涌现: 多稳态

  3. 自组织模式
     - 特征: 局部秩序涌现
     - 关键参数: 互动规则、适应度
     - 涌现: 斑图形成

参数调优经验:
  - 网络密度: 0.1-0.3较为合理
  - 主体数量: >1000以减少随机性
  - 运行次数: ≥100次蒙特卡洛
  - 步长: 根据系统动态调整

🔄 CLI任务队列自动执行

自动激活条件

当满足以下任一条件时,技能自动激活任务队列模式:

yaml
激活条件:
  - 任务估计时间 > 3小时
  - 包含3个以上独立子任务
  - 需要多阶段验证
  - 用户明确要求"分解任务"

CAS仿真自动分解示例

yaml
用户请求: "模拟创新在社会网络中的扩散"

自动分解为:

Phase 1: 概念建模(30分钟)
  Task 1.1: 研究问题界定(10分钟)
    - 输出: 研究问题文档
    - 验证: 问题清晰、可仿真

  Task 1.2: 主体识别(10分钟)
    - 输出: 主体类型清单
    - 验证: 异质性考虑

  Task 1.3: 互动规则设计(10分钟)
    - 输出: 互动规则文档
    - 验证: 规则完整、可编码

Phase 2: 技术实现(60分钟)
  Task 2.1: 仿真环境搭建(15分钟)
    - 输出: Mesa模型代码
    - 验证: 代码可运行

  Task 2.2: 主体行为编码(20分钟)
    - 输出: 主体类代码
    - 验证: 行为符合规则

  Task 2.3: 互动机制实现(25分钟)
    - 输出: 互动函数
    - 验证: 互动符合设计

Phase 3: 验证与分析(60分钟)
  Task 3.1: 模式验证(20分钟)
    - 输出: 对比分析报告
    - 验证: 模式匹配真实数据

  Task 3.2: 参数敏感性分析(25分钟)
    - 输出: 敏感性图表
    - 验证: 关键参数识别

  Task 3.3: 场景测试(15分钟)
    - 输出: 场景测试报告
    - 验证: 多场景测试完成

总估计时间: 150分钟(2.5小时)

💾 任务状态持久化

持久化架构

yaml
存储位置:
  Level 1: .tasks/session-{uuid}.yaml
    - 会话级状态
    - 仿真进度
    - 参数状态

  Level 2: .tasks/project-state.yaml
    - 项目级状态
    - 多模型对比
    - 长时仿真

  Level 3: experience/patterns.md
    - 学习级知识
    - 仿真模式
    - 涌现机制

状态文件示例

yaml
# .tasks/session-cas-abc123.yaml

session:
  id: "abc123"
  skill: "cas-simulation-expert"
  start_time: "2026-03-08T10:00:00Z"

user_request:
  original: "模拟创新扩散"
  model_type: "社会扩散"

task_queue:
  - id: "1.1"
    name: "研究问题界定"
    status: "completed"
    output: "docs/research-question.md"
    validation: "passed"

  - id: "2.1"
    name: "仿真环境搭建"
    status: "in_progress"

simulation_config:
  tool: "Mesa"
  agent_types: ["创新者", "跟随者"]
  network_type: "小世界网络"
  parameters:
    N: 1000
    network_density: 0.2
    interaction_radius: 3

emergence_detected:
  - "临界点在25%采用率"
  - "S型扩散曲线"

progress:
  total_tasks: 9
  completed: 3
  in_progress: 1
  pending: 5
  percentage: 33

📚 渐进式加载结构

第一层:核心执行规则(本文件)

技能激活时必读,确保任务高质量执行:

  • ⚠️ 六大绝对禁止原则
  • 📋 任务分解规则
  • ✅ 完成度验证清单
  • 🎯 CLI模型驱动执行(Level 3)
  • 🧠 自迭代与学习机制(Level 4)

第二层:方法论文档(references/)

按需加载,深化方法论理解:

classic-literature.md: CAS经典文献

  • Holland (1995, 1998)
  • Epstein & Axtell (1996)
  • Arthur (1994)
  • 权威定义与应用范围

modeling-tools.md: 建模工具链

  • NetLogo快速入门
  • Mesa Python框架
  • Repast高性能仿真
  • 完整代码示例

long-term-tasks.md: 长时CAS研究

  • 4-8周完整项目
  • 分阶段指南
  • 验证清单

第三层:案例文档(cases/)

实战示范与警示:

positive/: 正确示范

  • case-001: 多主体仿真成功案例
  • case-002: 涌现模式识别

negative/: 错误警示

  • case-001: 主体过度简化
  • case-002: 忽视空间结构

使用方式:

  • 对话中直接使用:"模拟XX系统"
  • 长时研究:技能会自动分解任务
  • 质量保证:六大禁止原则+完成度清单
  • 子Agent协作:可调用其他专门技能(详见 SUBAGENT_EXAMPLE.md)

版本历史:

版本日期变更
5.0.0-cli-native2026-03-08CLI原生集成+自迭代机制
5.0.0-基础升级(待追溯)

相关技能:

  • grounded-theory-expert: 质性数据分析
  • social-network-analysis-expert: 网络结构分析
  • data-analysis-expert: 定量数据分析

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cas Simulation Expert AI skill do?

Complex Adaptive Systems (CAS) simulation expert. Provides ABM modeling, emergence detection, parameter sensitivity analysis, and pattern recognition. Suitable for complex systems research, social simulation, and policy modeling.

Why use Cas Simulation Expert on TypingMind?

Because you install it once and use it with any model. Cas Simulation Expert 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 Cas Simulation Expert in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ptreezh/sscisubagent-skills/tree/main/skills/cas-simulation-expert. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cas Simulation Expert?

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 Cas Simulation Expert?

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

Is the Cas Simulation Expert AI skill free?

Yes. It is published on GitHub by ptreezh 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 👇