360 Secure SkillHub
360 安全技能中心

epigrass-creator

通过五步向导(选择模型、定义站点、配置参数、构建网络、设置模拟)创建 Epigrass 流行病学元种群模型,支持 SIR、SEIR、SEIS、SIS、SI 及自定义模型和 GeoPackage 导入,输出模型脚本、站点与连线数据及规格文件。

分类:开发
fccoelho
fccoelho
热度 40.79
最近更新 2026-11-26 03:01:34

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add fccoelho/epigrass-creator
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
epigrass-creator
description
Create Epigrass epidemiological models through step-by-step guided specification. Build metapopulation models (SIR, SEIR, SEIS, SIS, SI) with geographic networks. Supports GeoPackage import for real-world spatial data.
version
1.1.2
metadata
{"openclaw":{"requires":{"env":[]},"primaryEnv":null,"bins":["python3"],"skillKey":"epigrass-creator","emoji":"🦠","homepage":"https://github.com/fccoelho/epigrass"}}

Epigrass Creator Skill

Create epidemiological metapopulation models using Epigrass through an interactive, step-by-step wizard.

Skill Files

All files are located in this skill's directory (the same folder as SKILL.md):

File Description
wizard.py Full interactive 5-step CLI wizard. Run with python3 <skill_dir>/wizard.py, or drive programmatically: from wizard import EpigrassWizard; EpigrassWizard().run(). Supports all steps including GeoPackage import and network generation.
epigrass_wizard.py Programmatic wizard API, designed for agent-driven use. Import with from epigrass_wizard import EpigrassWizard, then guide the user through each step using get_model_selection_prompt(), get_sites_prompt(), get_parameters_prompt(), get_edges_prompt(), get_simulation_prompt() and collect input with set_model_type(), add_site(), add_parameter(), add_simulation_setting(). Finish with save_model() and get_summary(). Also runnable as a CLI: python3 <skill_dir>/epigrass_wizard.py.
examples/dengue_seir_example.json Example model_spec.json for a dengue SEIR model.
examples/geopackage_example.md Walkthrough for importing sites from a GeoPackage file.

Prefer epigrass_wizard.py's programmatic API when acting as an agent (it avoids blocking input() calls); use wizard.py when the user wants to run the wizard themselves in a terminal.

What is Epigrass?

Epigrass (Epidemiological Geo-referenced Analysis and Simulation System) is a Python library for simulating disease spread across geographic networks.

Supported Models

Model Compartments Use Case
SIR S, I, R Diseases with lifelong immunity
SEIR S, E, I, R Diseases with latent period
SEIS S, E, I Diseases with temporary immunity
SIS S, I Diseases with no immunity
SI S, I Fatal diseases
Custom User-defined Specialized scenarios

Workflow (5 Steps)

  1. Model Selection - Choose model type
  2. Site Definition - Define geographic locations (manual, grid, cities, or GeoPackage import)
  3. Parameters - Configure epidemiological parameters
  4. Network - Define connections between sites
  5. Simulation - Set simulation settings and generate files

GeoPackage Support

Import sites directly from GeoPackage (.gpkg) files:

  • Supports any geospatial vector data
  • Automatic coordinate extraction
  • Column mapping for name, population, geocode
  • Works with municipal boundaries, health regions, etc.

Requirements: pip install geopandas (or fiona as fallback)

Usage Examples

User: Create a dengue model for Brazilian cities
→ Wizard guides through SEIR selection, city list, parameters

User: Build SIR model with 10x10 grid
→ Wizard creates synthetic network

User: Custom model with hospitalization
→ Wizard collects compartments and transitions

Output

  • model.epg - Epigrass script
  • sites.csv - Site/node data
  • edges.csv - Edge/connection data
  • model_spec.json - Full specification

Requirements

  • Python 3.8+
  • epigrass (pip install epigrass)