Agent skill

Event Forecasting

by pymc-labs in pymc-labs/decision-lab

Methodology for probabilistic forecasting of when and whether a future event will occur.

Apache-2.0Auto-check passedData & Analytics

Install Event Forecasting

skills CLI
$ npx skills add pymc-labs/decision-lab --skill event-forecasting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pymc-labs/decision-lab event-forecasting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pymc-labs/decision-lab.git skills-src && mkdir -p .claude/skills && cp -r skills-src/decision-packs/event-forecaster/opencode/skills/event-forecasting .claude/skills/event-forecasting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
event-forecasting
GitHub stars
199
Token cost
~2.4k tokens
SKILL.md length
1,071 words
Files
15 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Methodology for probabilistic forecasting of when and whether a future event will occur.

  • Works in 3 steps: What kind of question is this? → How many historical cases of this exact… → What data is available?
  • Any question of the form When will X happen?
  • SKILL.md covers Method selection, Ten methods in this skill, When to use which reference and Core output contract, plus 1 more section
  • Runs Python scripts from its folder

What it does

Event Forecasting is an agent skill from pymc-labs/decision-lab. Methodology for probabilistic forecasting of when and whether a future event will occur. Covers Bayesian survival models, reference class reasoning, driver threshold models, leading indicator models, scenario decomposition, and causal mechanism models. Use for any question of the form "When will X happen?" or "What is the probability that Y occurs by date Z?"

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including reference files (for example `references/causal_mechanism.md`, `references/continuous_driver_model.md` and `references/cure_rate_model.md`).

It sits in Data & Analytics, covering Forecasting and time series. The repository describes itself as: Run tested, autonomous agent workflows on your data for meaningful decision-making. The licence is Apache-2.0.

When your agent uses it

  • Any question of the form When will X happen?
  • What is the probability that Y occurs by date Z?

Example prompts

  • “When will X happen?”
  • “What is the probability that Y occurs by date Z?”
  • “/event-forecasting”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. What kind of question is this?
  2. How many historical cases of this exact event exist?
  3. What data is available?

What it can do on your machine

Read from SKILL.md and the folder at commit a68f132. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Event Forecasting loads about 2.4k tokens when it runs, and up to ~43k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 1,071 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~43k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pymc-labs/decision-lab at commit a68f132, republished under its Apache-2.0 licence (© pymc-labs). 1,071 words, ~2,393 tokens.

Download SKILL.mdSave it as .claude/skills/event-forecasting/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
event-forecasting
description
Methodology for probabilistic forecasting of when and whether a future event will occur. Covers Bayesian survival models, reference class reasoning, driver threshold models, leading indicator models, scenario decomposition, and causal mechanism models. Use for any question of the form "When will X happen?" or "What is the probability that Y occurs by date Z?"

Event Forecasting Analysis Skill

This skill provides methodology for estimating probability distributions over when (and whether) future events will occur. It is designed for open-ended, real-world questions where the answer is uncertain, data may be sparse, and domain knowledge matters as much as statistics.

The skill is agnostic to domain. It applies equally to geopolitical events, regulatory decisions, market regime changes, clinical endpoints, supply chain resolutions, and any other time-to-event question.

Method selection

Answer these questions in order to identify which method fits your situation.

1. What kind of question is this?
Question formImplication
"When will X happen?"Time-to-event. Fit a survival curve.
"Will X happen by date Y?"P(event in window). All methods can answer this.
"How likely is X in the next N months?"Probability over a horizon. All methods can answer this.
"What factors control when X happens?"Causal structure matters. Prioritise CausalMechanismModel.
2. How many historical cases of this exact event exist?
Historical cases (N)Implication
N = 0No historical case. HazardModel impossible. Must use broader analogues for ReferenceClassModel.
N = 1One case. HazardModel not viable. Use as threshold / calibration anchor for ThresholdCrossingModel. Force-broaden reference class.
N = 2–4Too few for reliable survival analysis. HazardModel is very prior-dominated; only run with explicit caveat.
N ≥ 5HazardModel is viable as a primary method.
3. What data is available?

Inspect every available data file, then answer:

Data availableMethods unlocked
Historical durations of N ≥ 5 analogous eventsHazardModel (primary)
Historical analogues even if durations are roughReferenceClassModel (always)
Time-series of a measurable continuous driver + ≥ 1 historical caseContinuousDriverModel, ThresholdCrossingModel
Continuous driver with discrete shocks / fat-tailed increments (≥ ~100 obs) + thresholdJumpDiffusionModel
Time-series of relevant leading indicators (updated regularly)IndicatorModel
Historical transitions / dwell times across discrete regimes (calm → crisis → resolved)MarkovStateModel
Domain knowledge of decision-makers or resolution mechanismsScenarioDecomposition, CausalMechanismModel
Little data, open-ended questionReferenceClassModel + ScenarioDecomposition

Ten methods in this skill

MethodData requirementAppropriate when
HazardModelHistorical durations of analogous eventsN ≥ 5 past events; default Weibull AFT; use discrete-time cloglog variant if parametric hazard fits poorly
ReferenceClassModelHistorical analogues (even rough ones)Always useful as a baseline; tolerates sparse data
IndicatorModelTime-series of relevant signalsLeading indicators are measurable and updated regularly
ScenarioDecompositionDomain knowledge + expert judgmentQuestion has identifiable discrete paths to resolution
CausalMechanismModelStructural knowledge of causal driversKey causal factors and direction of influence are known
ContinuousDriverModelContinuous driver time-series (≥ 100 obs) + computable thresholdEvent operationalised as driver crossing a threshold derived from data or domain knowledge
JumpDiffusionModelContinuous driver time-series (≥ ~100 obs) with discrete shocks / fat tails + thresholdEvent is a threshold crossing and the driver moves by sudden jumps that a Gaussian model would understate
ThresholdCrossingModelDriver time-series + ≥ 1 historical case with known driver levelEvent triggered when driver exceeds a latent estimated threshold; works with N=1
MarkovStateModelHistorical transitions / dwell times across discrete regimesSituation moves through identifiable intermediate states; want transition-rate dynamics, not a static scenario snapshot
CureRateModelAny (works without data)Significant probability exists that the event will NEVER resolve; standard survival models assign zero probability to permanent non-resolution

Each forecaster selects ONE method that best fits the data summary, local data files, and prompt context. Choose the method that is most appropriate for the available evidence — you do not need to run multiple methods. The ensemble of parallel forecasters provides coverage across methods.

Implementation backend

All ten methods use raw PyMC >= 6.0 — explicit priors, custom likelihoods (censoring, state-space, mixtures), pm.Deterministic derived quantities for forecasts and psense, Nutpie sampling with Numba backend, and pm.sample_prior_predictive / pm.sample_posterior_predictive when needed. Diagnostics use ArviZ >= 1.0 (arviz_stats, arviz_plots). See each method's reference file under references/.

Show full SKILL.md (470 more words)Show less
Special case: N=1 historical event

When only one historical case of the event exists, HazardModel is not viable and HistoricalCalibration must be skipped. Adjust method selection:

  • Mandatory: ReferenceClassModel with a broadened reference class (analogous event types, not the exact event). See references/reference_class.md for the broadening ladder.
  • If a dominant causal driver is measurable: ThresholdCrossingModel — explicitly designed for the single-case situation.
  • If resolution paths are identifiable: ScenarioDecomposition.
  • Do NOT run HazardModel — report "not applicable: N=1, insufficient data".
  • PriorSensitivity becomes especially important; flag WARN or FAIL prominently and justify in summary.md (sensitivity is not automatically a defect — see references/model_checks.md).

When to use which reference

TaskRead first
Historical durations of analogous events availablereferences/hazard_model.md
Base rate from historical analogues + Bayesian updatingreferences/reference_class.md
Leading indicator regression (relevant time series available)references/indicator_model.md
Explicit scenario tree (discrete resolution paths identifiable)references/scenario_decomposition.md
Structural model of causal driversreferences/causal_mechanism.md
Continuous driver time-series + threshold crossingreferences/continuous_driver_model.md
Continuous driver with discrete shocks / fat tails + threshold crossingreferences/jump_diffusion_model.md
Event triggered by a driver crossing a latent estimated thresholdreferences/threshold_crossing.md
Discrete regimes with historical transitions (calm → crisis → resolved)references/markov_state_model.md
Event may never resolve (permanent non-resolution possible)references/cure_rate_model.md
Model checking protocols, JSON schemas, Brier scorereferences/model_checks.md
Prior sensitivity via ArviZ psense (PyMC)references/prior_sensitivity_psense.md
Output schema, convergence thresholds, agreement criteriareferences/output_schema.md

Core output contract

Every method must produce forecast.json. Full schema in references/output_schema.md. Mandatory fields:

  • p_event_by_horizon — P(event by date) for each horizon specified in the prompt
  • median_days_to_event with p10_days / p90_days
  • convergence_status (for Bayesian: OK / MARGINAL / FAIL; analytic: N_A)

Principles that override method choice

  1. Never fabricate numbers. If a value is NaN, report NaN and explain why. Never substitute 0 or a guess.
  2. Always report intervals. Point estimates alone are forbidden. Use 94% HDI for Bayesian; 5th/95th percentile bootstraps for analytic.
  3. Graceful degradation. Sparse data → wider priors and broader reference classes. Never refuse to forecast because data is thin; report wider intervals.
  4. Calibration over precision. A well-calibrated wide interval is always better than an overconfident narrow one.
  5. Causal awareness. Prefer methods that explain why the event occurs over purely statistical approaches when causal structure is identifiable. Historical patterns can fail when the causal structure changes.
  6. Reference class discipline. When selecting a reference class, use the narrowest class with N ≥ 5 historical cases. Document why you chose it.
  7. No domain-specific defaults. Do not import threshold values, percentile choices, scenario structures, or reference class compositions from other forecasting tasks. Every number must be derived from the current question and data.
  8. Prior sensitivity is diagnostic, not a veto. Unless the user asks for causal interpretation, run PriorSensitivity on the forecast (not every model parameter). Tier A methods use psense on deterministic p_event_by_horizon; Tier B path-simulation methods use resampled re-simulation; Tier C uses analytic perturbation. WARN/FAIL means disclose prior dependence — especially at long horizons — not that the forecast is invalid.

© pymc-labs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 14 other files (references) in decision-packs/event-forecaster/opencode/skills/event-forecasting of pymc-labs/decision-lab.

  • SKILL.md
  • references/causal_mechanism.md
  • references/continuous_driver_model.md
  • references/cure_rate_model.md
  • references/hazard_model.md
  • references/indicator_model.md
  • references/jump_diffusion_model.md
  • references/markov_state_model.md
  • references/model_checks.md
  • references/output_schema.md
  • references/prior_sensitivity_psense.md
  • references/reference_class.md
  • references/save_predictions.py
  • references/scenario_decomposition.md
  • references/threshold_crossing.md

Open the folder on GitHubat commit a68f132

Compare with similar skills

Event Forecasting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Event Forecasting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Event Forecasting this skillpymc-labs/decision-lab199—~2.4kAutomated safety check: PassApache-2.0
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0
Timesfm ForecastingzLanqing/codex-claude-academic-skills4.6k6 repos~7.5kAutomated safety check: NotesApache-2.0
StatsmodelszLanqing/codex-claude-academic-skills4.6k16 repos~4.9kAutomated safety check: PassBSD-3-Clause
Alphaear Predictorninehills/skills2812 repos~531Automated safety check: PassNone
Find Hypertable Candidatestimescale/pg-aiguide1.9k1 repos~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 9 days ago
    Data & AnalyticsAuto-check passed
  • Timesfm Forecasting

    zLanqing/codex-claude-academic-skills

    Zero-shot time series forecasting with Google's TimesFM foundation model.

    4.6k GitHub starsUsed in 6 repos~7.5k tokens
    Data & AnalyticsAuto-check: notes
  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 16 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • Alphaear Predictor

    ninehills/skills

    Market prediction skill using Kronos. An agent skill from ninehills/skills.

    281 GitHub starsUsed in 2 repos~531 tokens
    Data & AnalyticsAuto-check passed
  • Find Hypertable Candidates

    timescale/pg-aiguide

    A skill your agent uses to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables.

    1.9k GitHub starsUsed in 1 repo~2.6k tokens
    Data & AnalyticsAuto-check passed
  • Pensieve Search

    arkohut/pensieve

    Search the user's local Pensieve screenshot archive by text, app, or time range.

    1.4k GitHub stars~8.2k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check passed

More from pymc-labs/decision-lab

  • Dlab Figure Style

    pymc-labs/decision-lab

    decision-lab house figure style for matplotlib. An agent skill from pymc-labs/decision-lab.

    199 GitHub stars~1.1k tokensUpdated 13 days ago
    Auto-check passed
  • Dlab CLI

    pymc-labs/decision-lab

    Complete reference for decision-lab (dlab). An agent skill from pymc-labs/decision-lab.

    199 GitHub stars~957 tokensUpdated 13 days ago
    Auto-check passed

Questions about Event Forecasting

What does Event Forecasting do?

Methodology for probabilistic forecasting of when and whether a future event will occur. Event Forecasting is an agent skill from pymc-labs/decision-lab. Methodology for probabilistic forecasting of when and whether a future event will occur.

When should I use Event Forecasting?

Event Forecasting fits situations like: any question of the form When will X happen?; what is the probability that Y occurs by date Z?.

How do I install Event Forecasting in Claude Code?

Run `npx skills add pymc-labs/decision-lab --skill event-forecasting -a claude-code`. Or copy the skill folder (decision-packs/event-forecaster/opencode/skills/event-forecasting in pymc-labs/decision-lab) into .claude/skills/event-forecasting in your project. Claude Code loads it when a task matches its description.

How do I install Event Forecasting in Codex?

Run `npx skills add pymc-labs/decision-lab --skill event-forecasting -a codex`. Or copy the skill folder (decision-packs/event-forecaster/opencode/skills/event-forecasting in pymc-labs/decision-lab) into .agents/skills/event-forecasting in your project. Codex loads it when a task matches its description.

Can I use Event Forecasting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pymc-labs/decision-lab --skill event-forecasting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/event-forecasting, .gemini/skills/event-forecasting, .github/skills/event-forecasting and .opencode/skills/event-forecasting in your project.

What does Event Forecasting need to run?

Going by SKILL.md and its folder, Event Forecasting needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Event Forecasting access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Event Forecasting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Event Forecasting use?

Event Forecasting is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Event Forecasting use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 41k tokens, read only when the agent opens those files.

What are the alternatives to Event Forecasting?

Skills that share tags, products or a category with Event Forecasting: TimesFM Forecasting (google-research/timesfm, 34k stars), Timesfm Forecasting (zLanqing/codex-claude-academic-skills, 4.6k stars), Statsmodels (zLanqing/codex-claude-academic-skills, 4.6k stars) and Alphaear Predictor (ninehills/skills, 281 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Event Forecasting?

pymc-labs (a GitHub organization) maintains it in pymc-labs/decision-lab, which has 199 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 25, 2026.

Source: pymc-labs/decision-lab on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.