adaptyv
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.
$ npx -y skills add K-Dense-AI/scientific-agent-skills --skill simpy --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/simpyContext preview
The summary Claude sees to decide when to auto-load this skill.
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.
name: simpy description: Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis. license: MIT compatibility: Upstream SimPy 4.1.2 supports Python 3.8+; bundled CLIs require Python 3.10+, uv, and SimPy 4.1.2. They use only SimPy and the standard library, operate on local bounded inputs, and make no network calls. allowed-tools: Read Write Edit Bash Glob metadata: version: "1.4" skill-author: K-Dense Inc.
Use this skill for process-based discrete-event models where active entities yield events and contend for resources: queues, production systems, logistics, networks, service operations, inventory, and other event-driven systems.
SimPy supplies an event scheduler and modeling primitives. It does **not** choose a scientifically valid conceptual model, input distribution, warm-up, run length, replication count, estimand, or causal interpretation. Treat those as simulation-study methodology, not SimPy API behavior.
Verified **2026-07-23**:
`4.1.2` points to commit `f4381649`.
plus PyPy. SimPy has no runtime dependencies.
Create a reproducible environment:
uv venv --python 3.13
source .venv/bin/activate
uv pip install "simpy==4.1.2"
python -c "import importlib.metadata; print(importlib.metadata.version('simpy'))"Do not silently substitute the `latest` documentation build: it may describe an unreleased development revision. Use the versioned 4.1.2 links in `references/sources.md`.
1. **Define purpose and estimands.** State the decision/question, system boundary, entities, resources, state, outputs, time units, and terminating event or steady-state target. 2. **Write a conceptual model first.** Record assumptions, distributions, routing, priorities, initial conditions, and omitted mechanisms. 3. **Implement generators.** A SimPy process is an event-yielding Python generator. Register the generator object with `env.process(...)`. 4. **Bound execution.** Give every production run explicit time, entity, event, and replication caps. Never call `env.run()` on a model containing an endless process. 5. **Separate random streams.** Use local RNG instances for logically distinct stochastic sources; retain a seed manifest. 6. **Instrument deliberately.** Observe state after the transition of interest, close time-weighted intervals at the horizon, and test that monitoring does not alter event order. 7. **Verify and validate.** Test deterministic edge cases, conservation identities, traces, queue discipline, and analytical benchmarks; compare against system or expert evidence for the stated purpose. 8. **Run independent replications.** Make intervals from replication-level estimates, not correlated entities within one run. 9. **Report limitations.** Include initialization, unfinished entities, run length, seeds/streams, precision, sensitivity, and validation evidence. Never convert simulation association into a causal claim.
Read `references/simulation-methodology.md` before making inferential claims.
import random
import simpy
HORIZON = 480.0
arrival_rng = random.Random(101)
service_rng = random.Random(202)
env = simpy.Environment()
server = simpy.Resource(env, capacity=2)
completed = []
def customer(arrival):
with server.request() as request:
yield request
wait = env.now - arrival
yield env.timeout(service_rng.expovariate(1 / 6.0))
completed.append((env.now, wait))
def arrivals():
for _ in range(10_000): # Entity cap.
delay = arrival_rng.expovariate(1 / 4.0)
if env.now + delay >= HORIZON:
return
yield env.timeout(delay)
env.process(customer(env.now))
env.process(arrivals())
env.run(until=HORIZON)The numeric horizon is half-open: normal events scheduled exactly at `480.0` are not processed. Report unfinished entities rather than silently treating them as completed observations.
`Environment` is single-threaded. The queue is ordered by simulation time, event priority, then a strictly increasing event ID. Same-time, same-priority events are therefore processed FIFO in scheduling order. Model processes may represent concurrency, but callbacks execute sequentially and deterministically.
`env.run(until=number)` and `env.run(until=event)` are not interchangeable at boundaries:
that exact time.
Other same-time ordering depends on priority and scheduling order.
`StopSimulation` by rescheduling the target. Consequently, after `env.run(until=target)`, `target.processed` can remain `False` until one more `step()`/`run()` even though its value was returned. Do not use `processed` as the sole post-run completion test.
See `references/events.md` and `references/monitoring.md`.
`suc
🔔 Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility — now works with any AI agent that supports the open Agent Skills standard, not just Claude.
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP…
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data…
Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree…
Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk…