Agent skill

Montecarlo Subgroup Prediction

by divinevideo in divinevideo/divine-mobile

Fix Monte Carlo project completion simulations that give identical dates for all sub-groups (milestones, priorities, epics).

MPL-2.0Auto-check passedProduct & Project Management

Install Montecarlo Subgroup Prediction

skills CLI
$ npx skills add divinevideo/divine-mobile --skill montecarlo-subgroup-prediction -a claude-code

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

GitHub CLI
$ gh skill install divinevideo/divine-mobile montecarlo-subgroup-prediction --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/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/montecarlo-subgroup-prediction .claude/skills/montecarlo-subgroup-prediction && 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
montecarlo-subgroup-prediction
GitHub stars
266
Token cost
~1.5k tokens
SKILL.md length
478 words
Files
1
Skills in repo
103
Repo updated
First seen
Licence
MPL-2.0

At a glance

Fix Monte Carlo project completion simulations that give identical dates for all sub-groups (milestones, priorities, epics).

  • Works in 3 steps: Proportional Scaling is Mathematically… → Overall Scope Rate Overwhelms Sub-Group… → GitHub created_at ≠ "Added to Board"
  • All sub-group predictions converge to the same date despite different remaining counts
  • SKILL.md covers Problem, Context / Trigger Conditions, Root Causes and Solution, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Montecarlo Subgroup Prediction is an agent skill from divinevideo/divine-mobile. Fix Monte Carlo project completion simulations that give identical dates for all sub-groups (milestones, priorities, epics). Use when: (1) All sub-group predictions converge to the same date despite different remaining counts, (2) Proportional throughput scaling produces flat/identical results, (3) Applying overall scope rate to individual sub-groups causes simulations to hit maxweeks cap and never converge, (4) Building project forecasting tools that predict completion for sub-groups of a larger backlog. Covers…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Product & Project Management, covering Project management, User stories and Forecasting and time series. The licence is MPL-2.0.

When your agent uses it

  • All sub-group predictions converge to the same date despite different remaining counts
  • Proportional throughput scaling produces flat/identical results
  • Applying overall scope rate to individual sub-groups causes simulations to hit maxweeks cap and never converge
  • Building project forecasting tools that predict completion for sub-groups of a larger backlog

Example prompts

  • “/montecarlo-subgroup-prediction”

Requirements

  • Python 3

Workflow steps

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

  1. Proportional Scaling is Mathematically Constant
  2. Overall Scope Rate Overwhelms Sub-Group Throughput
  3. GitHub created_at ≠ "Added to Board"

What it can do on your machine

Read from SKILL.md and the folder at commit c3d6f7e. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    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

Montecarlo Subgroup Prediction loads about 1.5k tokens when it runs. Until then it costs about 162 tokens; SKILL.md has 478 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~162
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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 divinevideo/divine-mobile at commit c3d6f7e, republished under its MPL-2.0 licence (© divinevideo). 478 words, ~1,497 tokens.

Download SKILL.mdSave it as .claude/skills/montecarlo-subgroup-prediction/SKILL.md (or your agent's skills folder).
name
montecarlo-subgroup-prediction
description
Fix Monte Carlo project completion simulations that give identical dates for all sub-groups (milestones, priorities, epics). Use when: (1) All sub-group predictions converge to the same date despite different remaining counts, (2) Proportional throughput scaling produces flat/identical results, (3) Applying overall scope rate to individual sub-groups causes simulations to hit max_weeks cap and never converge, (4) Building project forecasting tools that predict completion for sub-groups of a larger backlog. Covers hypergeometric draw model for milestones and cumulative priority model for sequential priorities.
author
Claude Code
version
1.0.0
date
2026-02-16

Monte Carlo Sub-Group Prediction Scaling

Problem

When running Monte Carlo simulations for project completion, predicting dates for sub-groups (milestones, priorities, epics) within a larger project produces identical results for all groups, or simulations diverge and hit the max_weeks cap.

Context / Trigger Conditions

  • Building a project forecasting tool that predicts dates for individual milestones or priority groups within a larger project backlog
  • All sub-group predictions show the same date despite very different remaining counts (e.g., 5-item milestone shows same date as 46-item milestone)
  • Simulations hit max_weeks (104) and produce dates 2+ years in the future
  • Scope rate applied per-group causes negative net velocity (items grow each week)

Root Causes

1. Proportional Scaling is Mathematically Constant

If you scale throughput proportionally:

share = remaining_i / total_remaining
scaled_throughput = overall_throughput * share
weeks = remaining_i / scaled_throughput
      = remaining_i / (overall_throughput * remaining_i / total_remaining)
      = total_remaining / overall_throughput  # CONSTANT for all groups!

Every sub-group predicts the same number of weeks regardless of size.

2. Overall Scope Rate Overwhelms Sub-Group Throughput

If the project's overall scope rate is 50 items/week and you apply it to a sub-group with only 5 remaining items (share = 1.6%), the scaled throughput might be ~0.6/week while scaled scope is ~0.8/week. Net velocity is negative — the simulation never converges and hits max_weeks.

3. GitHub created_at ≠ "Added to Board"

Scope rate calculated from created_at dates reflects when GitHub issues were created, not when they were added to the project board. Bulk triaging or importing old issues inflates the apparent scope rate dramatically.

Solution

Use different simulation models for different sub-group types:

For Sequential Priorities (P0, P1, P2...): Cumulative Model

Higher priorities are completed first. Each priority's prediction includes all higher-priority work that must finish before it:

python
sorted_priorities = sorted(priorities, key=lambda p: p["name"])
cumulative_before = 0

for p in sorted_priorities:
    effective_remaining = cumulative_before + p["remaining"]
    result = simulate(
        remaining=effective_remaining,
        throughput_history=full_project_throughput,  # NOT scaled
        scope_rate=0.0,  # Don't apply scope per-group
    )
    result.remaining = p["remaining"]  # Show actual remaining
    cumulative_before += p["remaining"]
For Milestones/Epics: Hypergeometric Draw Model

Items from each milestone are randomly drawn from the overall work pool. Smaller milestones finish earlier due to higher variance:

python
for i in range(n_simulations):
    subset_left = remaining
    pool_left = total_remaining
    weeks = 0
    while subset_left > 0 and weeks < max_weeks:
        throughput = rng.choice(throughput_samples)
        draw_size = min(throughput, pool_left)
        if draw_size > 0 and pool_left > 0:
            other = pool_left - subset_left
            # How many completed items come from this milestone?
            drawn = rng.hypergeometric(subset_left, max(other, 0), draw_size)
            subset_left -= drawn
            pool_left -= draw_size
            pool_left = max(pool_left, subset_left)
        weeks += 1
Show full SKILL.md (198 more words)Show less
Key Principles
  1. Don't scale throughput proportionally — it produces identical results
  2. Don't apply overall scope rate to sub-groups — it causes divergence
  3. Use the full project throughput for priority predictions (cumulative model)
  4. Use hypergeometric sampling for milestone predictions (discrete draws)
  5. Show scope rate as informational rather than baking it into per-group MC

Verification

  • Sub-groups with fewer remaining items should predict earlier dates
  • Smaller sub-groups should have wider confidence intervals (more variance)
  • No predictions should hit the max_weeks cap under normal conditions
  • Priority predictions should be ordered (P0 < P1 < P2 < P3)

Example

With throughput of [2, 29, 44, 34, 11, 24, 33, 54, 34, 101, 57, 81, 0] and 303 total remaining items:

Before fix (proportional scaling):

MVP Rel 1 (5 left):   Apr 13    # All identical!
MVP Rel 2 (46 left):  Apr 13
Release 3 (33 left):  Apr 13

After fix (hypergeometric draws):

MVP Rel 1 (5 left):   Apr 6     # Differentiated by size
MVP Rel 2 (46 left):  Apr 13
Release 3 (33 left):  Apr 13
Zap Store (10 left):  Apr 13

Notes

  • The continuous proportional model (subset_throughput = throughput * share) is mathematically equivalent to "everything finishes when the project finishes" because the differential equation d(subset)/dt = -T*(subset/pool) preserves ratios
  • The hypergeometric distribution is the correct statistical model for "drawing without replacement from a mixed pool"
  • For very small sub-groups (< 5 items), the hypergeometric model produces high variance — this is correct and reflects genuine uncertainty
  • Consider capping scope_rate at min(scope_rate, throughput * 0.5) if using it, to prevent divergent simulations

© divinevideo, MPL-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

Just SKILL.md in .agents/skills/montecarlo-subgroup-prediction of divinevideo/divine-mobile.

Open the folder on GitHubat commit c3d6f7e

Compare with similar skills

Montecarlo Subgroup Prediction 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.

Montecarlo Subgroup Prediction compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Montecarlo Subgroup Prediction this skilldivinevideo/divine-mobile266—~1.5kAutomated safety check: PassMPL-2.0
Project Planneradrianpuiu/claude-skills-marketplace1001 repos~6kAutomated safety check: PassNone
Invokta Deliveryvinilana/invokta139—~894Automated safety check: PassMIT
Bmad Sprint Planningdelorenj/mcp-server-trello4455 repos~3kAutomated safety check: PassMIT
Verification Gatesrohitg00/skillkit1.5k—~1.7kAutomated safety check: PassApache-2.0
Levyra Project ManagerLUC4N3X/Levyra-deepsound590—~935Automated safety check: PassGPL-3.0

Similar skills

  • Project Planner

    adrianpuiu/claude-skills-marketplace

    Comprehensive project planning and documentation generator for software projects.

    100 GitHub starsUsed in 1 repo~6k tokens
    Product & Project ManagementAuto-check passed
  • Invokta Delivery

    vinilana/invokta

    Deliver Invokta milestones and work items with TDD, adherence to versioned contracts and architecture, complete validation, and one cohesive commit per work item.

    139 GitHub stars~894 tokensUpdated 5 days ago
    Product & Project ManagementAuto-check passed
  • Bmad Sprint Planning

    delorenj/mcp-server-trello

    Generate sprint status tracking from epics. An agent skill from delorenj/mcp-server-trello.

    445 GitHub starsUsed in 5 repos~3k tokens
    Product & Project ManagementAuto-check passed
  • Verification Gates

    rohitg00/skillkit

    Creates explicit validation checkpoints (verification gates) between project phases to catch errors early and ensure quality before proceeding.

    1.5k GitHub stars~1.7k tokensUpdated 4 mo ago
    Product & Project ManagementAuto-check passed
  • Levyra Project Manager

    LUC4N3X/Levyra-deepsound

    Turn Levyra requirements and roadmap outcomes into one reviewable active phase using docs/project/SPEC.md, docs/project/ROADMAP.md, docs/project/TASKS.md, acceptance criteria, validation, owner…

    590 GitHub stars~935 tokensUpdated yesterday
    Product & Project ManagementAuto-check passed
  • Scrum Master

    borghei/Claude-Skills

    Data-driven Scrum Master for sprint health scoring, Monte Carlo velocity forecasting, retrospective analysis, capacity planning, and Tuckman team coaching.

    891 GitHub stars~2.5k tokensUpdated 4 days ago
    Product & Project ManagementAuto-check passed

More from divinevideo/divine-mobile

All 103 skills in this repo
  • Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".

    266 GitHub stars~931 tokensUpdated today
    Auto-check passed
  • Art Direct

    divinevideo/divine-mobile

    Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language.

    266 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Async Await Null Race Condition

    divinevideo/divine-mobile

    Fix "Null check operator used on a null value" errors when an object is set to null during an async await.

    266 GitHub stars~881 tokensUpdated today
    Auto-check passed
  • AWS V4 Signing Custom Headers Gcs

    divinevideo/divine-mobile

    Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.

    266 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Bash Herestring Newline Secrets

    divinevideo/divine-mobile

    Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.

    266 GitHub stars~791 tokensUpdated today
    Auto-check passed
  • Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).

    266 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about Montecarlo Subgroup Prediction

What does Montecarlo Subgroup Prediction do?

Fix Monte Carlo project completion simulations that give identical dates for all sub-groups (milestones, priorities, epics). Montecarlo Subgroup Prediction is an agent skill from divinevideo/divine-mobile. Fix Monte Carlo project completion simulations that give identical dates for all sub-groups (milestones, priorities, epics).

When should I use Montecarlo Subgroup Prediction?

Montecarlo Subgroup Prediction fits situations like: all sub-group predictions converge to the same date despite different remaining counts; proportional throughput scaling produces flat/identical results; applying overall scope rate to individual sub-groups causes simulations to hit maxweeks cap and never converge; building project forecasting tools that predict completion for sub-groups of a larger backlog.

How do I install Montecarlo Subgroup Prediction in Claude Code?

Run `npx skills add divinevideo/divine-mobile --skill montecarlo-subgroup-prediction -a claude-code`. Or copy the skill folder (.agents/skills/montecarlo-subgroup-prediction in divinevideo/divine-mobile) into .claude/skills/montecarlo-subgroup-prediction in your project. Claude Code loads it when a task matches its description.

How do I install Montecarlo Subgroup Prediction in Codex?

Run `npx skills add divinevideo/divine-mobile --skill montecarlo-subgroup-prediction -a codex`. Or copy the skill folder (.agents/skills/montecarlo-subgroup-prediction in divinevideo/divine-mobile) into .agents/skills/montecarlo-subgroup-prediction in your project. Codex loads it when a task matches its description.

Can I use Montecarlo Subgroup Prediction 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 divinevideo/divine-mobile --skill montecarlo-subgroup-prediction -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/montecarlo-subgroup-prediction, .gemini/skills/montecarlo-subgroup-prediction, .github/skills/montecarlo-subgroup-prediction and .opencode/skills/montecarlo-subgroup-prediction in your project.

What does Montecarlo Subgroup Prediction need to run?

SKILL.md names no scripts, command-line tools or credentials: Montecarlo Subgroup Prediction is instructions for the agent only. Our summary lists: Python 3.

Does Montecarlo Subgroup Prediction 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 Montecarlo Subgroup Prediction 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 Montecarlo Subgroup Prediction use?

Montecarlo Subgroup Prediction is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Montecarlo Subgroup Prediction use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Montecarlo Subgroup Prediction?

Skills that share tags, products or a category with Montecarlo Subgroup Prediction: Project Planner (adrianpuiu/claude-skills-marketplace, 100 stars), Invokta Delivery (vinilana/invokta, 139 stars), Bmad Sprint Planning (delorenj/mcp-server-trello, 445 stars) and Verification Gates (rohitg00/skillkit, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Montecarlo Subgroup Prediction?

divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 266 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 10, 2026.

Source: divinevideo/divine-mobile on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.