Back to list
maitlandmarshall

dice-roller

by maitlandmarshall

0🍴 0📅 Dec 24, 2025

SKILL.md


name: dice-roller description: Roll real dice using OS randomness (not fabricated), optionally log results to NDJSON for audit, and emit a Markdown-ready summary for Mechanics blocks.

Dice Roller (Real RNG + Audit Log)

Use this skill whenever the game rules require a roll like d20 + stat + skill and you want outcomes to be truly random and auditable.

Quickstart

Roll a check:

  • python3 .codex/skills/dice-roller/scripts/roll_dice.py --expr "d20 + 5 + 1" --dc 15 --label "Ki ray (Agility+Ki Blast)" --md

Roll and append to an audit log (NDJSON):

  • python3 .codex/skills/dice-roller/scripts/roll_dice.py --expr "d20 + 5 + 1" --dc 15 --label "Turn 008: Ki ray" --log "worlds/<World>/campaigns/<Campaign>/campaign_logs/_rolls.ndjson" --md

Expression format

Supported terms:

  • Dice: d20, 2d6, 4d4 (count defaults to 1)
  • Modifiers: + 3, - 2

Examples:

  • d20 + 6 + 3
  • 2d6 + 1

Notes:

  • Keep it simple (no parentheses). If you need something complex, expand it into explicit +/- terms.

Output

The script prints a single JSON object to stdout (last line), including:

  • expr, terms, per-die rolls, total
  • optional dc and computed success
  • timestamp_utc and a random nonce for auditability

With --md, it prints a Markdown-ready summary before the JSON.

Score

Total Score

40/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon