jinko-model
Build or edit a Jinkō computational model (QSP/PK-PD) via the jinko-sdk: parameters, categorical parameters, compartments, species, ODEs, reactions, dosing events, algebraic rules, baseline checks, solving options, units, and component tags. Use this skill whenever the user wants to create a model from scratch, create an empty model, edit an existing model, add or modify components, apply input/source/output tags, configure unit checking, define model-level dosing events, validate diagnostics, or debug model sanity or simple_solve errors. Prefer editing existing models over recreating them. Do not use this skill for running trials; use jinko-trial for trial execution.
How do I install this agent skill?
npx skills add https://github.com/novainsilico/jinko-skills --skill jinko-modelIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides tools for building and managing computational biological models via the JinkŁ SDK. It enforces model validation through unit checking and diagnostics, uses secure secret management practices, and includes safeguards like dry-run modes for model mutations.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
Jinkō Model SDK Workflows
Use this skill for technical model construction and editing through the SDK. Keep the scope on SDK mechanics and model validity, not biological plausibility. Initialize the connection with jinko-sdk-setup first.
PREREQUISITE: This skill needs an initialized
jinko-sdkconnection and an SDK satisfying itsmetadata.requires_sdkrange. Run thejinko-sdk-setupskill (../jinko-sdk-setup/SKILL.md) and proceed only once its check passes. If that skill is not found, install it fromnovainsilico/jinko-skills.
Required Workflow
-
If a model was already supplied, prefer editing it over creating a new one. Create one only when needed, in a dedicated folder, with
client.create_empty_model(). -
Retrieve the model, inspect its components, tags, units, solving options, and diagnostics before proposing edits. Inspect the unit-checking mode with
model.get_unit_check(). -
Set the unit-checking mode with
model.set_unit_check("UnitCheckAndConvertAllSpeciesToExtentUnits"). Do not select another mode unless a human explicitly directs it after the consequences are explained. -
Give every directly declared numeric value a unit: numeric parameter formulas, compartment volumes, and species initial conditions. A parameter whose value is derived from an expression may omit its declared unit when the expression determines it. Validate non-trivial units against
references/units_static_info.jsonand diagnostics. -
Attach the built-in platform tags before considering the model complete:
i::vpopfor inputs that vary across virtual patients.i::protocolfor inputs that vary across protocol arms or scenarios, including the dose amount, first dose time, dose interval, and number of doses of a dosing event.- One evidence-backed source tag for each applicable value-bearing input:
s::knowledge,s::arbitrary, ors::to-calibrate. Leave an uncertain input untagged and report it for review. Never assigns::calibratedduring construction; it records an accepted calibration result. outputfor important time-series outputs to plot or calibrate against.
Three of these decide whether the model is usable downstream, so check them across the whole model, not only per component. At least one component must carry
output, or nothing can be plotted, measured, or calibrated against: treat its absence as an error. No component carryingi::protocolmeans the model cannot be given protocol arms, and none carryingi::vpopmeans it cannot vary across virtual patients: report each as a warning, correct only for a model meant to be single-arm and deterministic.python -m jinko.cli.validate_model_readiness --model-sid cm-...runs these three checks by default. -
Attach a traceability link to every value-bearing input tagged
s::knowledge. Prefer, in this order: the Extract that holds the value, the Reference that holds the Extract, then any other project item that produced the value. Use an external DOI or URL only when the project holds no such item, and report every external link for review. Use thejinko-referenceskill to upload a missing source and to create its extracts in a dedicated literature subfolder before you link. -
Use high-level SDK methods and
model.components.batch(version="...")for related component changes. The platform tags above already exist; do not recreate them. Create declarations only for other, custom tags. -
Re-fetch the model, require no error diagnostics, and run
simple_solve()for representativeoutputcomponents. For events, verify the expected pre-/post-event change.
Use scripts/create_minimal_model.py, and the SDK's python -m jinko.cli.tag_model_components and python -m jinko.cli.validate_model_readiness, rather than long ad-hoc snippets. Scripts are dry-run by default and mutate only with --apply.
For transparent ISO 8601 duration conversions, use from jinko.iso8601 import Duration, for example Duration.parse("P1M").to_timedelta(). Solving times accept timedelta or ISO strings: model.set_solving_times(t_max=timedelta(days=28), t_step="P1D", additional_periods=[{"t_max": "P7D", "t_step": timedelta(hours=1)}]).
Reference Routing
- Read
references/model-components.mdfor component batching, tags, events, formulas, and algebraic rules. - Read
references/unit_docs.mdfor unit semantics and conversion behavior. - Read
references/model-validation.mdfor diagnostics and readiness checks.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/novainsilico/jinko-skills/jinko-model">View jinko-model on skillZs</a>