simbiology-build-model

Build and modify SimBiology models programmatically with optional diagram layout control.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill simbiology-build-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simbiology-build-model
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/computational-biology/simbiology-build-model
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill simbiology-build-model

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Constructing SimBiology models by hand requires deep knowledge of the API, naming conventions, and diagram layout rules, and mistakes like deprecated properties or invalid qualified names cause failures at simulation time. This Skill gives an AI agent the exact API patterns, helper functions, and layout procedures to build correct models on the first attempt.

Core Features & Use Cases

  • Programmatic Model Construction: Create compartments, species, reactions, parameters, rules, events, doses, observables, and variants using modern SimBiology API conventions with qualified naming and unit consistency.
  • Standard PK Model Generation: Use PKModelDesign patterns for one- and two-compartment pharmacokinetic models with correct parameterization and naming.
  • Diagram Layout and Styling: Position blocks, validate layouts with checkDiagramLayout, and apply color palettes when the user requests a visual diagram in the Model Builder app.
  • Use Case: Ask your agent to build a two-compartment PK model with bolus dosing and linear clearance, then request a laid-out diagram — the agent constructs the model, opens the Model Builder safely, positions all blocks, and validates the layout has zero violations.

Quick Start

Ask your AI agent to build a SimBiology model, for example: create a one-compartment PK model with first-order absorption and linear clearance, then show me the diagram.

Frequently Asked Questions about simbiology-build-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a SimBiology model programmatically in MATLAB?

Create a model with sbiomodel, then add compartments with addcompartment, species with addspecies, parameters with addparameter, and reactions with addreaction. Always use qualified species names like Central.Drug and modern properties such as Value, Units, and Constant.

How do I create a standard PK model in SimBiology?

Use PKModelDesign for standard one- or two-compartment pharmacokinetic models with common dosing and elimination types. It produces models with correct parameterization and PK library naming conventions such as Drug_Central, Cl_Central, and ke_Central.

Does this Skill work in headless or batch MATLAB environments?

Yes, model construction using the standard SimBiology API works in all environments including desktop, headless, batch, and remote. Only the diagram and layout features require the Model Builder app, which needs an interactive desktop session.

When should I not use this Skill for SimBiology work?

Do not use it for simulation and analysis tasks, which belong to the simbiology-simulate-model skill, or for parameter fitting, population modeling, and NCA, which belong to simbiology-fit-model. This Skill covers model construction and diagram layout only.

Why does my SimBiology diagram have crossing lines or overlapping blocks?

Layout violations usually come from insufficient gaps between connected compartments or incorrect reaction node placement. Run repositionAllReactions followed by checkDiagramLayout, and fix remaining violations with computeSafeReactionPosition until the violation count reaches zero.

How do I save a SimBiology model without losing the diagram layout?

Use saveViaBuilder to save as an .sbproj file, which preserves diagram styling, and loadViaBuilder to reload it. Saving with the standard save command to a .mat file or using sbioloadproject loses all diagram layout data.