pro-vi

Agent Dice — Development skill for Claude Code

Development community

Probabilistic dice triggers for Claude Code hooks.

How to install Agent Dice

This entry records only its repository, not the path inside it, so there is no exact command to give. Open pro-vi/agent-dice and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Dice does

Probabilistic dice triggers for Claude Code hooks.

Alternatives in Development

  • Ecc Guide — Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su 243.5k ★
  • Mempalace Help — Show comprehensive MemPalace help — available skills, MCP tools, CLI commands, hooks, and architecture 58.6k ★
  • Cancel Pua Loop — 取消当前活跃的 PUA Loop(原子级联:state + worktree + 记录) 19.5k ★

README

agent-dice

Probabilistic dice triggers for AI agent hooks — one host-agnostic engine with adapters for [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex](https://github.com/openai/codex), and [Pi](https://github.com/badlogic/pi-mono).

Formerly **cc-dice**. The `cc-dice` command and `CC_DICE_*` env vars still work as aliases, so existing setups keep running.

Register dice slots, and agent-dice rolls them on every agent stop event. Accumulators escalate probability with conversation depth; single/fixed slots give flat odds.

Why

Claude Code sessions are long-running, stateful, and unpredictable, which reminds me of a video game. Very much like a tabletop RPG campaign. In D&D, dice are the core mechanic that makes emergent behavior possible. A Natural 20 happens because probability demands it and it changes the course of the game.

agent-dice is more of a nod to the mechanics than trying to become a sophisticated plugin. In fact, you can create a stop hook yourself with a flat 5% chance to mimic a d20 roll. However, agent-dice gives you what a one-liner can't: accumulating dice pools across turns, shared rolls across multiple slots, per-session cooldowns, and state that persists across turns.

This creates moments that feel organic rather than scheduled. A prompt to invoke a skill that fires at turn 42 because the dice finally landed without any intervention. Your agents are part of the campaign.

Install

curl -fsSL https://raw.githubusercontent.com/pro-vi/agent-dice/main/install.sh | bash

Or clone locally:

git clone https://github.com/pro-vi/agent-dice.git
cd agent-dice && ./install.sh

Requires [bun](https://bun.sh), [git](https://git-scm.com), and [jq](https://jqlang.github.io/jq/).

./install.sh check      # verify
./install.sh uninstall   # remove

Codex

Codex ships proper lifecycle hooks, so the same dice work there too (see [Use with Codex](#use-with-codex)):

./install.sh code